diff --git a/src/client_backend/.vs/client_backend/v17/.suo b/src/client_backend/.vs/client_backend/v17/.suo index f06ff57..c436932 100644 Binary files a/src/client_backend/.vs/client_backend/v17/.suo and b/src/client_backend/.vs/client_backend/v17/.suo differ diff --git a/src/client_backend/.vs/client_backend/v17/Browse.VC.db b/src/client_backend/.vs/client_backend/v17/Browse.VC.db index 8c0940e..94c9ccf 100644 Binary files a/src/client_backend/.vs/client_backend/v17/Browse.VC.db and b/src/client_backend/.vs/client_backend/v17/Browse.VC.db differ diff --git a/src/client_backend/.vs/client_backend/v17/DocumentLayout.json b/src/client_backend/.vs/client_backend/v17/DocumentLayout.json index ab97381..4e3b206 100644 --- a/src/client_backend/.vs/client_backend/v17/DocumentLayout.json +++ b/src/client_backend/.vs/client_backend/v17/DocumentLayout.json @@ -2,6 +2,26 @@ "Version": 1, "WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:virus_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:client_backend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, + { + "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:md5hash.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + }, { "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:log.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -10,10 +30,6 @@ "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" }, - { - "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:client_backend.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" - }, { "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:log.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -30,10 +46,6 @@ "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" }, - { - "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:virus_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" - }, { "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:thread_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -42,14 +54,6 @@ "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:update.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" }, - { - "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" - }, - { - "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" - }, { "AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:local_schedule.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -74,11 +78,24 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 3, + "SelectedChildIndex": 16, "Children": [ { "$type": "Document", "DocumentIndex": 4, + "Title": "md5hash.cpp", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.cpp", + "RelativeDocumentMoniker": "md5hash.cpp", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.cpp", + "RelativeToolTip": "md5hash.cpp", + "ViewState": "AQIAAAwAAAAAAAAAAAAAACwAAAAnAAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2024-03-09T19:22:09.647Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, "Title": "settings.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.h", "RelativeDocumentMoniker": "settings.h", @@ -86,12 +103,11 @@ "RelativeToolTip": "settings.h", "ViewState": "AQIAAAAAAAAAAAAAAAAAAA8AAAAcAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-09T13:50:21.91Z", - "EditorCaption": "" + "WhenOpened": "2024-03-09T13:50:21.91Z" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 10, "Title": "connect.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.h", "RelativeDocumentMoniker": "connect.h", @@ -103,19 +119,20 @@ }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 2, "Title": "check_dir.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp", "RelativeDocumentMoniker": "check_dir.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp", "RelativeToolTip": "check_dir.cpp", - "ViewState": "AQIAACIBAAAAAAAAAAAkwEwBAAAZAAAA", + "ViewState": "AQIAAAUBAAAAAAAAAAAkwCYBAABhAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-02-25T13:36:05.414Z" + "WhenOpened": "2024-02-25T13:36:05.414Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 5, "Title": "log.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.h", "RelativeDocumentMoniker": "log.h", @@ -128,7 +145,7 @@ }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 7, "Title": "log.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.cpp", "RelativeDocumentMoniker": "log.cpp", @@ -136,12 +153,11 @@ "RelativeToolTip": "log.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAB8AAAAFAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-02-25T09:08:59.07Z", - "EditorCaption": "" + "WhenOpened": "2024-02-25T09:08:59.07Z" }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 14, "Title": "local_com.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp", "RelativeDocumentMoniker": "local_com.cpp", @@ -153,7 +169,7 @@ }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 9, "Title": "settings.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp", "RelativeDocumentMoniker": "settings.cpp", @@ -161,12 +177,11 @@ "RelativeToolTip": "settings.cpp", "ViewState": "AQIAALQAAAAAAAAAAAAAANEAAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.264Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.264Z" }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 11, "Title": "thread_ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp", "RelativeDocumentMoniker": "thread_ctrl.cpp", @@ -178,32 +193,33 @@ }, { "$type": "Document", - "DocumentIndex": 2, + "DocumentIndex": 3, "Title": "client_backend.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp", "RelativeDocumentMoniker": "client_backend.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp", "RelativeToolTip": "client_backend.cpp", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABkAAAAQAAAA", + "ViewState": "AQIAACEAAAAAAAAAAAAAAEYAAAA4AAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", "WhenOpened": "2024-01-28T20:40:06.279Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 10, + "DocumentIndex": 1, "Title": "scan.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp", "RelativeDocumentMoniker": "scan.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp", "RelativeToolTip": "scan.cpp", - "ViewState": "AQIAABgAAAAAAAAAAAAAAA4AAAAVAAAA", + "ViewState": "AQIAAEgAAAAAAAAAAAAAAGsAAAAYAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.248Z" + "WhenOpened": "2024-01-28T20:40:06.248Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 12, "Title": "update.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp", "RelativeDocumentMoniker": "update.cpp", @@ -215,7 +231,7 @@ }, { "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 13, "Title": "local_schedule.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp", "RelativeDocumentMoniker": "local_schedule.cpp", @@ -227,7 +243,7 @@ }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 16, "Title": "scan.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.h", "RelativeDocumentMoniker": "scan.h", @@ -239,7 +255,7 @@ }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 15, "Title": "queue _ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp", "RelativeDocumentMoniker": "queue _ctrl.cpp", @@ -251,7 +267,7 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 6, "Title": "connect.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp", "RelativeDocumentMoniker": "connect.cpp", @@ -259,20 +275,20 @@ "RelativeToolTip": "connect.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAABkAAAADAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.315Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.315Z" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 0, "Title": "virus_ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp", "RelativeDocumentMoniker": "virus_ctrl.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp", "RelativeToolTip": "virus_ctrl.cpp", - "ViewState": "AQIAADYAAAAAAAAAAAAAAGEAAAAvAAAA", + "ViewState": "AQIAADwAAAAAAAAAAAAAAGQAAAAmAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-02-18T12:49:41.861Z" + "WhenOpened": "2024-02-18T12:49:41.861Z", + "EditorCaption": "" } ] } diff --git a/src/client_backend/check_dir.cpp b/src/client_backend/check_dir.cpp index 4662798..d26f6c4 100644 --- a/src/client_backend/check_dir.cpp +++ b/src/client_backend/check_dir.cpp @@ -292,7 +292,8 @@ void monitor_directory(LPCSTR directory) { buffer, bufferSize, TRUE, - FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_FILE_NAME, + //FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_FILE_NAME, + FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE, NULL, &overlapped, NULL) == 0) { diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.ilk b/src/client_backend/client_backend/x64/Debug/client_backend.ilk index 1a9e12f..1b2b0d7 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.ilk and b/src/client_backend/client_backend/x64/Debug/client_backend.ilk differ diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.log b/src/client_backend/client_backend/x64/Debug/client_backend.log index 2463717..0e81600 100644 --- a/src/client_backend/client_backend/x64/Debug/client_backend.log +++ b/src/client_backend/client_backend/x64/Debug/client_backend.log @@ -1,6 +1,6 @@  Quellen werden auf Modulabhängigkeiten überprüft... check_dir.cpp -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(361,7): warning C4101: "fp": Unreferenzierte lokale Variable +C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(362,7): warning C4101: "fp": Unreferenzierte lokale Variable C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xutility(4537,18): warning C4244: "=": Konvertierung von "wchar_t" in "char", möglicher Datenverlust (Quelldatei „check_dir.cpp“ wird kompiliert) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xutility(4537,18): @@ -34,20 +34,4 @@ C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.3351 _SizeTy=unsigned __int64 ] - client_backend.cpp -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,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(106,24): warning C4244: with -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: [ -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: _Rep=__int64 -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: ] - local_schedule.cpp - log.cpp - md5hash.cpp - scan.cpp - settings.cpp - thread_ctrl.cpp - update.cpp - virus_ctrl.cpp - Code wird generiert... -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\md5hash.cpp(36,1): 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 diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.command.1.tlog b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.command.1.tlog index 696c8b0..faddcd1 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.command.1.tlog and b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.command.1.tlog differ diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.read.1.tlog b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.read.1.tlog index 9a90bde..46499f0 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.read.1.tlog and b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.read.1.tlog differ diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.write.1.tlog b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.write.1.tlog index 20ec9cb..7ba3b54 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.write.1.tlog and b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/CL.write.1.tlog differ diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog index 7ea327d..ea0c7e3 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog and b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog differ diff --git a/src/client_backend/client_backend/x64/Debug/vc143.idb b/src/client_backend/client_backend/x64/Debug/vc143.idb index 57e8e77..42e2f66 100644 Binary files a/src/client_backend/client_backend/x64/Debug/vc143.idb and b/src/client_backend/client_backend/x64/Debug/vc143.idb differ diff --git a/src/client_backend/client_backend/x64/Debug/vc143.pdb b/src/client_backend/client_backend/x64/Debug/vc143.pdb index 20d73bf..02401bb 100644 Binary files a/src/client_backend/client_backend/x64/Debug/vc143.pdb and b/src/client_backend/client_backend/x64/Debug/vc143.pdb differ diff --git a/src/client_backend/md5hash.cpp b/src/client_backend/md5hash.cpp index 0636624..a284c66 100644 --- a/src/client_backend/md5hash.cpp +++ b/src/client_backend/md5hash.cpp @@ -5,7 +5,8 @@ int md5_file( const char*path, char*md5Hash) { std::ifstream file(path, std::ios::binary); if (!file) { - log(LOGLEVEL::ERR, "[md5_file()]: Could not open file for scanning ",path); + //this creates way to many logs + //log(LOGLEVEL::ERR, "[md5_file()]: Could not open file for scanning ",path); return 1; } @@ -35,55 +36,14 @@ int md5_file( const char*path, char*md5Hash) { } } -//thread save implementation -/* -char* md5_file_t(const char*path) { - - //log(LOGLEVEL::INFO, "[md5_file_t()]: Calculating MD5 hash of file ", path_); - FILE* fp = fopen(path, "rb"); - if (!fp) { - log(LOGLEVEL::ERR, "[md5_file_t()]: Could not open file for scanning ", path); - return nullptr; - } - - // Initialize OpenSSL's MD5 context - MD5_CTX md5Context; - MD5_Init(&md5Context); - - // Read and update the context with the file's content - char buffer[1024]; - size_t bytesRead; - while ((bytesRead = fread(buffer, 1,1024, fp)) > 0) { - MD5_Update(&md5Context, buffer, bytesRead); - } - - // Finalize the MD5 hash and store it in result - unsigned char result[MD5_DIGEST_LENGTH]; - MD5_Final(result, &md5Context); - - // Close the file - fclose(fp); - - // Convert the MD5 hash to a string using snprintf - char* md5Hash = (char*)malloc(2 * MD5_DIGEST_LENGTH + 1); - if (!md5Hash) { - return nullptr; // Allocation failure - } - - for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { - snprintf(&md5Hash[i * 2], 3, "%02x", result[i]); - } - //log(LOGLEVEL::INFO, "[md5_file_t()]: MD5 hash of file ", path, " is ", md5Hash); - return md5Hash; -} -*/ //thread save implementation std::string md5_file_t(const std::string& path_) { //log(LOGLEVEL::INFO, "[md5_file_t()]: Calculating MD5 hash of file ", path_); thread_local std::string path (path_); thread_local FILE* fp = fopen(path.c_str(), "rb"); if (!fp) { - log(LOGLEVEL::WARN, "[md5_file_t()]: Could not open file for scanning ", path.c_str()); + //this creates way to many logs + //log(LOGLEVEL::WARN, "[md5_file_t()]: Could not open file for scanning ", path.c_str()); return path; //we return the path because else it moight crash ()if we sen da nullptr } diff --git a/src/client_backend/scan.cpp b/src/client_backend/scan.cpp index a714ba4..10101c1 100644 --- a/src/client_backend/scan.cpp +++ b/src/client_backend/scan.cpp @@ -104,7 +104,7 @@ int search_hash(const std::string& dbname_, const std::string& hash_, const std: // Search for the specific string in the file content thread_local size_t foundPos = fileContent.find(hash); if (foundPos != std::string::npos) { - log(LOGLEVEL::VIRUS, "[search_hash()]: Found virus: ", hash, " in file: ", filepath); + //log(LOGLEVEL::VIRUS, "[search_hash()]: Found virus: ", hash, " in file: ", filepath); virus_ctrl_store(filepath.c_str(), hash.c_str(), hash.c_str()); //afterwards do the processing with that file virus_ctrl_process(hash.c_str()); diff --git a/src/client_backend/virus_ctrl.cpp b/src/client_backend/virus_ctrl.cpp index 215777e..29f8853 100644 --- a/src/client_backend/virus_ctrl.cpp +++ b/src/client_backend/virus_ctrl.cpp @@ -64,6 +64,8 @@ int virus_ctrl_process( const char* id) { case 1://remove if(remove(path)!=0) log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while removing infected file: ", path," ",hash); + else + log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Removed Virus: ", path, " ", hash, ""); break; case 2://quarantine @@ -72,6 +74,8 @@ int virus_ctrl_process( const char* id) { 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); + else + log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Quarantined Virus: ", path, " ", hash, " to ", quarantine_path); break; case 3://ignore diff --git a/src/client_backend/x64/Debug/client_backend.pdb b/src/client_backend/x64/Debug/client_backend.pdb index 236c988..7465ba8 100644 Binary files a/src/client_backend/x64/Debug/client_backend.pdb and b/src/client_backend/x64/Debug/client_backend.pdb differ diff --git a/src/server/cyberhex-code/system/secure_zone/php/client_settings.php b/src/server/cyberhex-code/system/secure_zone/php/client_settings.php index a5b9194..81799ea 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/client_settings.php +++ b/src/server/cyberhex-code/system/secure_zone/php/client_settings.php @@ -600,7 +600,7 @@ function load_settings(){