updated folder scanning code

This commit is contained in:
jakani24
2023-12-25 22:50:30 +01:00
parent 89aab04cce
commit f069abeb7b
97 changed files with 4778 additions and 150 deletions

View File

@@ -1,7 +1,32 @@
#ifndef APP_CTRL_CPP #ifndef APP_CTRL_CPP
#define APP_CTRL_CPP #define APP_CTRL_CPP
#include "app_ctrl.h" #include "app_ctrl.h"
bool app_stop_ = false;
bool can_run_thread_ = true;
bool can_scan_folder_ = true;
int app_stop() { int app_stop() {
return 0; return app_stop_;
}
int can_run_thread() {
return can_run_thread_;
}
int thread_init() {
can_run_thread_ = false;
return can_run_thread_;
}
int thread_shutdown() {
can_run_thread_ = true;
return can_run_thread_;
}
int can_scan_folder() {
return can_scan_folder_;
}
int scan_folder_init() {
can_scan_folder_ = false;
return can_scan_folder_;
}
int scan_folder_shutdown() {
can_scan_folder_ = true;
return can_scan_folder_;
} }
#endif #endif

View File

@@ -1,4 +1,10 @@
#ifndef APP_CTRL_H #ifndef APP_CTRL_H
#define APP_CTRL_H #define APP_CTRL_H
int app_stop(); int app_stop();
int can_run_thread();
int thread_init();
int thread_shutdown();
int can_scan_folder();
int scan_folder_init();
int scan_folder_shutdown();
#endif #endif

View File

@@ -0,0 +1,360 @@
#ifndef CHECK_DIR_CPP
#define CHECK_DIR_CPP
#include "check_dir.h"
#include "well_known.h"
#include "log.h"
#include "md5hash.h"
#include "scan.h"
#include "app_ctrl.h"
#include "virus_ctrl.h"
#include "scan.h"
#include "settings.h"
/* old implementation. used up a lot of resource and did not work properly.
void add_to_temp_db(const char*hash) {
//PERIODIC_FOLDER_SCAN_TEMP_DB
FILE*fp;
if (fopen_s(&fp, PERIODIC_FOLDER_SCAN_TEMP_DB, "a") != 0) {
log(LOGLEVEL::ERR, "[add_to_temp_db()]: Error opening temp db: ", PERIODIC_FOLDER_SCAN_TEMP_DB);
return;
}
else {
//log(LOGLEVEL::INFO, "[add_to_temp_db()]: Adding hash: ", hash, " to temp db: ", PERIODIC_FOLDER_SCAN_TEMP_DB);
fprintf_s(fp, "%s\n", hash);
fclose(fp);
}
}
void scan_folder_recursive(const std::string& directory, int thread_id,const std::string&db_file) {
std::string search_path = directory + "\\*.*";
WIN32_FIND_DATA find_file_data;
HANDLE hFind = FindFirstFile(search_path.c_str(), &find_file_data);
if (hFind == INVALID_HANDLE_VALUE) {
//std::cerr << "Error opening directory: " << directory << std::endl;
log(LOGLEVEL::ERR, "[scan_folder_recursive()]: Error opening directory: ", directory ," while scanning folder for new files");
return;
}
do {
if (strcmp(find_file_data.cFileName, ".") == 0 || strcmp(find_file_data.cFileName, "..") == 0) {
continue; // Skip the current and parent directories
}
std::string full_path = directory + "\\" + find_file_data.cFileName;
if (find_file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// If it's a directory, recurse into it
scan_folder_recursive(full_path, thread_id,db_file);
}
else {
// If it's a file, check if it is in db, else scan it and add it to db
char*hash = new char[300];
md5_file(full_path.c_str(), hash);
//now find hash in db
if (scan_hash(db_file.c_str(), hash)==1) {
//file is allready in db, skipping
//in order to not keep hashes that are not present anymore in the db, we have to write this hash into a temp dir, which is at the end copied into the main db
add_to_temp_db(hash);
}
else {
//scan the file and add it to db
//scan for virus
switch (scan_hash(hash)) {
case 1:
//virus found
//log it
log(LOGLEVEL::VIRUS, "[scan_folder_recursive()]: Virus found in file: ", full_path, " while scanning ", directory, " for new files");
//virus_ctrl_store(full_path.c_str(), hash, "fs");
break;
case 2:
//error
log(LOGLEVEL::ERR, "[scan_folder_recursive()]: Error while scanning file: ", full_path, " while scanning ", directory, " for new files");
break;
default:
//not a virus
add_to_temp_db(hash);
break;
}
}
}
} while (FindNextFile(hFind, &find_file_data) != 0);
FindClose(hFind);
}
int check_scan_dir(char*dirpath,char*dirname) {
if (can_scan_folder()) {
scan_folder_init();
//FOLDER_DATABASE_DIR <= the folder where the database for folder checking is stored
//the database is stored in the following format:
/* a file per folder (and its subfolders)
in this db file the hashes of all the files in the folder (and its subfolders) are stored
If a file is detected, which hash is not known, it gets scanned and added to the db. if a hash is inside the db, which is not present in the folder, the hash is rempved from the db
*/
/*
FILE* fp;
char* path = new char[300];
path[0] = '\0';
//build up the path for the db file.
strcpy_s(path, 295, FOLDER_DATABASE_DIR);
strcat_s(path, 295, "\\");
strcat_s(path, 295, dirname);
strcat_s(path, 295, ".jdbf");
//check if the file exists. else we cannot scan the folder
if ((fopen_s(&fp, path, "r")) != 0) {
log(LOGLEVEL::ERR, "[check_scan_dir()]: Error opening database: ", path, " while scanning folder for new files; aborting");
//try to create the file
if (fopen_s(&fp, path, "w") != 0) {
log(LOGLEVEL::ERR, "[check_scan_dir()]: Error creating new database: ", path, " while scanning folder for new files; aborting");
}
else {
fprintf_s(fp, "%s\n", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");//write A 32 times A into the file. So the algorithm ha ssomething to map into memory. else it might throw an error
fclose(fp);
}
scan_folder_shutdown();
return 1;
}
else {
fclose(fp);
//process the files of the folder.
//first: calculate hash of file
//second: check if hash is in db
//if not, scan file and add it to db (only add it if it is not detected as a virus)
scan_folder_recursive(dirpath, 0,path);
//process the found viruses
virus_ctrl_process("fs");
}
delete[] path;
scan_folder_shutdown();
return 0;
}
else {
//there is already a folder scan happening
}
}
*/
void process_changes(const FILE_NOTIFY_INFORMATION* pInfo) {
// Allocate a buffer for the file name and copy the content
std::wstring fileName(pInfo->FileName, pInfo->FileNameLength / sizeof(wchar_t));
// Print information about the changed file or directory
//convert wstring to string
std::string filename_str(fileName.begin(), fileName.end());
filename_str = "c:\\" + filename_str;
//scan the file and send it to virus_ctrl if it is a virus and then process it
std::transform(filename_str.begin(), filename_str.end(), filename_str.begin(), ::tolower);
if (is_folder_excluded(filename_str.c_str())) {
//dont scan excluded files
return;
}else
// action_scanfile(filename_str.c_str());
log(LOGLEVEL::INFO, "[process_changes()]: File change: ", filename_str.c_str(), " while monitoring directory for changes");
}
/*
void monitor_directory(LPCSTR directory) {
// Open the directory for monitoring
HANDLE hDir = CreateFile(
directory,
FILE_LIST_DIRECTORY,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
NULL
);
if (hDir == INVALID_HANDLE_VALUE) {
log(LOGLEVEL::ERR, "[monitor_directory()]: Error opening directory: ", directory, " while monitoring directory for changes");
return;
}
// Create a buffer for file change notifications
constexpr DWORD bufferSize = 4096;
BYTE buffer[bufferSize];
// Monitor the directory for changes
OVERLAPPED overlapped;
memset(&overlapped, 0, sizeof(overlapped));
overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (ReadDirectoryChangesW(
hDir,
buffer,
bufferSize,
TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_SIZE,
NULL,
&overlapped,
NULL) == 0) {
log(LOGLEVEL::ERR, "[monitor_directory()]: Error reading directory changes: ", GetLastError(), " while monitoring directory for changes");
CloseHandle(hDir);
return;
}
log(LOGLEVEL::INFO, "[monitor_directory()]: Monitoring directory: ", directory, " for changes");
//print_exclusions();
// Wait for changes
while (true) {
DWORD bytesReturned;
if (GetOverlappedResult(hDir, &overlapped, &bytesReturned, TRUE)) {
// Process the changes in the buffer
FILE_NOTIFY_INFORMATION* pInfo = reinterpret_cast<FILE_NOTIFY_INFORMATION*>(buffer);
do {
process_changes(pInfo);
pInfo = reinterpret_cast<FILE_NOTIFY_INFORMATION*>(
reinterpret_cast<BYTE*>(pInfo) + pInfo->NextEntryOffset);
} while (pInfo->NextEntryOffset != 0);
// Reset the event for the next wait
ResetEvent(overlapped.hEvent);
// Continue monitoring
if (ReadDirectoryChangesW(
hDir,
buffer,
bufferSize,
TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_SIZE,
NULL,
&overlapped,
NULL) == 0) {
log(LOGLEVEL::ERR, "[monitor_directory()]: Error reading directory changes: ", GetLastError(), " while monitoring directory for changes");
break;
}
}
else {
DWORD error = GetLastError();
if (error != ERROR_IO_PENDING) {
log(LOGLEVEL::ERR, "[monitor_directory()]: Error reading directory changes: ", error, " while monitoring directory for changes");
break;
}
}
// Wait for the event to be signaled (infinite timeout)
WaitForSingleObject(overlapped.hEvent, INFINITE);
}
// Cleanup
CloseHandle(overlapped.hEvent);
CloseHandle(hDir);
}
*/
void monitor_directory(LPCSTR directory) {
// Open the directory for monitoring
HANDLE hDir = CreateFile(
directory,
FILE_LIST_DIRECTORY,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
NULL
);
if (hDir == INVALID_HANDLE_VALUE) {
std::cerr << "[monitor_directory()]: Error opening directory: " << directory << " while monitoring directory for changes" << std::endl;
return;
}
// Create a buffer for file change notifications
constexpr DWORD bufferSize = 4096;
BYTE buffer[bufferSize];
// Monitor the directory for changes
OVERLAPPED overlapped;
memset(&overlapped, 0, sizeof(overlapped));
overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
if (ReadDirectoryChangesW(
hDir,
buffer,
bufferSize,
TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_SIZE,
NULL,
&overlapped,
NULL) == 0) {
std::cerr << "[monitor_directory()]: Error reading directory changes: " << GetLastError() << " while monitoring directory for changes" << std::endl;
CloseHandle(hDir);
return;
}
std::cout << "[monitor_directory()]: Monitoring directory: " << directory << " for changes" << std::endl;
// Wait for changes
while (true) {
DWORD bytesReturned;
DWORD waitStatus = WaitForSingleObject(overlapped.hEvent, INFINITE);
if (waitStatus == WAIT_OBJECT_0) {
if (GetOverlappedResult(hDir, &overlapped, &bytesReturned, FALSE)) {
// Process the changes in the buffer
FILE_NOTIFY_INFORMATION* pInfo = reinterpret_cast<FILE_NOTIFY_INFORMATION*>(buffer);
do {
process_changes(pInfo);
pInfo = reinterpret_cast<FILE_NOTIFY_INFORMATION*>(
reinterpret_cast<BYTE*>(pInfo) + pInfo->NextEntryOffset);
} while (pInfo->NextEntryOffset != 0);
// Reset the event for the next wait
ResetEvent(overlapped.hEvent);
// Continue monitoring
if (ReadDirectoryChangesW(
hDir,
buffer,
bufferSize,
TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE,
NULL,
&overlapped,
NULL) == 0) {
std::cerr << "[monitor_directory()]: Error reading directory changes: " << GetLastError() << " while monitoring directory for changes" << std::endl;
break;
}
}
else {
std::cerr << "[monitor_directory()]: Error reading directory changes: " << GetLastError() << " while monitoring directory for changes" << std::endl;
break;
}
}
else {
std::cerr << "[monitor_directory()]: WaitForSingleObject failed: " << GetLastError() << std::endl;
break;
}
}
// Cleanup
CloseHandle(overlapped.hEvent);
CloseHandle(hDir);
}
void folder_scanner() {
//we are in a completely seperate thread then the main thread; unlimited resources wuhuii
FILE*fp;
char* path = new char[300];
char* foldername = new char[300];
//start the watch dir function used to monitor the dir for new files
monitor_directory("C:\\");
delete[] path;
delete[] foldername;
}
#endif // !CHECK_DIR_CPP

View File

@@ -0,0 +1,11 @@
#pragma once
#ifndef CHECK_DIR_H
#define CHECK_DIR_H
#include <stdio.h>
#include <iostream>
#include <Windows.h>
#include <chrono>
#include <algorithm> // for std::transform
void folder_scanner();
#endif // !CHECK_DIR_H

View File

@@ -13,8 +13,16 @@
#include "local_com.h" #include "local_com.h"
#include "local_schedule.h" #include "local_schedule.h"
#include "log.h" #include "log.h"
#include "thread_ctrl.h"
#include "settings.h"
#include "check_dir.h"
int main() { int main() {
printf("welcome to the jakach security tool main thread\n"); printf("welcome to the jakach security tool main thread\n");
load_settings();
//start a second thread which will scan for new files
std::thread folder_scannner_thread(folder_scanner);
//
//
//main thread: //main thread:
/* watches for notifications on bus /* watches for notifications on bus
* start threads (scans etc); only one at a time may run * start threads (scans etc); only one at a time may run
@@ -29,21 +37,32 @@ int main() {
//check for tasks in com //check for tasks in com
//check for scheduled tasks //check for scheduled tasks
//execute tasks //execute tasks
log(LOGLEVEL::WARN,"test","test2",222); //call_srv("8.8.8.8","","");
printf("check_from_com:%d\n",check_for_com_tasks(MAIN_COM, MAIN_COM_PATH)); auto start = std::chrono::high_resolution_clock::now();
printf("check_from_task:%d\n", check_for_sched_tasks(SCHED,SCHED_PATH)); // printf("check_from_com:%d\n",check_for_com_tasks(MAIN_COM, MAIN_COM_PATH));
// printf("check_from_task:%d\n", check_for_sched_tasks(SCHED,SCHED_PATH));
//unlock_task("tsk1"); else it will only be executed once. but this function has to be called at the end of the task. else it will nvr be executed again. this would be bad :( //unlock_task("tsk1"); else it will only be executed once. but this function has to be called at the end of the task. else it will nvr be executed again. this would be bad :(
Sleep(1000); //start a thread that executes check_scan_dir to scan folders for new files. this thread then should start a ock so only one scanfolder thread runs at a time
//Sleep(1000);
if (can_run_thread()) {
int queue_size = get_queue_size(); int queue_size = get_queue_size();
for (int i = 0; i < queue_size; i++) { for (int i = 0; i < queue_size; i++) {
char* queue_entry = new char[300 * 2 + 5]; char* queue_entry = new char[300 * 2 + 5];
queue_entry[0] = '\0'; queue_entry[0] = '\0';
queue_pop(queue_entry); queue_pop(queue_entry);
printf("%s\n", queue_entry); //execute the function which starts the threads
// printf("%s\n", queue_entry);
start_thread(queue_entry);
delete[] queue_entry; delete[] queue_entry;
} }
printf("\n\n\n"); }
//to ensure that the loop takes at least 1 second else it will run too fast nd destroy you CPU :)
auto stop = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
if (duration.count() < 1000)
Sleep(1000 - duration.count());
// printf("\n\n\n");
} }

View File

@@ -0,0 +1,101 @@
#pragma warning(disable:4996)
#include <iostream>
#include <thread>
#include <curl/curl.h>
#include <openssl/md5.h>
//#include <yara.h>
#include "app_ctrl.h"
#include "md5hash.h"
#include "connect.h"
#include "scan.h"
#include "queue_ctrl.h"
#include "well_known.h"
#include "local_com.h"
#include "local_schedule.h"
#include "log.h"
#include "thread_ctrl.h"
#include "settings.h"
#include "check_dir.h"
int main() {
printf("welcome to the jakach security tool main thread\n");
load_settings();
//start a second thread which will scan for new files
std::thread folder_scannner_thread(folder_scanner);
//
//
//main thread:
/* watches for notifications on bus
* start threads (scans etc); only one at a time may run
* updates settings etc
* start scheduled tasks
*/
while (!app_stop()) {
//run all the tasks described above
//check for tasks in com
//check for scheduled tasks
//execute tasks
//call_srv("8.8.8.8","","");
auto start = std::chrono::high_resolution_clock::now();
// printf("check_from_com:%d\n",check_for_com_tasks(MAIN_COM, MAIN_COM_PATH));
// printf("check_from_task:%d\n", check_for_sched_tasks(SCHED,SCHED_PATH));
//unlock_task("tsk1"); else it will only be executed once. but this function has to be called at the end of the task. else it will nvr be executed again. this would be bad :(
//start a thread that executes check_scan_dir to scan folders for new files. this thread then should start a ock so only one scanfolder thread runs at a time
//Sleep(1000);
if (can_run_thread()) {
int queue_size = get_queue_size();
for (int i = 0; i < queue_size; i++) {
char* queue_entry = new char[300 * 2 + 5];
queue_entry[0] = '\0';
queue_pop(queue_entry);
//execute the function which starts the threads
// printf("%s\n", queue_entry);
start_thread(queue_entry);
delete[] queue_entry;
}
}
//to ensure that the loop takes at least 1 second else it will run too fast nd destroy you CPU :)
auto stop = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
if (duration.count() < 1000)
Sleep(1000 - duration.count());
// printf("\n\n\n");
}
//ListFilesRecursive("C:\\", 0);
/*char md5Hash[2 * MD5_DIGEST_LENGTH + 1]; // +1 for null-terminator
printf("Hash of the executable: ");
md5_file("C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\x64\\Debug\\client_backend.exe", md5Hash);
printf("%s", md5Hash);
char a_[2000];
printf("\nerror:%d\n",connect_to_srv("https://self-signed.badssl.com/", a_, 2000,1)); //error 60: self signed => option f<>r self-signed ignorieren aktivieren (bool ignore_invalid=true)
printf("%s", a_); //error 6: not reachable
download_file_from_srv("https://jakach.duckdns.org/php/login/v3/login.php", "c:\\programdata\\jakach\\out12.txt");
/*
const int numThreads = 12;
std::thread threads[numThreads];
for (int i = 0; i < numThreads; ++i) {
threads[i] = std::thread(ListFilesRecursive, "C:\\Users\\janis\\Documents\\ma_av_tests",i);
}
// Join threads to wait for them to finish
for (int i = 0; i < numThreads; ++i) {
threads[i].join();
}
std::cout << "All threads have finished." << std::endl;
*/
//printf("code:%d",scan_hash("C:\\Users\\janis\\Documents\\ma_av_tests\\OutputFile.txt", "1fddc13c02a79442c911a44b02ee0f58"));
return 0;
}

Binary file not shown.

View File

@@ -17,8 +17,8 @@ Global
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x64.Build.0 = Debug|x64 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x64.Build.0 = Debug|x64
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x86.ActiveCfg = Debug|Win32 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x86.ActiveCfg = Debug|Win32
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x86.Build.0 = Debug|Win32 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Debug|x86.Build.0 = Debug|Win32
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x64.ActiveCfg = Release|x64 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x64.ActiveCfg = Debug|x64
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x64.Build.0 = Release|x64 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x64.Build.0 = Debug|x64
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x86.ActiveCfg = Release|Win32 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x86.ActiveCfg = Release|Win32
{56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x86.Build.0 = Release|Win32 {56E65283-AAC9-43F6-9613-72BE8D648AC4}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection

View File

@@ -138,6 +138,7 @@
<ItemGroup> <ItemGroup>
<ClCompile Include="app_ctrl.cpp" /> <ClCompile Include="app_ctrl.cpp" />
<ClCompile Include="app_ctrl.h" /> <ClCompile Include="app_ctrl.h" />
<ClCompile Include="check_dir.cpp" />
<ClCompile Include="client_backend.cpp" /> <ClCompile Include="client_backend.cpp" />
<ClCompile Include="connect.cpp" /> <ClCompile Include="connect.cpp" />
<ClCompile Include="local_com.cpp" /> <ClCompile Include="local_com.cpp" />
@@ -147,8 +148,12 @@
<ClCompile Include="permissions.cpp" /> <ClCompile Include="permissions.cpp" />
<ClCompile Include="queue _ctrl.cpp" /> <ClCompile Include="queue _ctrl.cpp" />
<ClCompile Include="scan.cpp" /> <ClCompile Include="scan.cpp" />
<ClCompile Include="settings.cpp" />
<ClCompile Include="thread_ctrl.cpp" />
<ClCompile Include="virus_ctrl.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="check_dir.h" />
<ClInclude Include="connect.h" /> <ClInclude Include="connect.h" />
<ClInclude Include="local_com.h" /> <ClInclude Include="local_com.h" />
<ClInclude Include="local_schedule.h" /> <ClInclude Include="local_schedule.h" />
@@ -156,9 +161,16 @@
<ClInclude Include="md5hash.h" /> <ClInclude Include="md5hash.h" />
<ClInclude Include="permissions.h" /> <ClInclude Include="permissions.h" />
<ClInclude Include="queue_ctrl.h" /> <ClInclude Include="queue_ctrl.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="scan.h" /> <ClInclude Include="scan.h" />
<ClInclude Include="settings.h" />
<ClInclude Include="thread_ctrl.h" />
<ClInclude Include="virus_ctrl.h" />
<ClInclude Include="well_known.h" /> <ClInclude Include="well_known.h" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ResourceCompile Include="client_backend.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

View File

@@ -48,6 +48,18 @@
<ClCompile Include="log.cpp"> <ClCompile Include="log.cpp">
<Filter>Headerdateien</Filter> <Filter>Headerdateien</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="check_dir.cpp">
<Filter>Headerdateien</Filter>
</ClCompile>
<ClCompile Include="thread_ctrl.cpp">
<Filter>Headerdateien</Filter>
</ClCompile>
<ClCompile Include="virus_ctrl.cpp">
<Filter>Headerdateien</Filter>
</ClCompile>
<ClCompile Include="settings.cpp">
<Filter>Headerdateien</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="md5hash.h"> <ClInclude Include="md5hash.h">
@@ -77,5 +89,25 @@
<ClInclude Include="log.h"> <ClInclude Include="log.h">
<Filter>Headerdateien</Filter> <Filter>Headerdateien</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="check_dir.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="thread_ctrl.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="virus_ctrl.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="settings.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="client_backend.rc">
<Filter>Ressourcendateien</Filter>
</ResourceCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -78,4 +78,29 @@ int download_file_from_srv(const char* url, const char* outputFileName) {
return 0; return 0;
} }
int call_srv(const char*server_url,const char*get_request,const char*additional) {
CURL* curl;
CURLcode res;
std::string readBuffer;
char*url=new char[1000];
url[0] = '\0';
curl = curl_easy_init();
if (curl) {
char* output = curl_easy_escape(curl, additional, strlen(additional));
sprintf_s(url, 995, "%s%s%s", server_url, get_request,output);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
curl_free(output);
curl_easy_cleanup(curl);
delete[] url;
return res;
}
delete[] url;
return 0;
}
#endif #endif

View File

@@ -1,6 +1,10 @@
#pragma once #pragma once
#include <iostream> #include <iostream>
#include <iomanip>
#include <sstream>
#include <locale>
#include <string> #include <string>
#include <curl/curl.h> #include <curl/curl.h>
int connect_to_srv(const char* url, char* out, int max_len, bool ignore_insecure); int connect_to_srv(const char* url, char* out, int max_len, bool ignore_insecure);
int download_file_from_srv(const char* url, const char* outputFileName); int download_file_from_srv(const char* url, const char* outputFileName);
int call_srv(const char*, const char*,const char*);

View File

@@ -7,7 +7,6 @@ int check_for_com_tasks(const char* com_name, const char* com_path) {
FILE* fp=nullptr; FILE* fp=nullptr;
char* command=new char [300]; char* command=new char [300];
if ((fopen_s(&fp,com_path, "r")) != 0) { if ((fopen_s(&fp,com_path, "r")) != 0) {
//panic, create log entry, return 1;
//no com file found = no communication needed //no com file found = no communication needed
delete[] command; delete[] command;
return 1; return 1;
@@ -16,7 +15,6 @@ int check_for_com_tasks(const char* com_name, const char* com_path) {
while (!feof(fp)) { while (!feof(fp)) {
fscanf_s(fp, "%s", command, 295); // get the command fscanf_s(fp, "%s", command, 295); // get the command
if (!feof(fp)) { //last line =\n we dont want to process that if (!feof(fp)) { //last line =\n we dont want to process that
//printf("%s\n", command);
//we scanned the command, now we will scan the path. If the process does not need a path the path will be nopath. (set from client) //we scanned the command, now we will scan the path. If the process does not need a path the path will be nopath. (set from client)
//get a full path. => " = start, second "= end //get a full path. => " = start, second "= end
char* path = new char[300]; char* path = new char[300];

View File

@@ -2,6 +2,7 @@
#define LOCAL_SCHEDULE_CPP #define LOCAL_SCHEDULE_CPP
#include "local_schedule.h" #include "local_schedule.h"
#include "queue_ctrl.h" #include "queue_ctrl.h"
#include "log.h"
/* /*
* To do: * To do:
* read scheduled tasks form file * read scheduled tasks form file
@@ -88,6 +89,7 @@ int check_for_sched_tasks(const char* sched_name, const char* sched_path) {
if ((fopen_s(&fp, sched_path, "r")) != 0) { if ((fopen_s(&fp, sched_path, "r")) != 0) {
//panic, create log entry, return 1; //panic, create log entry, return 1;
//no schedule file found. this is not normal //no schedule file found. this is not normal
log(LOGLEVEL::ERR, "[check_for_sched_tasks()]: Error opening schedule file: ", sched_path, " while checking for scheduled tasks; aborting");
delete[] command; delete[] command;
return 1; return 1;
} }
@@ -151,16 +153,14 @@ int check_for_sched_tasks(const char* sched_name, const char* sched_path) {
queue_entry[0] = '\0'; queue_entry[0] = '\0';
strcpy_s(queue_entry, 600, command); //copy the command strcpy_s(queue_entry, 600, command); //copy the command
strcat_s(queue_entry, 600, ";"); //add a ; to seperate command and path strcat_s(queue_entry, 600, ";"); //add a ; to seperate command and path
//printf("%d\n", strlen(path));
strcat_s(queue_entry, 600, path); //add the path strcat_s(queue_entry, 600, path); //add the path
//printf("%s::%d\n",queue_entry,strlen(queue_entry));
queue_push(queue_entry); queue_push(queue_entry);
delete[] queue_entry; delete[] queue_entry;
} }
} }
else { else {
//echo something was malformatted log(LOGLEVEL::ERR, "[check_for_sched_tasks()]: Error reading schedule file: ", sched_path, " while checking for scheduled tasks (malformat); aborting");
} }
delete[] datetime; delete[] datetime;
delete[] path; delete[] path;

View File

@@ -10,6 +10,11 @@ std::string get_loglevel(LOGLEVEL level) {
return "WARNING"; return "WARNING";
case LOGLEVEL::ERR: case LOGLEVEL::ERR:
return "ERROR"; return "ERROR";
case LOGLEVEL::VIRUS:
return "VIRUS";
case LOGLEVEL::RISK:
return "RISK";
default: default:
return "UNKNOWN"; return "UNKNOWN";
} }

View File

@@ -9,7 +9,9 @@
enum class LOGLEVEL { enum class LOGLEVEL {
INFO, INFO,
WARN, WARN,
ERR ERR,
VIRUS,
RISK
}; };
std::string get_loglevel(LOGLEVEL level); std::string get_loglevel(LOGLEVEL level);
@@ -18,8 +20,9 @@ template <typename... Args>
void log(LOGLEVEL level, const std::string& message, Args&&... args) { void log(LOGLEVEL level, const std::string& message, Args&&... args) {
std::string prefix = get_loglevel(level); std::string prefix = get_loglevel(level);
std::time_t now = std::time(nullptr); std::time_t now = std::time(nullptr);
std::tm tm = *std::localtime(&now); std::tm tm;
localtime_s(&tm, &now);
int error = 0;
std::ostringstream logStream; std::ostringstream logStream;
logStream << std::put_time(&tm, "%Y-%m-%d %H:%M:%S") << " " << prefix << " " << message; logStream << std::put_time(&tm, "%Y-%m-%d %H:%M:%S") << " " << prefix << " " << message;
if constexpr (sizeof...(args) > 0) { if constexpr (sizeof...(args) > 0) {
@@ -27,31 +30,62 @@ void log(LOGLEVEL level, const std::string& message, Args&&... args) {
} }
logStream << std::endl; logStream << std::endl;
std::string logString = logStream.str(); std::string logString = logStream.str();
printf("info from logger: %s", logString.c_str());
// Open the file based on log level // Open the file based on log level
std::ofstream logFile; FILE* fp;
switch (level) { switch (level) {
case LOGLEVEL::INFO: case LOGLEVEL::INFO:
logFile.open(INFOFILE, std::ios_base::app); error=fopen_s(&fp, INFOFILE, "a");
break; break;
case LOGLEVEL::WARN: case LOGLEVEL::WARN:
logFile.open(WARNFILE, std::ios_base::app); error=fopen_s(&fp, WARNFILE, "a");
break; break;
case LOGLEVEL::ERR: case LOGLEVEL::ERR:
logFile.open(ERRORFILE, std::ios_base::app); error=fopen_s(&fp, ERRORFILE, "a");
break;
case LOGLEVEL::VIRUS:
error=fopen_s(&fp, VIRUSFILE, "a");
break;
case LOGLEVEL::RISK:
error=fopen_s(&fp, RISKFILE, "a");
break;
default:
error=fopen_s(&fp, LOGFILE, "a");
break; break;
} }
if (error != 0) {
// Write the log to the file //panic, create log entry, return 1;
if (logFile.is_open()) { //printf("a");
logFile << logString.c_str(); return;
logFile.close(); }
else {
switch (level) {
case LOGLEVEL::INFO:
fprintf_s(fp, "%s", logString.c_str());
break;
case LOGLEVEL::WARN:
fprintf_s(fp, "%s", logString.c_str());
break;
case LOGLEVEL::ERR:
fprintf_s(fp, "%s", logString.c_str());
break;
case LOGLEVEL::VIRUS:
fprintf_s(fp, "%s", logString.c_str());
break;
case LOGLEVEL::RISK:
fprintf_s(fp, "%s", logString.c_str());
break;
default:
fprintf_s(fp, "%s", logString.c_str());
break;
}
fclose(fp);
if (fopen_s(&fp, LOGFILE, "a") == 0) {
fprintf_s(fp, "%s", logString.c_str());
fclose(fp);
} }
//write the log to the general file
logFile.open(LOGFILE, std::ios_base::app);
if (logFile.is_open()) {
logFile << logString.c_str();
logFile.close();
} }
} }

View File

@@ -46,97 +46,5 @@ BOOL create_file_protection(SECURITY_ATTRIBUTES* pSA)
&(pSA->lpSecurityDescriptor), &(pSA->lpSecurityDescriptor),
NULL); NULL);
} }
/*
BOOL CreateMyDACL(SECURITY_ATTRIBUTES*);
int main()
{
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = FALSE;
// Call function to set the DACL. The DACL
// is set in the SECURITY_ATTRIBUTES
// lpSecurityDescriptor member.
if (!CreateMyDACL(&sa))
{
// Error encountered; generate message and exit.
printf("Failed CreateMyDACL\n");
exit(1);
}
// Use the updated SECURITY_ATTRIBUTES to specify
// security attributes for securable objects.
// This example uses security attributes during
// creation of a new directory.
if (0 == CreateDirectory(TEXT("C:\\MyFolder"), &sa))
{
// Error encountered; generate message and exit.
printf("Failed CreateDirectory\n");
exit(1);
}
// Free the memory allocated for the SECURITY_DESCRIPTOR.
if (NULL != LocalFree(sa.lpSecurityDescriptor))
{
// Error encountered; generate message and exit.
printf("Failed LocalFree\n");
exit(1);
}
return 0;
}
// CreateMyDACL.
// Create a security descriptor that contains the DACL
// you want.
// This function uses SDDL to make Deny and Allow ACEs.
//
// Parameter:
// SECURITY_ATTRIBUTES * pSA
// Pointer to a SECURITY_ATTRIBUTES structure. It is your
// responsibility to properly initialize the
// structure and to free the structure's
// lpSecurityDescriptor member when you have
// finished using it. To free the structure's
// lpSecurityDescriptor member, call the
// LocalFree function.
//
// Return value:
// FALSE if the address to the structure is NULL.
// Otherwise, this function returns the value from the
// ConvertStringSecurityDescriptorToSecurityDescriptor
// function.
BOOL CreateMyDACL(SECURITY_ATTRIBUTES* pSA)
{
// Define the SDDL for the DACL. This example sets
// the following access:
// Built-in guests are denied all access.
// Anonymous logon is denied all access.
// Authenticated users are allowed
// read/write/execute access.
// Administrators are allowed full control.
// Modify these values as needed to generate the proper
// DACL for your application.
TCHAR* szSD = TEXT("D:")
TEXT("(D;OICI;GA;;;BG)") // Deny access to authenticated users
TEXT("(D;OICI;GA;;;AN)") // Deny access to authenticated users
//TEXT("(D;OICI;GA;;;AU)") // Deny access to authenticated users
TEXT("(A;OICI;GA;;;BA)"); // Allow full control to builtinadministrators
TEXT("(A;OICI;GA;;;AA)"); // Allow full control to administrators
if (NULL == pSA)
return FALSE;
return ConvertStringSecurityDescriptorToSecurityDescriptor(
szSD,
SDDL_REVISION_1,
&(pSA->lpSecurityDescriptor),
NULL);
}
*/
#endif #endif

View File

@@ -3,8 +3,8 @@
#include "queue_ctrl.h" #include "queue_ctrl.h"
#include <string.h> #include <string.h>
#define queue_limit 1000 #define queue_limit 1000
#define command_limit 100 #define command_limit 300
char queue[1000][100]; char queue[queue_limit][command_limit];
int queue_size = 0; int queue_size = 0;
int queue_start = 0; int queue_start = 0;
int queue_end = 0; int queue_end = 0;

View File

@@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by client_backend.rc
// N<>chste Standardwerte f<>r neue Objekte
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -6,16 +6,30 @@
#include <iostream> #include <iostream>
#include "md5hash.h" #include "md5hash.h"
#include <string> #include <string>
#include "well_known.h"
#include "log.h"
#include "virus_ctrl.h"
#ifndef SCAN_CPP #ifndef SCAN_CPP
#define SCAN_CPP #define SCAN_CPP
int cnt = 0; int cnt = 0;
bool file_exists(const std::string& filePath) {
DWORD fileAttributes = GetFileAttributes(filePath.c_str());
if (fileAttributes == INVALID_FILE_ATTRIBUTES) {
// The file does not exist or there was an error
return false;
}
// Check if it's a regular file and not a directory
return (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
void ListFilesRecursive(const std::string& directory, int thread_id) { void ListFilesRecursive(const std::string& directory, int thread_id) {
std::string search_path = directory + "\\*.*"; std::string search_path = directory + "\\*.*";
WIN32_FIND_DATA find_file_data; WIN32_FIND_DATA find_file_data;
HANDLE hFind = FindFirstFile(search_path.c_str(), &find_file_data); HANDLE hFind = FindFirstFile(search_path.c_str(), &find_file_data);
if (hFind == INVALID_HANDLE_VALUE) { if (hFind == INVALID_HANDLE_VALUE) {
std::cerr << "Error opening directory: " << directory << std::endl; log(LOGLEVEL::ERR, "[ListFilesRecursive()]: Error opening directory: ", directory, " while scanning files inside folder.");
return; return;
} }
@@ -53,20 +67,20 @@ void ListFilesRecursive(const std::string& directory, int thread_id) {
int scan_hash(const std::string& filename, const std::string& searchString) {//!!!! does not work with e.g. utf-16 or something like that. either ascii or utf8!! int scan_hash(const std::string& filename, const std::string& searchString) {//!!!! does not work with e.g. utf-16 or something like that. either ascii or utf8!!
HANDLE hFile = CreateFile(filename.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE hFile = CreateFile(filename.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE) { if (hFile == INVALID_HANDLE_VALUE) {
std::cerr << "Error: Unable to open the file." << std::endl; log(LOGLEVEL::ERR, "[scan_hash()]: Error opening database file: ", filename, " while searching for hash.", searchString);
return 2; return 2;
} }
HANDLE hMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL); HANDLE hMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
if (hMapping == NULL) { if (hMapping == NULL) {
std::cerr << "Error: Unable to create file mapping." << std::endl; log(LOGLEVEL::ERR, "[scan_hash()]: Error creating database file mapping: ", filename, " while searching for hash.");
CloseHandle(hFile); CloseHandle(hFile);
return 2; return 2;
} }
char* fileData = static_cast<char*>(MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0)); char* fileData = static_cast<char*>(MapViewOfFile(hMapping, FILE_MAP_READ, 0, 0, 0));
if (fileData == NULL) { if (fileData == NULL) {
std::cerr << "Error: Unable to map the file into memory." << std::endl; log(LOGLEVEL::ERR, "[scan_hash()]: Error mapping database file: ", filename, " while searching for hash.");
CloseHandle(hMapping); CloseHandle(hMapping);
CloseHandle(hFile); CloseHandle(hFile);
return 2; return 2;
@@ -90,4 +104,27 @@ int scan_hash(const std::string& filename, const std::string& searchString) {//!
CloseHandle(hFile); CloseHandle(hFile);
return 0; return 0;
} }
int scan_hash(const char* hash) {
char* path = new char[600];
path[0] = '\0';
sprintf_s(path, 595, "%s\\%c%c.jdbf", DB_DIR, hash[0],hash[1]);
return scan_hash(path,hash);
}
void action_scanfile(const char*filepath) {
if (strlen(filepath) == 0 or strcmp("", filepath) == 0 or file_exists(filepath)==false) {
log(LOGLEVEL::ERR, "[action_scanfile()]: Error opening file: ", filepath, " while scanning file for viruses.");
return; //no filepath given
}
char*hash = new char[300];
md5_file(filepath, hash);
if (scan_hash(hash)==1) { //virus found
log(LOGLEVEL::VIRUS, "[action_scanfile()]: Virus found in file: ", filepath);
//add it to a database which stores filepaths of infected files
virus_ctrl_store(filepath,hash,"sf");
//afterwards do the processing with that file
virus_ctrl_process("sf");
}
delete[] hash;
}
#endif #endif

View File

@@ -2,3 +2,6 @@
#include <string> #include <string>
void ListFilesRecursive(const std::string& directory,int thread_id); void ListFilesRecursive(const std::string& directory,int thread_id);
int scan_hash(const std::string& filename, const std::string& searchString); int scan_hash(const std::string& filename, const std::string& searchString);
int scan_hash(const char* hash);
int scan_hash(const char* hash);
void action_scanfile(const char* filepath);

View File

@@ -0,0 +1,127 @@
#ifndef SETTINGS_CPP
#define SETTINGS_CPP
#include "settings.h"
#include "well_known.h"
#include "log.h"
int setting_virus_ctrl_virus_found_action = 0;
char*setting_server_server_url = new char[300];
char exluded_folders[100][300];
int excluded_folders_size = 0;
void load_excluded_folders();
int load_settings() {
FILE* fp;
if (fopen_s(&fp, SETTINGS_DB, "r")!=0) {
log(LOGLEVEL::ERR, "[load_settings()]: Could not open settings file. ", SETTINGS_DB);
return 1;
}
else {
char*settings_cmd=new char[300];
char*settings_arg= new char[300];
while (!feof(fp)) {
fscanf_s(fp, "%s", settings_cmd, 295); // get the command
//now check which setting it is.
if (strcmp(settings_cmd, "virus_ctrl:virus_found:action") == 0) {
fscanf_s(fp, "%s", settings_arg, 295); // get the argument
if (strcmp(settings_arg, "remove") == 0) {
setting_virus_ctrl_virus_found_action = 1; //1=remove
}
else if (strcmp(settings_arg, "quarantine") == 0) {
setting_virus_ctrl_virus_found_action = 2; //2=quarantine
}
else if (strcmp(settings_arg, "ignore") == 0) {
setting_virus_ctrl_virus_found_action = 3; //3=ignore
}
else if (strcmp(settings_arg, "call_srv") == 0) {
setting_virus_ctrl_virus_found_action = 4; //4=call_srv <= only call the server and tell it, do not remove or quarantine
}
}
else if (strcmp(settings_cmd, "server:server_url") == 0) {
fscanf_s(fp, "%s", settings_arg, 295); // get the argument
strcpy_s(setting_server_server_url, 295, settings_arg);
}
}
delete[] settings_cmd;
delete[] settings_arg;
}
load_excluded_folders();
return 0;
}
//we have two different get_setting functions. One for int and one for char* return values
int get_setting(const char*setting_name) {
if (strcmp(setting_name, "virus_ctrl:virus_found:action") == 0) {
return setting_virus_ctrl_virus_found_action;
}
return -1;
}
int get_setting(const char* setting_name,char*out) {
if (strcmp(setting_name, "server:server_url") == 0) {
strcpy_s(out, 295, setting_server_server_url);
return 0;
}
return -1;
}
void load_excluded_folders() {
FILE* fp;
if (fopen_s(&fp, EXCLUDED_FOLDERS, "r") != 0) {
log(LOGLEVEL::ERR, "[load_excluded_folders()]: Could not open excluded folders file. ", EXCLUDED_FOLDERS);
return;
}
else {
char* path = new char[300];
while (!feof(fp)) {
//get the path of an excluded folder
path[0] = '\0';
//the path is encapsulated with "
int cnt = 0;
int chr = 0;
chr = fgetc(fp);
if (chr == '\"') {
chr = 0;
while (cnt < 295 && chr != '\"') {
chr = fgetc(fp); //get a char
if (chr != '\"')
path[cnt] = chr;
path[cnt + 1] = '\0';
cnt++;
}
//now add the path to the array
if (excluded_folders_size < 95) {
strcpy_s(exluded_folders[excluded_folders_size], 295, path);
excluded_folders_size++;
}
else {
log(LOGLEVEL::ERR, "[load_excluded_folders()]: Excluded folders array is full. Cannot add more folders.");
}
}
else {
log(LOGLEVEL::ERR, "[load_excluded_folders()]: Error while processing excluded folders database. Expected \" but got ", chr);
}
}
fclose(fp);
delete[] path;
}
}
bool is_folder_excluded(const char*path) {
for (int i = 0; i < excluded_folders_size; i++) {
if (strstr(path,exluded_folders[i]) != 0 and strcmp(exluded_folders[i],"")!=0 and strcmp(exluded_folders[i], " ") != 0 ) {
return true;
}
}
return false;
}
void print_exclusions() {
for (int i = 0; i < excluded_folders_size; i++) {
log(LOGLEVEL::INFO, "[print_exclusions()]: Excluded folder: ", exluded_folders[i]);
}
}
#endif

View File

@@ -0,0 +1,11 @@
#pragma once
#ifndef SETTINGS_H
#define SETTINGS_H
#include <iostream>
#include <Windows.h>
int get_setting(const char* setting_name);
int get_setting(const char* setting_name,char*out);
int load_settings();
bool is_folder_excluded(const char* path);
void print_exclusions();
#endif

View File

@@ -0,0 +1,48 @@
#ifndef THREAD_CTRL_CPP
#define THREAD_CTRL_CPP
#include "thread_ctrl.h"
void split(char* input,char*delimiter, char* out1, char* out2) {
//split a string at the delimiter. the delimiter only occurs once. so the first part is out1 and the second part is out2
int i = 0;
int j = 0;
int k = 0;
while (input[i] != '\0') {
if (input[i] == delimiter[0]) {
out1[j] = '\0';
i++;
while (input[i] != '\0') {
out2[k] = input[i];
i++;
k++;
}
out2[k] = '\0';
return;
}
else {
out1[j] = input[i];
i++;
j++;
}
}
}
int start_thread(const char*command) {
char*out2= new char[100]; //for the command
char*out1 = new char[300]; //for the arguments
split((char*)command, (char*)";", (char*)out1, (char*)out2);
//printf("out1: %s\n", out1);
//printf("out2: %s\n", out2);
//determine what should be executed
if(strcmp(out1,"scanfile")==0){
//start a new thread with the scanfile function
//std::thread t1(scanfile, out2);
}
delete[] out1;
delete[] out2;
return 0;
}
#endif

View File

@@ -0,0 +1,11 @@
#pragma once
#ifndef THREAD_CTRL_H
#define THREAD_CTRL_H
#include <iostream>
#include <Windows.h>
#include <thread>
#include <mutex>
int start_thread(const char*command);
#endif

View File

@@ -0,0 +1,116 @@
#ifndef VIRUS_CTRL_CPP
#define VIRUS_CTRL_CPP
#include "virus_ctrl.h"
#include "well_known.h"
#include "log.h"
#include "settings.h"
#include "connect.h"
int virus_ctrl_store(const char*path,const char*hash,const char*id) {
FILE* fp;
char *db_path = new char[300];
strcpy_s(db_path, 295,VIRUS_CTRL_DB);
strcat_s(db_path, 295, id);
if (fopen_s(&fp, db_path, "a") != 0) {
log(LOGLEVEL::ERR, "[virus_ctrl_store()]:Failed to open virus control database to store path of infected file: ",path);
delete[] db_path;
return 1;
}
else {
fprintf(fp, "\"%s\" \"%s\"\n", path, hash);
fclose(fp);
delete[] db_path;
return 0;
}
}
int virus_ctrl_process(const char* id) {
//take actions based on settings.
//eg delete infected files, quarantine them, etc
FILE* fp;
char* db_path = new char[300];
strcpy_s(db_path, 295, VIRUS_CTRL_DB);
strcat_s(db_path, 295, id);
if (fopen_s(&fp, db_path, "r") != 0) {
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Failed to open virus control database to process it.", VIRUS_CTRL_DB);
delete[] db_path;
return 1;
}
else {
while (!feof(fp)) {
//get a fulll path (enclosed with "")
char* path = new char[300];
char*hash = new char[300];
path[0] = '\0';
//search for starting ", then loop until ending "
int cnt = 0;
int chr = 0;
chr=fgetc(fp);
if (chr == '\"') {//get the location of the file
chr = 0;
while (cnt < 295 && chr != '\"') {
chr = fgetc(fp); //get a char
if (chr != '\"')
path[cnt] = chr;
path[cnt + 1] = '\0';
cnt++;
}
fscanf_s(fp, "%s", hash, 295); // get the hash of the file
char* quarantine_path = new char[300];
char* url = new char[300];
char* url_path = new char[300];
char* additional = new char[600];
switch (get_setting("virus_ctrl:virus_found:action")) {
case 1://remove
if(remove(path)!=0)
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while removing infected file: ", path," ",hash);
break;
case 2://quarantine
strcpy_s(quarantine_path, 295, QUARANTINE_PATH);
strcat_s(quarantine_path, 295, "\\");
strcat_s(quarantine_path, 295, hash);
if(rename(path,quarantine_path)!=0)
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while quarantining infected file: ", path," ",hash);
break;
case 3://ignore
//ignore this file and just continue. but for good measure we should log it
log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Virus found in file: ", path, " ", hash, " but ignored due to settings");
break;
case 4://notify
//call the server and say him that we have found a virus.
//we shoulkd also log it
log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Virus found in file: ", path, " ", hash, " but only notified due to settings");
url_path[0] = '\0';
url[0] = '\0';
strcpy_s(url_path, 295, "/api/add_log.php?entry=");
strcpy_s(additional, 600, "Virus found in file: ");
strcat_s(additional, 600, path);
strcat_s(additional, 600, " ");
strcat_s(additional, 600, hash);
get_setting("server:server_url", url);
if(call_srv(url,url_path,additional)!=0)
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while notifying server about virus: ", path," ",hash);
break;
}
delete[] quarantine_path;
delete[] url;
delete[] url_path;
delete[] additional;
}
else {
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while processing virus control database. Expected \" but got ", chr);
}
delete[] path;
delete[] hash;
}
fclose(fp);
}
remove(db_path);
delete[] db_path;
return 0;
}
#endif

View File

@@ -0,0 +1,8 @@
#pragma once
#ifndef VIRUS_CTRL_H
#define VIRUS_CTRL_H
#include <stdio.h>
#include <iostream>
int virus_ctrl_store(const char*, const char*,const char* id);
int virus_ctrl_process(const char* id);
#endif

View File

@@ -14,4 +14,22 @@
#define INFOFILE "C:\\Program Files\\cyberhex\\secure\\log\\info.txt" #define INFOFILE "C:\\Program Files\\cyberhex\\secure\\log\\info.txt"
#define WARNFILE "C:\\Program Files\\cyberhex\\secure\\log\\warn.txt" #define WARNFILE "C:\\Program Files\\cyberhex\\secure\\log\\warn.txt"
#define ERRORFILE "C:\\Program Files\\cyberhex\\secure\\log\\error.txt" #define ERRORFILE "C:\\Program Files\\cyberhex\\secure\\log\\error.txt"
#define VIRUSFILE "C:\\Program Files\\cyberhex\\secure\\log\\virus.txt"
#define RISKFILE "C:\\Program Files\\cyberhex\\secure\\log\\risk.txt"
#define FOLDER_DATABASE_DIR "C:\\Program Files\\cyberhex\\secure\\database\\folder"
#define DB_DIR "C:\\Program Files\\cyberhex\\secure\\database\\"
#define VIRUS_CTRL_DB "C:\\Program Files\\cyberhex\\secure\\database\\virus_ctrl_db.txt"
#define SETTINGS_DB "C:\\Program Files\\cyberhex\\secure\\settings\\settings_db.txt"
#define QUARANTINE_PATH "C:\\Program Files\\cyberhex\\secure\\quarantine\\"
#define PERIODIC_FOLDER_SCAN "C:\\Program Files\\cyberhex\\secure\\database\\folder\\periodic_folder_scan.txt"
#define PERIODIC_FOLDER_SCAN_TEMP_DB "C:\\Program Files\\cyberhex\\secure\\database\\folder\\temp_db.txt"
#define EXCLUDED_FOLDERS "C:\\Program Files\\cyberhex\\secure\\settings\\excluded_folders.txt"
#endif // !WELL_KNOWN_H #endif // !WELL_KNOWN_H

View File

@@ -0,0 +1 @@
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\TEAM TOOLS\STATIC ANALYSIS TOOLS\\RULE SETS\NATIVERECOMMENDEDRULES.RULESET

Binary file not shown.

View File

@@ -0,0 +1,35 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/app_ctrl.h"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "949745b3f4233286e01263aacdea68962f4ee9a816d9ff12990292b2831aaa2d"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,43 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/app_ctrl.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "a798c47c547aef22ce331b36f1ed7db111ddaf8fb940251a70fb676845d6be76"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/app_ctrl.h"
},
"hashes": {
"sha-256": "949745b3f4233286e01263aacdea68962f4ee9a816d9ff12990292b2831aaa2d"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,585 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS>
<DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "WaitForSingleObject". </DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "WaitForSingleObject" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT>
<DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "ResetEvent". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.</DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>299</LINE>
<COLUMN>23</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Verzweigung eintreten (Annahme: "waitStatus==(((((DWORD)0))+0))")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>300</LINE>
<COLUMN>35</COLUMN>
<KEYEVENT>
<ID>9</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "GetOverlappedResult" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\ioapiset.h:105 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>300</LINE>
<COLUMN>35</COLUMN>
<KEYEVENT>
<ID>10</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Verzweigung eintreten (Annahme: "&lt;Verzweigungsbedingung&gt;")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>302</LINE>
<COLUMN>41</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>305</LINE>
<COLUMN>35</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>307</LINE>
<COLUMN>26</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>310</LINE>
<COLUMN>48</COLUMN>
<KEYEVENT>
<ID>11</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Schleife überspringen (Annahme: "pInfo-&gt;NextEntryOffset!=0" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
<KEYEVENT>
<ID>12</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ResetEvent" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:323 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
<KEYEVENT>
<ID>13</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "ResetEvent" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT>
<DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "CloseHandle". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.</DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>299</LINE>
<COLUMN>23</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "waitStatus==(((((DWORD)0))+0))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>335</LINE>
<COLUMN>97</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
<KEYEVENT>
<ID>9</ID>
<KIND>usage</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Eingabe für "CloseHandle" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\handleapi.h:39 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
<KEYEVENT>
<ID>10</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "CloseHandle" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT>
</DEFECTS>

View File

@@ -0,0 +1,60 @@
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\vc143.pdb
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\vc143.idb
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\check_dir.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\check_dir.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\connect.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\connect.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_com.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_com.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_schedule.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_schedule.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\log.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\log.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\md5hash.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\md5hash.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\permissions.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\permissions.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\queue _ctrl.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\queue _ctrl.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\scan.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\scan.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\settings.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\settings.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\thread_ctrl.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\thread_ctrl.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\virus_ctrl.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\virus_ctrl.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\virus_ctrl.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\thread_ctrl.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\settings.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\scan.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\queue _ctrl.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\permissions.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\md5hash.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\log.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_schedule.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\local_com.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\connect.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\check_dir.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.ifc
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.ifc.d.json
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.ifcast
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.nativecodeanalysis.sarif
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.nativecodeanalysis.xml
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.obj
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\app_ctrl.h.module.json
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\cl.command.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\cl.read.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\cl.write.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\link.command.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\link.read.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend.tlog\link.write.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend_md.tlog\cl.command.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend_md.tlog\microsoft.build.cpptasks.cl.read.1.tlog
c:\users\janis\documents\projekte_mit_c\ma\ma\src\client_backend\x64\debug\client_backend_md.tlog\microsoft.build.cpptasks.cl.write.1.tlog

View File

@@ -1,3 +1,60 @@
 Quellen werden auf Modulabhängigkeiten überprüft...  Quellen werden auf Modulabhängigkeiten überprüft...
app_ctrl.h
Kompilieren...
app_ctrl.h
app_ctrl.cpp
check_dir.cpp
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(348,7): warning C4101: "fp": Unreferenzierte lokale Variable
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53): warning C4244: "Argument": Konvertierung von "wchar_t" in "const _Elem", möglicher Datenverlust
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53): warning C4244: with
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53): warning C4244: [
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53): warning C4244: _Elem=char
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53): warning C4244: ]
(Quelldatei „check_dir.cpp“ wird kompiliert)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2749,53):
der Vorlageninstanziierungskontext (der älteste zuerst) ist
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(147,29):
Siehe Verweis auf die gerade kompilierte Instanziierung "std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string<std::_String_iterator<std::_String_val<std::_Simple_types<_Elem>>>,0>(_Iter,_Iter,const _Alloc &)" der Funktions-Vorlage.
with
[
_Elem=wchar_t,
_Iter=std::_String_iterator<std::_String_val<std::_Simple_types<wchar_t>>>,
_Alloc=std::allocator<char>
]
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(147,29):
Ersten Verweis auf "std::basic_string<char,std::char_traits<char>,std::allocator<char>>::basic_string" in "process_changes" anzeigen
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\xstring(2590,17):
Siehe Verweis auf die gerade kompilierte Instanziierung "void std::basic_string<char,std::char_traits<char>,std::allocator<char>>::_Construct_from_iter<wchar_t*,wchar_t*,_Size_type>(_Iter,const _Sent,_Size)" der Funktions-Vorlage.
with
[
_Size_type=unsigned __int64,
_Iter=wchar_t *,
_Sent=wchar_t *,
_Size=unsigned __int64
]
client_backend.cpp client_backend.cpp
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(63,24): warning C4244: "Argument": Konvertierung von "_Rep" in "DWORD", möglicher Datenverlust
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(63,24): warning C4244: with
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(63,24): warning C4244: [
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(63,24): warning C4244: _Rep=__int64
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(63,24): warning C4244: ]
connect.cpp
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\connect.cpp(92,65): warning C4267: "Argument": Konvertierung von "size_t" nach "int", Datenverlust möglich
local_com.cpp
local_schedule.cpp
log.cpp
md5hash.cpp
permissions.cpp
queue _ctrl.cpp
scan.cpp
settings.cpp
thread_ctrl.cpp
virus_ctrl.cpp
Code Analysis für C/C++ wird ausgeführt...
Code wird generiert...
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\md5hash.cpp(36): warning C4715: "md5_file": Nicht alle Codepfade geben einen Wert zurück.
client_backend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe client_backend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(297): warning C6387: "overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "WaitForSingleObject".
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(313): warning C6387: "overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "ResetEvent". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(341): warning C6387: "overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "CloseHandle". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.

View File

@@ -0,0 +1,251 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/client_backend.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "0b5c7b60f8f756696ef8ce6a3d6fe99be51295fb3c82296bdd92234992bf03d1"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curl.h"
},
"hashes": {
"sha-256": "92f1cb78f6e7bde3889da35f627d393661d65734a2226824c6b8fd814a706b85"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curlver.h"
},
"hashes": {
"sha-256": "beca18fe096fb23ad478cf4283acf7befda740aca7987a0ff31826eabbec39d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/system.h"
},
"hashes": {
"sha-256": "c3d6c08073af28edaa73a6715afc0ac00ba0289c632d6ce6b654c5e7f98f98c2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/easy.h"
},
"hashes": {
"sha-256": "0890e063d2bea8ba815d747d4f665994e263e1043f0e14a85733c9445cb83a6d"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/multi.h"
},
"hashes": {
"sha-256": "3dd2ff1eeea4298f08d0aa5c6a46140644b6ee2e710ee8bc64513e732f32975c"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/urlapi.h"
},
"hashes": {
"sha-256": "dd631108b8503994fcf6c416eeaea2973822fc778ea2cff440c6b6e21c8712d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/options.h"
},
"hashes": {
"sha-256": "5716018d27e783283825bed2a8a051190487722fdeb64b7aa2d03a997e99b8d1"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/header.h"
},
"hashes": {
"sha-256": "614be48a86f4e5d304c5aa40ef1c85245e25b97732921c3631840146669d992f"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/websockets.h"
},
"hashes": {
"sha-256": "b58bb1d7eda3fd2372feb4d856c256897d83006dfe7933d69be54bc4a2ba5a3f"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/md5.h"
},
"hashes": {
"sha-256": "22d8a36f6528150f4355b304477a258a6c7ab06d642f9c8e2dd9e35cd480053b"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/macros.h"
},
"hashes": {
"sha-256": "d699d2286f1738cf935a2c6c7667be6d8a16c91874ec9cb7b93244b01526b9f2"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslconf.h"
},
"hashes": {
"sha-256": "8343f2eccc78f00a1cd05f7a994f341697213785370910afc1c7bf31cdf6fcb3"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/configuration.h"
},
"hashes": {
"sha-256": "d7d44be54377e736d9da5f531cda3c0152abd77cbf14d9c5800047afb507fb01"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslv.h"
},
"hashes": {
"sha-256": "4283184b7b71f4694728701afbe1316821933b394c7c8e69f180d7fa8d8084ff"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/e_os2.h"
},
"hashes": {
"sha-256": "59a517cccd94403c7037102f4beb10f33d5b8cf768a000ea8e730a23ec3e23a9"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/app_ctrl.h"
},
"hashes": {
"sha-256": "949745b3f4233286e01263aacdea68962f4ee9a816d9ff12990292b2831aaa2d"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/md5hash.h"
},
"hashes": {
"sha-256": "bcf666ca12d902c14ecda3ecc3ed614d1397094e13d0c4a455c186c7c7143eac"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/connect.h"
},
"hashes": {
"sha-256": "bad9339a042eb97ea79ae9a6b4bafe27f9c66a2c85a6f83a41e1b9194c669ea3"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/scan.h"
},
"hashes": {
"sha-256": "93690402b423cab6def672ef079470b67f8986d84cc9679fb807abed5b4f0e8c"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/queue_ctrl.h"
},
"hashes": {
"sha-256": "d1f0d8199a91544fced66cbbbbab8f712d5546c52155865be68abcdb07b7ebe9"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_com.h"
},
"hashes": {
"sha-256": "b43737b780f66ec5117bed01096c46eccfebb70bb258505faec8cf03f43aa840"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_schedule.h"
},
"hashes": {
"sha-256": "e5efa2ab8842e4c55f74723bdf41a1c961f7d335682a7148dfb2e0d9ff5f0cab"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/thread_ctrl.h"
},
"hashes": {
"sha-256": "4a2e011f91a655485ade3c858ea9e2ab4bb87d558107c32cf455530e55bd4cb1"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/settings.h"
},
"hashes": {
"sha-256": "4819503c32f357892d89be6f56a8b8c6626440ef20928090032995d32b271f3e"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/check_dir.h"
},
"hashes": {
"sha-256": "f210a5cfc0ed07c2fe76b3337d0ad6c96ed534cf7b8c7cc7031c0884e89eb3e8"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -1,5 +1,6 @@
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\app_ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\app_ctrl.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\app_ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\app_ctrl.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\app_ctrl.h;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\app_ctrl.h.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\app_ctrl.h;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\app_ctrl.h.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\check_dir.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\connect.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\connect.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\connect.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\connect.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\local_com.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\local_com.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\local_com.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\local_com.obj
@@ -9,3 +10,6 @@ C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\md5hash.cpp;C:\
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\permissions.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\permissions.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\permissions.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\permissions.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\queue _ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\queue _ctrl.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\queue _ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\queue _ctrl.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\scan.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\scan.obj C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\scan.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\scan.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\settings.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\settings.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\thread_ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\thread_ctrl.obj
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\virus_ctrl.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\virus_ctrl.obj

View File

@@ -1,3 +1,5 @@
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.vcxproj.CopyComplete
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\libcrypto-3-x64.dll C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\libcrypto-3-x64.dll
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe.lastcodeanalysissucceeded
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\NativeCodeAnalysis.read.1.tlog
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.vcxproj.CopyComplete

View File

@@ -0,0 +1,115 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/connect.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "200dddfcbc34917d89ba0e3bfacb01f053937193d5ea3a4fed31773203295d84"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/connect.h"
},
"hashes": {
"sha-256": "bad9339a042eb97ea79ae9a6b4bafe27f9c66a2c85a6f83a41e1b9194c669ea3"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curl.h"
},
"hashes": {
"sha-256": "92f1cb78f6e7bde3889da35f627d393661d65734a2226824c6b8fd814a706b85"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curlver.h"
},
"hashes": {
"sha-256": "beca18fe096fb23ad478cf4283acf7befda740aca7987a0ff31826eabbec39d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/system.h"
},
"hashes": {
"sha-256": "c3d6c08073af28edaa73a6715afc0ac00ba0289c632d6ce6b654c5e7f98f98c2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/easy.h"
},
"hashes": {
"sha-256": "0890e063d2bea8ba815d747d4f665994e263e1043f0e14a85733c9445cb83a6d"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/multi.h"
},
"hashes": {
"sha-256": "3dd2ff1eeea4298f08d0aa5c6a46140644b6ee2e710ee8bc64513e732f32975c"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/urlapi.h"
},
"hashes": {
"sha-256": "dd631108b8503994fcf6c416eeaea2973822fc778ea2cff440c6b6e21c8712d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/options.h"
},
"hashes": {
"sha-256": "5716018d27e783283825bed2a8a051190487722fdeb64b7aa2d03a997e99b8d1"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/header.h"
},
"hashes": {
"sha-256": "614be48a86f4e5d304c5aa40ef1c85245e25b97732921c3631840146669d992f"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/websockets.h"
},
"hashes": {
"sha-256": "b58bb1d7eda3fd2372feb4d856c256897d83006dfe7933d69be54bc4a2ba5a3f"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,59 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_com.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "1694750090e20779473ba6da483b0ee2831fe7afb94ae0076ac3d942887239d6"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_com.h"
},
"hashes": {
"sha-256": "b43737b780f66ec5117bed01096c46eccfebb70bb258505faec8cf03f43aa840"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/queue_ctrl.h"
},
"hashes": {
"sha-256": "d1f0d8199a91544fced66cbbbbab8f712d5546c52155865be68abcdb07b7ebe9"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,67 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_schedule.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "a0923f47b8bcdd0cbfcf7c0e4c1e447eead24a0714a825d98f17878b56929cbf"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/local_schedule.h"
},
"hashes": {
"sha-256": "e5efa2ab8842e4c55f74723bdf41a1c961f7d335682a7148dfb2e0d9ff5f0cab"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/queue_ctrl.h"
},
"hashes": {
"sha-256": "d1f0d8199a91544fced66cbbbbab8f712d5546c52155865be68abcdb07b7ebe9"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,51 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "47da46fe0fa2bd5079043d3c1c254b301ef0debe49abc0065d1556469590862e"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,91 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/md5hash.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "c25fd48fbf32c898f7f1e46480acef31c55550e2383484614d329f217472439a"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/md5hash.h"
},
"hashes": {
"sha-256": "bcf666ca12d902c14ecda3ecc3ed614d1397094e13d0c4a455c186c7c7143eac"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/md5.h"
},
"hashes": {
"sha-256": "22d8a36f6528150f4355b304477a258a6c7ab06d642f9c8e2dd9e35cd480053b"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/macros.h"
},
"hashes": {
"sha-256": "d699d2286f1738cf935a2c6c7667be6d8a16c91874ec9cb7b93244b01526b9f2"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslconf.h"
},
"hashes": {
"sha-256": "8343f2eccc78f00a1cd05f7a994f341697213785370910afc1c7bf31cdf6fcb3"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/configuration.h"
},
"hashes": {
"sha-256": "d7d44be54377e736d9da5f531cda3c0152abd77cbf14d9c5800047afb507fb01"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslv.h"
},
"hashes": {
"sha-256": "4283184b7b71f4694728701afbe1316821933b394c7c8e69f180d7fa8d8084ff"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/e_os2.h"
},
"hashes": {
"sha-256": "59a517cccd94403c7037102f4beb10f33d5b8cf768a000ea8e730a23ec3e23a9"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,43 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/permissions.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "fca3e64e0f3385a740e829ac450f17f7e10bcb763dcaad63890e694711c820cb"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/permissions.h"
},
"hashes": {
"sha-256": "2ba87ad7cae29b5ed6035d75517b23af7349bbcd06f6165d0b89acc9b1bd4529"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,43 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/queue _ctrl.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "2bd34dc79d49417dd5eddc04fcbe2a6e99e7bb07bc110d6cf2ee08405dd4d723"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/queue_ctrl.h"
},
"hashes": {
"sha-256": "d1f0d8199a91544fced66cbbbbab8f712d5546c52155865be68abcdb07b7ebe9"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,123 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/scan.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "f68f162ca50b11020397fc30abf12851804078b4c1d9290d1b9677e61ee6456c"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/scan.h"
},
"hashes": {
"sha-256": "93690402b423cab6def672ef079470b67f8986d84cc9679fb807abed5b4f0e8c"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/md5.h"
},
"hashes": {
"sha-256": "22d8a36f6528150f4355b304477a258a6c7ab06d642f9c8e2dd9e35cd480053b"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/macros.h"
},
"hashes": {
"sha-256": "d699d2286f1738cf935a2c6c7667be6d8a16c91874ec9cb7b93244b01526b9f2"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslconf.h"
},
"hashes": {
"sha-256": "8343f2eccc78f00a1cd05f7a994f341697213785370910afc1c7bf31cdf6fcb3"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/configuration.h"
},
"hashes": {
"sha-256": "d7d44be54377e736d9da5f531cda3c0152abd77cbf14d9c5800047afb507fb01"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/opensslv.h"
},
"hashes": {
"sha-256": "4283184b7b71f4694728701afbe1316821933b394c7c8e69f180d7fa8d8084ff"
}
},
{
"location": {
"uri": "file:///c:/program files/openssl-win64/include/openssl/e_os2.h"
},
"hashes": {
"sha-256": "59a517cccd94403c7037102f4beb10f33d5b8cf768a000ea8e730a23ec3e23a9"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/md5hash.h"
},
"hashes": {
"sha-256": "bcf666ca12d902c14ecda3ecc3ed614d1397094e13d0c4a455c186c7c7143eac"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/virus_ctrl.h"
},
"hashes": {
"sha-256": "370668c3f7272e3a80df4879078a37769551d11f38a94f2ffc515cc9258f219b"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,59 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/settings.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "f6ae3dd8774ea6b1339a52157a9fc8d877ef9612b31ac0e203371252b04ca312"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/settings.h"
},
"hashes": {
"sha-256": "4819503c32f357892d89be6f56a8b8c6626440ef20928090032995d32b271f3e"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,43 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/thread_ctrl.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "a764266c39119186634c38806543f9318ebc89b9ccc72b8597eb088c3195aa1d"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/thread_ctrl.h"
},
"hashes": {
"sha-256": "4a2e011f91a655485ade3c858ea9e2ab4bb87d558107c32cf455530e55bd4cb1"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -0,0 +1,580 @@
<?xml version="1.0" encoding="utf-8"?><DEFECTS><DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "WaitForSingleObject". </DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "WaitForSingleObject" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT><DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "ResetEvent". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.</DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>299</LINE>
<COLUMN>23</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Verzweigung eintreten (Annahme: "waitStatus==(((((DWORD)0))+0))")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>300</LINE>
<COLUMN>35</COLUMN>
<KEYEVENT>
<ID>9</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "GetOverlappedResult" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\ioapiset.h:105 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>300</LINE>
<COLUMN>35</COLUMN>
<KEYEVENT>
<ID>10</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Verzweigung eintreten (Annahme: "&lt;Verzweigungsbedingung&gt;")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>302</LINE>
<COLUMN>41</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>305</LINE>
<COLUMN>35</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>307</LINE>
<COLUMN>26</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>310</LINE>
<COLUMN>48</COLUMN>
<KEYEVENT>
<ID>11</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Schleife überspringen (Annahme: "pInfo-&gt;NextEntryOffset!=0" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
<KEYEVENT>
<ID>12</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ResetEvent" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:323 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>313</LINE>
<COLUMN>26</COLUMN>
<KEYEVENT>
<ID>13</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "ResetEvent" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT><DEFECT>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
</SFA>
<DEFECTCODE>6387</DEFECTCODE>
<DESCRIPTION>"overlapped.hEvent" könnte "0" sein: dies entspricht nicht der Spezifikation für Funktion "CloseHandle". In Zeile 297 finden Sie einen früheren Ort, an dem dies vorkommen kann.</DESCRIPTION>
<FUNCTION>monitor_directory</FUNCTION>
<DECORATED>?monitor_directory@@YAXPEBD@Z</DECORATED>
<FUNCLINE>252</FUNCLINE>
<PROBABILITY>1</PROBABILITY>
<RANK>4</RANK>
<CATEGORY>
<RULECATEGORY>mspft</RULECATEGORY>
</CATEGORY>
<PATH>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>1</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>254</LINE>
<COLUMN>11</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>264</LINE>
<COLUMN>13</COLUMN>
<KEYEVENT>
<ID>2</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "hDir==(((void *)(LONG_PTR)-1))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>270</LINE>
<COLUMN>20</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>271</LINE>
<COLUMN>9</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>274</LINE>
<COLUMN>15</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>275</LINE>
<COLUMN>10</COLUMN>
<KEYEVENT>
<ID>3</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Ausgabe von "memset" (in c:\program files\microsoft visual studio\2022\community\vc\tools\msvc\14.38.33130\include\vcruntime_string.h:63 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>276</LINE>
<COLUMN>22</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>4</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "ReadDirectoryChangesW" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\winbase.h:6994 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>286</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>5</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "&lt;Verzweigungsbedingung&gt;" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>292</LINE>
<COLUMN>96</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>295</LINE>
<COLUMN>11</COLUMN>
<KEYEVENT>
<ID>6</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>In diese Schleife eintreten (Annahme: "1")</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>296</LINE>
<COLUMN>14</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>297</LINE>
<COLUMN>14</COLUMN>
<KEYEVENT>
<ID>7</ID>
<KIND>declaration</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist ein Eingabe-/Ausgabeargument für "WaitForSingleObject" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\synchapi.h:346 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>299</LINE>
<COLUMN>23</COLUMN>
<KEYEVENT>
<ID>8</ID>
<KIND>branch</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>Diese Verzweigung überspringen (Annahme: "waitStatus==(((((DWORD)0))+0))" ist false)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>335</LINE>
<COLUMN>97</COLUMN>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
<KEYEVENT>
<ID>9</ID>
<KIND>usage</KIND>
<IMPORTANCE>Full</IMPORTANCE>
<MESSAGE>"overlapped" ist eine Eingabe für "CloseHandle" (in c:\program files (x86)\windows kits\10\include\10.0.22621.0\um\handleapi.h:39 deklariert)</MESSAGE>
</KEYEVENT>
</SFA>
<SFA>
<FILEPATH>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\</FILEPATH>
<FILENAME>check_dir.cpp</FILENAME>
<LINE>341</LINE>
<COLUMN>15</COLUMN>
<KEYEVENT>
<ID>10</ID>
<KIND>usage</KIND>
<IMPORTANCE>Essential</IMPORTANCE>
<MESSAGE>"overlapped.hEvent" sollte nicht NULL sein, da dies nicht der SAL-Anmerkung zu "CloseHandle" entspricht.</MESSAGE>
</KEYEVENT>
</SFA>
</PATH>
</DEFECT></DEFECTS>

View File

@@ -0,0 +1,147 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "PREfast Code Analysis",
"version": "14.38.33133.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/virus_ctrl.cpp"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "0323e1c21391e1d530ddade80910d6950ff168c723c057cf5f15425cb1f6d1ed"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/virus_ctrl.h"
},
"hashes": {
"sha-256": "370668c3f7272e3a80df4879078a37769551d11f38a94f2ffc515cc9258f219b"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/well_known.h"
},
"hashes": {
"sha-256": "3fc028c03de1be21fe5a60a58de0c9361001517acfceecd5809e755bdfd4cc97"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/log.h"
},
"hashes": {
"sha-256": "f126f1a4ec55d2abe6a914bb8afe743a9715574e25c7c168dac8a7ecd908e4ae"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/settings.h"
},
"hashes": {
"sha-256": "4819503c32f357892d89be6f56a8b8c6626440ef20928090032995d32b271f3e"
}
},
{
"location": {
"uri": "file:///c:/users/janis/documents/projekte_mit_c/ma/ma/src/client_backend/connect.h"
},
"hashes": {
"sha-256": "bad9339a042eb97ea79ae9a6b4bafe27f9c66a2c85a6f83a41e1b9194c669ea3"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curl.h"
},
"hashes": {
"sha-256": "92f1cb78f6e7bde3889da35f627d393661d65734a2226824c6b8fd814a706b85"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/curlver.h"
},
"hashes": {
"sha-256": "beca18fe096fb23ad478cf4283acf7befda740aca7987a0ff31826eabbec39d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/system.h"
},
"hashes": {
"sha-256": "c3d6c08073af28edaa73a6715afc0ac00ba0289c632d6ce6b654c5e7f98f98c2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/easy.h"
},
"hashes": {
"sha-256": "0890e063d2bea8ba815d747d4f665994e263e1043f0e14a85733c9445cb83a6d"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/multi.h"
},
"hashes": {
"sha-256": "3dd2ff1eeea4298f08d0aa5c6a46140644b6ee2e710ee8bc64513e732f32975c"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/urlapi.h"
},
"hashes": {
"sha-256": "dd631108b8503994fcf6c416eeaea2973822fc778ea2cff440c6b6e21c8712d2"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/options.h"
},
"hashes": {
"sha-256": "5716018d27e783283825bed2a8a051190487722fdeb64b7aa2d03a997e99b8d1"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/header.h"
},
"hashes": {
"sha-256": "614be48a86f4e5d304c5aa40ef1c85245e25b97732921c3631840146669d992f"
}
},
{
"location": {
"uri": "file:///c:/vcpkg/vcpkg-2023.08.09/installed/x64-windows/include/curl/websockets.h"
},
"hashes": {
"sha-256": "b58bb1d7eda3fd2372feb4d856c256897d83006dfe7933d69be54bc4a2ba5a3f"
}
}
]
}
]
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

View File

@@ -230,6 +230,9 @@ int main()
}if (error == 0){ }if (error == 0){
printf("Creating directory for database\n"); printf("Creating directory for database\n");
error = create_secure_folder(L"C:\\Program Files\\cyberhex\\secure\\database"); //create secure folder for hash database error = create_secure_folder(L"C:\\Program Files\\cyberhex\\secure\\database"); //create secure folder for hash database
}if (error == 0) {
printf("Creating directory for folder database\n");
error = create_secure_folder(L"C:\\Program Files\\cyberhex\\secure\\database\\folder"); //create secure folder for hash database
}if (error == 0){ }if (error == 0){
printf("Creating directory for settings\n"); printf("Creating directory for settings\n");
error = create_secure_folder(L"C:\\Program Files\\cyberhex\\secure\\settings"); //create secure folder for settings error = create_secure_folder(L"C:\\Program Files\\cyberhex\\secure\\settings"); //create secure folder for settings