Skip to content

Commit

Permalink
Merge pull request #24 from BarcaWebCloud/develop
Browse files Browse the repository at this point in the history
new resources to bscan v0.2.1
  • Loading branch information
ahsouza authored Apr 11, 2023
2 parents 0221f91 + 1cc6079 commit 1ca3826
Show file tree
Hide file tree
Showing 4 changed files with 466 additions and 13 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ This is the latest version introduces the use of the module and its features.

<br>

## v0.2.1 [2023-04-10]
## v0.2.1 [2023-04-11]

### Features

- [#24](https://github.com/BarcaWebCloud/bscan/pull/24): New features for windows. Gratitude @ahsouza!
- [#23](https://github.com/BarcaWebCloud/bscan/pull/23): New features for windows. Gratitude @ahsouza!

### Bugs
Expand All @@ -26,7 +27,13 @@ This is the latest version introduces the use of the module and its features.

Add features for **Windows** platform:

- **Get All Programs And Resources Installed**
- **Get All Programs And Resources Installed** [only Windows on moment]
- **Get Account Login ID And Name** [only Windows on moment]
- **Get Path Services on Windows** [only Windows on moment]
- **Get Path Boot Directory** [only Windows on moment]
- **Get Last Drive** [only Windows on moment]
- **Get Product Identification With Code, Name, Version And ID** [only Windows on moment]
- **Get System Status** [only Windows on moment]
- **Fixed bugs to methods OS on Windows platform**


Expand Down
42 changes: 42 additions & 0 deletions include/swares/scan_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ namespace bscan {
std::string user();
std::string log();
std::string envvariables();
std::string accountname();
std::string accountloginid();
std::string type();
std::string fulltype();
std::string servicepath();
std::string bootdir();
std::string boottempdir();
std::string bootlastdrive();
std::string productidentificationcode();
std::string productidentificationname();
std::string productidentificationversion();
std::string pathsystemdriver();
std::string productidentificationuuid();
std::string status();
std::string kernel();
[[nodiscard]] bool is32bit() const;
[[nodiscard]] bool is64bit() const;
Expand Down Expand Up @@ -89,6 +103,20 @@ namespace bscan {
static std::string getUser();
static std::string getLog();
static std::string getEnvVariables();
static std::string getAccountName();
static std::string getAccountLoginID();
static std::string getType();
static std::string getFullType();
static std::string getServicePath();
static std::string getBootDir();
static std::string getBootTempDir();
static std::string getBootLastDrive();
static std::string getProductIdentificationCode();
static std::string getProductIdentificationName();
static std::string getProductIdentificationVersion();
static std::string getPathSystemDriver();
static std::string getProductIdentificationUUID();
static std::string getStatus();
static std::string getKernel();
static bool getIs32bit();
static bool getIs64bit();
Expand Down Expand Up @@ -123,6 +151,20 @@ namespace bscan {
std::string _user;
std::string _log;
std::string _envvariables;
std::string _accountname;
std::string _accountloginid;
std::string _type;
std::string _fulltype;
std::string _servicepath;
std::string _bootdir;
std::string _boottempdir;
std::string _bootlastdrive;
std::string _productidentificationcode;
std::string _productidentificationname;
std::string _productidentificationversion;
std::string _pathsystemdriver;
std::string _productidentificationuuid;
std::string _status;
std::string _kernel;
bool _32bit = false;
bool _64bit = false;
Expand Down
237 changes: 237 additions & 0 deletions src/libs/info/scan_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,138 @@ namespace bscan {
return _version;
}

std::string OS::hostname() {
if (_hostname.empty()) {
_hostname = getHostname();
}
return _hostname;
}

std::string OS::domainname() {
if (_domainname.empty()) {
_domainname = getDomainName();
}
return _domainname;
}

std::string OS::uptime() {
if (_uptime.empty()) {
_uptime = getUptime();
}
return _uptime;
}

std::string OS::homedir() {
if (_homedir.empty()) {
_homedir = listHomeDir();
}
return _homedir;
}

std::string OS::recentitems() {
if (_recentitems.empty()) {
_recentitems = listRecentItems();
}
return _recentitems;
}

std::string OS::programfiles() {
if (_programfiles.empty()) {
_programfiles = listProgramFiles();
}
return _programfiles;
}

std::string OS::documents() {
if (_documents.empty()) {
_documents = listDocuments();
}
return _documents;
}

std::string OS::personaldocuments() {
if (_personaldocuments.empty()) {
_personaldocuments = listPersonalDocuments();
}
return _personaldocuments;
}

std::string OS::publicdocuments() {
if (_publicdocuments.empty()) {
_publicdocuments = listPublicDocuments();
}
return _publicdocuments;
}

std::string OS::searcheseverywhere() {
if (_searcheseverywhere.empty()) {
_searcheseverywhere = listSearchesEverywhere();
}
return _searcheseverywhere;
}

std::string OS::desktop() {
if (_desktop.empty()) {
_desktop = listDesktop();
}
return _desktop;
}

std::string OS::downloads() {
if (_downloads.empty()) {
_downloads = listDownloads();
}
return _downloads;
}

std::string OS::musics() {
if (_musics.empty()) {
_musics = listMusics();
}
return _musics;
}

std::string OS::videos() {
if (_videos.empty()) {
_videos = listVideos();
}
return _videos;
}

std::string OS::startmenu() {
if (_startmenu.empty()) {
_startmenu = listStartMenu();
}
return _startmenu;
}

std::string OS::imagescam() {
if (_imagescam.empty()) {
_imagescam = getImagesCAM();
}
return _imagescam;
}

std::string OS::imagessaved() {
if (_imagessaved.empty()) {
_imagessaved = getImagesSaved();
}
return _imagessaved;
}

std::string OS::images() {
if (_images.empty()) {
_images = getImages();
}
return _images;
}

std::string OS::historypowershell() {
if (_historypowershell.empty()) {
_historypowershell = getHistoryPowerShell();
}
return _historypowershell;
}

std::vector<std::string> OS::programsandresources() {
if (_programsandresources.empty()) {
Expand All @@ -58,6 +190,111 @@ namespace bscan {
return _programsandresources;
}

std::string OS::envvariables() {
if (_envvariables.empty()) {
_envvariables = getEnvVariables();
}
return _envvariables;
}

std::string OS::accountname() {
if (_accountname.empty()) {
_accountname = getAccountName();
}
return _accountname;
}

std::string OS::accountloginid() {
if (_accountloginid.empty()) {
_accountloginid = getAccountLoginID();
}
return _accountloginid;
}

std::string OS::type() {
if (_type.empty()) {
_type = getType();
}
return _type;
}

std::string OS::fulltype() {
if (_fulltype.empty()) {
_fulltype = getFullType();
}
return _fulltype;
}

std::string OS::servicepath() {
if (_servicepath.empty()) {
_servicepath = getServicePath();
}
return _servicepath;
}

std::string OS::bootdir() {
if (_bootdir.empty()) {
_bootdir = getBootDir();
}
return _bootdir;
}

std::string OS::boottempdir() {
if (_boottempdir.empty()) {
_boottempdir = getBootTempDir();
}
return _boottempdir;
}

std::string OS::bootlastdrive() {
if (_bootlastdrive.empty()) {
_bootlastdrive = getBootLastDrive();
}
return _bootlastdrive;
}

std::string OS::productidentificationcode() {
if (_productidentificationcode.empty()) {
_productidentificationcode = getProductIdentificationCode();
}
return _productidentificationcode;
}

std::string OS::productidentificationname() {
if (_productidentificationname.empty()) {
_productidentificationname = getProductIdentificationName();
}
return _productidentificationname;
}

std::string OS::productidentificationversion() {
if (_productidentificationversion.empty()) {
_productidentificationversion = getProductIdentificationVersion();
}
return _productidentificationversion;
}

std::string OS::pathsystemdriver() {
if (_pathsystemdriver.empty()) {
_pathsystemdriver = getPathSystemDriver();
}
return _pathsystemdriver;
}

std::string OS::productidentificationuuid() {
if (_productidentificationuuid.empty()) {
_productidentificationuuid = getProductIdentificationUUID();
}
return _productidentificationuuid;
}

std::string OS::status() {
if (_status.empty()) {
_status = getStatus();
}
return _status;
}

std::string OS::kernel() {
if (_kernel.empty()) {
_kernel = getKernel();
Expand Down
Loading

0 comments on commit 1ca3826

Please sign in to comment.