[REFACT] Changes in presenting the version

This commit is contained in:
hasherezade
2022-11-05 06:13:37 -07:00
parent 56959c2906
commit 071f768174
5 changed files with 4 additions and 18 deletions
+1 -1
View File
@@ -191,7 +191,7 @@ set (hdrs
set (rsrc
resources.h
include/pe_sieve_ver_short.h
pe_sieve.rc
pe_sieve_res.rc
)
# set filters in Visual Studio project:
+1 -2
View File
@@ -5,5 +5,4 @@
#define PESIEVE_MICRO_VERSION 5
#define PESIEVE_PATCH_VERSION 0
#define PESIEVE_VERSION_STR "0.3.5.0"
#define PESIEVE_VERSION_STR "0.3.5"
+1 -14
View File
@@ -44,25 +44,12 @@ void free_params(t_params &args)
free_strparam(args.modules_ignored);
}
std::string version_to_str(DWORD version)
{
BYTE* chunks = (BYTE*)&version;
std::stringstream stream;
stream << std::hex <<
(int)chunks[3] << "." <<
(int)chunks[2] << "." <<
(int)chunks[1] << "." <<
(int)chunks[0];
return stream.str();
}
int main(int argc, char *argv[])
{
bool info_req = false;
t_params args = { 0 };
PEsieveParams uParams(version_to_str(PESIEVE_VERSION_ID));
PEsieveParams uParams(PESIEVE_VERSION_STR);
if (argc < 2) {
uParams.printBanner();
uParams.printBriefInfo();
+1 -1
View File
@@ -240,7 +240,7 @@ pesieve::ReportEx* pesieve::scan_and_dump(IN const pesieve::t_params args)
std::string pesieve::info()
{
std::stringstream stream;
stream << "Version: " << PESIEVE_MAJOR_VERSION << "." << PESIEVE_MINOR_VERSION << "." << PESIEVE_MICRO_VERSION << "." << PESIEVE_PATCH_VERSION;
stream << "Version: " << PESIEVE_VERSION_STR;
#ifdef _WIN64
stream << " (x64)" << "\n";
#else
View File