Skip to content

Commit

Permalink
refactor: changed temp context firectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo23x0 committed Jan 3, 2021
1 parent 928d450 commit 3903f3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 5 additions & 5 deletions source/Raccine/Version.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#ifndef VERSIONINFO_H
#define VERSIONINFO_H

#define VER_FILEVERSION 1,4,1,0
#define VER_FILEVERSION_STR "1.4.1.0 BETA\0"
#define VER_FILEVERSION 1,4,2,0
#define VER_FILEVERSION_STR "1.4.2.0 BETA\0"

#define VER_PRODUCTVERSION 1,4,1,0
#define VER_PRODUCTVERSION_STR "1.4.1.0\0"
#define VER_PRODUCTVERSION 1,4,2,0
#define VER_PRODUCTVERSION_STR "1.4.2.0\0"

#define VER_COMPANYNAME_STR "Raccine"
#define VER_FILEDESCRIPTION_STR "A Simple Ransomware Vaccine - see https://github.com/Neo23x0/Raccine"
#define VER_INTERNALNAME_STR "Raccine"
#define VER_LEGALCOPYRIGHT_STR "Copyright 2020"
#define VER_LEGALCOPYRIGHT_STR "Copyright 2021"
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved"
#define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR
#define VER_ORIGINALFILENAME_STR "Raccine.exe"
Expand Down
2 changes: 1 addition & 1 deletion source/RaccineLib/Raccine.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define RACCINE_DATA_DIRECTORY L"%PROGRAMDATA%\\Raccine"
#define RACCINE_YARA_DIRECTORY L"%PROGRAMFILES%\\Raccine\\yara"
#define RACCINE_PROGRAM_DIRECTORY L"%PROGRAMFILES%\\Raccine"
#define RACCINE_USER_CONTEXT_DIRECTORY L"%TEMP%\\RaccineUserContext"
#define RACCINE_USER_CONTEXT_DIRECTORY L"%PROGRAMDATA%\\Raccine\\RaccineUserContext\\%USERNAME%"


/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions source/RaccineLib/raccine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ bool EvaluateYaraRules(const RaccineConfig& raccine_config,

ExpandEnvironmentStringsW(RACCINE_USER_CONTEXT_DIRECTORY, wTestFilename, ARRAYSIZE(wTestFilename) - 1);

if (std::filesystem::create_directories(wTestFilename) == false) {
if (raccine_config.is_debug_mode()) {
wprintf(L"Unable to create temporary user folder: %s\n", wTestFilename);
}
}

const int c = GetTempFileNameW(wTestFilename, L"Raccine", 0, wTestFilename);
if (c == 0) {
return false;
Expand Down

0 comments on commit 3903f3d

Please sign in to comment.