diff --git a/src/client_backend/.vs/client_backend/v17/.suo b/src/client_backend/.vs/client_backend/v17/.suo index 885e892..27dcce4 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 def0043..6032572 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 c7e0c1d..6712d30 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\\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\\queue _ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:queue _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\\deepscan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:deepscan.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\\scan.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:scan.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\\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}" @@ -14,10 +34,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\\local_com.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:local_com.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\\deepscan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:deepscan.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\\deepscan.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:deepscan.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -38,26 +54,14 @@ "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_process.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:check_process.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\\utils.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:utils.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\\scan.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:scan.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\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:well_known.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\\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\\update.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:update.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -110,10 +114,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\\queue _ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", - "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:queue _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\\settings.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", "RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:settings.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" @@ -134,37 +134,24 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 10, + "SelectedChildIndex": 26, "Children": [ { "$type": "Document", - "DocumentIndex": 4, - "Title": "deepscan.h", - "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.h", - "RelativeDocumentMoniker": "deepscan.h", - "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.h", - "RelativeToolTip": "deepscan.h", - "ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAA6AAAA", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-31T08:30:49.097Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 2, "Title": "deepscan.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.cpp", "RelativeDocumentMoniker": "deepscan.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.cpp", "RelativeToolTip": "deepscan.cpp", - "ViewState": "AQIAAKoAAAAAAAAAAAAuwHYAAABpAAAA", + "ViewState": "AQIAAG8AAAAAAAAAAAAAAJIAAAAuAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", "WhenOpened": "2024-03-31T08:30:41.528Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 16, "Title": "zip.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\zip.cpp", "RelativeDocumentMoniker": "zip.cpp", @@ -176,7 +163,7 @@ }, { "$type": "Document", - "DocumentIndex": 18, + "DocumentIndex": 19, "Title": "security.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.h", "RelativeDocumentMoniker": "security.h", @@ -188,7 +175,7 @@ }, { "$type": "Document", - "DocumentIndex": 17, + "DocumentIndex": 18, "Title": "security.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.cpp", "RelativeDocumentMoniker": "security.cpp", @@ -200,7 +187,7 @@ }, { "$type": "Document", - "DocumentIndex": 19, + "DocumentIndex": 20, "Title": "md5hash.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.cpp", "RelativeDocumentMoniker": "md5hash.cpp", @@ -212,33 +199,31 @@ }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 4, "Title": "scan.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.h", "RelativeDocumentMoniker": "scan.h", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.h", "RelativeToolTip": "scan.h", - "ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAAuAAAA", + "ViewState": "AQIAAAAAAAAAAAAAAAAAABQAAABkAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-13T06:41:43.701Z", - "EditorCaption": "" + "WhenOpened": "2024-03-13T06:41:43.701Z" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 3, "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": "AQIAAN4AAAAAAAAAAAAawPYAAABTAAAA", + "ViewState": "AQIAAG8AAAAAAAAAAAAawHQAAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.248Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.248Z" }, { "$type": "Document", - "DocumentIndex": 25, + "DocumentIndex": 26, "Title": "connect.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp", "RelativeDocumentMoniker": "connect.cpp", @@ -250,7 +235,7 @@ }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 9, "Title": "client_backend.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp", "RelativeDocumentMoniker": "client_backend.cpp", @@ -258,12 +243,11 @@ "RelativeToolTip": "client_backend.cpp", "ViewState": "AQIAAEUAAAAAAAAAAAAAAHIAAAACAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.279Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.279Z" }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 5, "Title": "thread_ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp", "RelativeDocumentMoniker": "thread_ctrl.cpp", @@ -271,12 +255,11 @@ "RelativeToolTip": "thread_ctrl.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAVAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-13T06:52:01.533Z", - "EditorCaption": "" + "WhenOpened": "2024-03-13T06:52:01.533Z" }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 6, "Title": "local_com.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp", "RelativeDocumentMoniker": "local_com.cpp", @@ -284,12 +267,11 @@ "RelativeToolTip": "local_com.cpp", "ViewState": "AQIAAAMAAAAAAAAAAAAAAAsAAAAXAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-17T16:34:14.678Z", - "EditorCaption": "" + "WhenOpened": "2024-03-17T16:34:14.678Z" }, { "$type": "Document", - "DocumentIndex": 24, + "DocumentIndex": 25, "Title": "virus_ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp", "RelativeDocumentMoniker": "virus_ctrl.cpp", @@ -313,7 +295,7 @@ }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 10, "Title": "utils.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\utils.cpp", "RelativeDocumentMoniker": "utils.cpp", @@ -321,12 +303,11 @@ "RelativeToolTip": "utils.cpp", "ViewState": "AQIAAJYAAAAAAAAAAAAAAMEAAABnAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-14T15:55:22.469Z", - "EditorCaption": "" + "WhenOpened": "2024-03-14T15:55:22.469Z" }, { "$type": "Document", - "DocumentIndex": 23, + "DocumentIndex": 24, "Title": "app_ctrl.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h", "RelativeDocumentMoniker": "app_ctrl.h", @@ -338,7 +319,7 @@ }, { "$type": "Document", - "DocumentIndex": 2, + "DocumentIndex": 7, "Title": "local_com.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.h", "RelativeDocumentMoniker": "local_com.h", @@ -346,12 +327,11 @@ "RelativeToolTip": "local_com.h", "ViewState": "AQIAAAAAAAAAAAAAAAAAAAYAAAAXAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-13T06:49:41.823Z", - "EditorCaption": "" + "WhenOpened": "2024-03-13T06:49:41.823Z" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 11, "Title": "check_dir.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp", "RelativeDocumentMoniker": "check_dir.cpp", @@ -359,12 +339,11 @@ "RelativeToolTip": "check_dir.cpp", "ViewState": "AQIAAAYAAAAAAAAAAAAAADAAAABQAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-13T06:48:31.009Z", - "EditorCaption": "" + "WhenOpened": "2024-03-13T06:48:31.009Z" }, { "$type": "Document", - "DocumentIndex": 20, + "DocumentIndex": 21, "Title": "settings.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp", "RelativeDocumentMoniker": "settings.cpp", @@ -376,7 +355,7 @@ }, { "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 14, "Title": "well_known.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h", "RelativeDocumentMoniker": "well_known.h", @@ -384,12 +363,11 @@ "RelativeToolTip": "well_known.h", "ViewState": "AQIAAAgAAAAAAAAAAAAawC4AAAAZAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-14T13:20:06.953Z", - "EditorCaption": "" + "WhenOpened": "2024-03-14T13:20:06.953Z" }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 15, "Title": "update.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.h", "RelativeDocumentMoniker": "update.h", @@ -401,7 +379,7 @@ }, { "$type": "Document", - "DocumentIndex": 27, + "DocumentIndex": 1, "Title": "queue _ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp", "RelativeDocumentMoniker": "queue _ctrl.cpp", @@ -409,7 +387,8 @@ "RelativeToolTip": "queue _ctrl.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAACAAAAArAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.295Z" + "WhenOpened": "2024-01-28T20:40:06.295Z", + "EditorCaption": "" }, { "$type": "Document", @@ -425,7 +404,7 @@ }, { "$type": "Document", - "DocumentIndex": 26, + "DocumentIndex": 27, "Title": "connect.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.h", "RelativeDocumentMoniker": "connect.h", @@ -437,7 +416,7 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 12, "Title": "check_process.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_process.cpp", "RelativeDocumentMoniker": "check_process.cpp", @@ -445,12 +424,11 @@ "RelativeToolTip": "check_process.cpp", "ViewState": "AQIAAAwAAAAAAAAAAAAAADoAAABhAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-14T13:35:33.369Z", - "EditorCaption": "" + "WhenOpened": "2024-03-14T13:35:33.369Z" }, { "$type": "Document", - "DocumentIndex": 10, + "DocumentIndex": 13, "Title": "utils.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\utils.h", "RelativeDocumentMoniker": "utils.h", @@ -458,12 +436,11 @@ "RelativeToolTip": "utils.h", "ViewState": "AQIAAAAAAAAAAAAAAAAAABAAAAAVAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-03-14T15:55:30.524Z", - "EditorCaption": "" + "WhenOpened": "2024-03-14T15:55:30.524Z" }, { "$type": "Document", - "DocumentIndex": 16, + "DocumentIndex": 17, "Title": "zip.h", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\zip.h", "RelativeDocumentMoniker": "zip.h", @@ -475,15 +452,28 @@ }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 0, "Title": "update.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp", "RelativeDocumentMoniker": "update.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp", "RelativeToolTip": "update.cpp", - "ViewState": "AQIAAEUAAAAAAAAAAAAAAFcAAAAvAAAA", + "ViewState": "AQIAACcAAAAAAAAAAAAAAEoAAAAkAAAA", "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": 8, + "Title": "deepscan.h", + "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.h", + "RelativeDocumentMoniker": "deepscan.h", + "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\deepscan.h", + "RelativeToolTip": "deepscan.h", + "ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAA6AAAA", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", + "WhenOpened": "2024-03-31T08:30:49.097Z" }, { "$type": "Document", @@ -499,7 +489,7 @@ }, { "$type": "Document", - "DocumentIndex": 22, + "DocumentIndex": 23, "Title": "app_ctrl.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.cpp", "RelativeDocumentMoniker": "app_ctrl.cpp", @@ -511,7 +501,7 @@ }, { "$type": "Document", - "DocumentIndex": 21, + "DocumentIndex": 22, "Title": "local_schedule.cpp", "DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp", "RelativeDocumentMoniker": "local_schedule.cpp", 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 bd77e23..e663733 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 8f34749..648c73e 100644 --- a/src/client_backend/client_backend/x64/Debug/client_backend.log +++ b/src/client_backend/client_backend/x64/Debug/client_backend.log @@ -1,13 +1,2 @@  Quellen werden auf Modulabhängigkeiten überprüft... - client_backend.cpp -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(146,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(146,24): warning C4244: with -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(146,24): warning C4244: [ -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(146,24): warning C4244: _Rep=__int64 -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(146,24): warning C4244: ] - deepscan.cpp -C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\deepscan.cpp(119,46): warning C4018: ">=": Konflikt zwischen "signed" und "unsigned" - thread_ctrl.cpp - Code wird generiert... client_backend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe -C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\vcpkg.targets(228,5): warning : [vcpkg] Failed to gather app local DLL dependencies, program may not run. Set VcpkgApplocalDeps to false in your project file to suppress this warning. PowerShell arguments: -ExecutionPolicy Bypass -noprofile -File "C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe" "C:\vcpkg\vcpkg-2023.08.09\installed\x64-windows\debug\bin" "client_backend\x64\Debug\client_backend.tlog\client_backend.write.1u.tlog" "client_backend\x64\Debug\vcpkg.applocal.log" 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 929ce5f..44d43aa 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 d9a6cab..2c28f3e 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 d2d3ebb..1c1943f 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/vc143.idb b/src/client_backend/client_backend/x64/Debug/vc143.idb index 22f1fa9..4bfb7ea 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 4b16116..b36d331 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/deepscan.cpp b/src/client_backend/deepscan.cpp index 60af01a..76e55ac 100644 --- a/src/client_backend/deepscan.cpp +++ b/src/client_backend/deepscan.cpp @@ -144,7 +144,7 @@ void deepscan_folder(const std::string& directory) { printf("Processed %d files;\n", deep_cnt); //printf("Number of threads: %d\n", num_threads); } - if (deep_cnt % 1000 == 0) { + if (deep_cnt % 100 == 0) { int actual_threads = get_num_running_threads(); if (get_num_threads() > actual_threads) set_num_threads(actual_threads);//correct value of threads @@ -195,15 +195,21 @@ int process_callback(YR_SCAN_CONTEXT* context,int message, void* message_data, v bool deepscan_file_t(const std::string&file_path) { set_num_threads(get_num_threads() + 1); //we do not need to make a new instance of yara rules, because they are global and do not get deteled or modified - //std::lock_guard lock(yara_scan_mutex); thread_local std::string file_path_(file_path); - //get globally set yara rules and iterate over them - Callback_data* callback_data = new Callback_data(); - for (YR_RULES* rule : compiled_rules) { - callback_data->filepath = file_path_; - yr_rules_scan_file(rule, file_path.c_str(), 0, process_callback, callback_data, 5000); + //first we scan the file with the normal scanner, which means md5 + thread_local std::string hash(md5_file_t(file_path)); + thread_local char* db_path = new char[300]; + + sprintf_s(db_path, 295, "%s\\%c%c.jdbf", DB_DIR, hash[0], hash[1]); + if (search_hash(db_path, hash, file_path) != 1) { //if we allready found a match in the database, we do not need to scan the file with yara + //get globally set yara rules and iterate over them + Callback_data* callback_data = new Callback_data(); + for (YR_RULES* rule : compiled_rules) { + callback_data->filepath = file_path_; + yr_rules_scan_file(rule, file_path.c_str(), 0, process_callback, callback_data, 5000); + } + set_num_threads(get_num_threads() - 1); } - set_num_threads(get_num_threads() - 1); return true; } @@ -230,22 +236,27 @@ void action_deepscanfolder(const std::string& folderpath) { //for singlethreaded scans void action_deepscanfile(const std::string& filepath_) { thread_init(); - std::string filepath(filepath_); + std::string file_path(filepath_); char* db_path = new char[300]; - char* hash = new char[300]; action_deepscan_is_virus = 0; //printf("start\n"); - if (is_valid_path(filepath)) { //filter out invalid paths and paths with weird characters - deepscan_file_t(filepath); - if (action_deepscan_is_virus == 0) { - std::ofstream answer_com(ANSWER_COM_PATH, std::ios::app); - if (answer_com.is_open()) { - answer_com << "not_found " << "\"" << filepath << "\"" << " " << hash << " " << "no_action_taken" << "\n"; - answer_com.close(); + if (is_valid_path(file_path)) { //filter out invalid paths and paths with weird characters + //first scan the file with the normal scanner, which means md5 + thread_local char* db_path = new char[300]; + thread_local std::string hash(md5_file_t(file_path)); + sprintf_s(db_path, 295, "%s\\%c%c.jdbf", DB_DIR, hash[0], hash[1]); + if (search_hash(db_path, hash, file_path) != 1) { //if we allready found a match in the database, we do not need to scan the file with yara + deepscan_file_t(file_path); + if (action_deepscan_is_virus == 0) { + std::ofstream answer_com(ANSWER_COM_PATH, std::ios::app); + if (answer_com.is_open()) { + answer_com << "not_found " << "\"" << file_path << "\"" << " " << hash << " " << "no_action_taken" << "\n"; + answer_com.close(); + } } } } else - log(LOGLEVEL::INFO_NOSEND, "[action_scanfile()]: Invalid path: ", filepath_); + log(LOGLEVEL::INFO_NOSEND, "[action_scanfile()]: Invalid path: ", file_path); thread_shutdown(); } \ No newline at end of file diff --git a/src/client_backend/scan.h b/src/client_backend/scan.h index b1a18b1..71cd84b 100644 --- a/src/client_backend/scan.h +++ b/src/client_backend/scan.h @@ -18,4 +18,5 @@ void scan_file_t(const std::string& filepath_); int initialize(const std::string& folderPath); void scan_process_t(const std::string& filepath_); int get_num_files(const std::string& directory); +int search_hash(const std::string& dbname_, const std::string& hash_, const std::string& filepath_); void cleanup(); diff --git a/src/client_backend/update.cpp b/src/client_backend/update.cpp index 91478c3..ec45ad7 100644 --- a/src/client_backend/update.cpp +++ b/src/client_backend/update.cpp @@ -63,6 +63,28 @@ int update_system() { return 0; } +int update_yara(const std::string& folder_path) { + //remove the old databases + std::string path = folder_path + "\\"; + delete_all_files(folder_path); //remove all files in the folder + + std::string url = get_setting_string("server:server_url"); + if (url.empty() || url == "nan") { + return 2; // Invalid server URL + } + url += "/database_srv/yara.zip"; + std::string output_path = folder_path + "\\" + "yara.zip"; + int res = download_file_from_srv(url, output_path, get_setting("communication:unsafe_tls"), 1); + + if (res != 0) { + return 10; // Error downloading file + } + + //unzip the file + unzip(output_path, folder_path); + return 0; +} + int update_db2(const std::string&folder_path) { //remove the old databases std::string path = folder_path + "\\"; @@ -86,6 +108,7 @@ int update_db2(const std::string&folder_path) { } int update_db(const std::string& folder_path) { + update_yara(YARA_DB_DIR); //update the yara databases return update_db2(folder_path); //redirect to the new update funtion //this was the old code: diff --git a/src/client_backend/x64/Debug/client_backend.pdb b/src/client_backend/x64/Debug/client_backend.pdb index 9c53439..c28dd39 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/client_frontend/.vs/client_frontend/v17/.suo b/src/client_frontend/.vs/client_frontend/v17/.suo index 587de65..7ae2517 100644 Binary files a/src/client_frontend/.vs/client_frontend/v17/.suo and b/src/client_frontend/.vs/client_frontend/v17/.suo differ diff --git a/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db b/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db index 8666e90..bb3fd12 100644 Binary files a/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db and b/src/client_frontend/.vs/client_frontend/v17/Browse.VC.db differ diff --git a/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json b/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json index 15d304d..87631f9 100644 --- a/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json +++ b/src/client_frontend/.vs/client_frontend/v17/DocumentLayout.json @@ -24,7 +24,7 @@ "RelativeDocumentMoniker": "client_frontend.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend\\client_frontend.cpp", "RelativeToolTip": "client_frontend.cpp", - "ViewState": "AQIAAA4BAAAAAAAAAAAAADYBAAAQAAAA", + "ViewState": "AQIAADkAAAAAAAAAAAAwwFUAAABsAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", "WhenOpened": "2024-03-23T13:52:32.121Z", "EditorCaption": "" diff --git a/src/client_frontend/.vs/client_frontend/v17/Solution.VC.db b/src/client_frontend/.vs/client_frontend/v17/Solution.VC.db new file mode 100644 index 0000000..f0757c9 Binary files /dev/null and b/src/client_frontend/.vs/client_frontend/v17/Solution.VC.db differ diff --git a/src/client_frontend/client_frontend.cpp b/src/client_frontend/client_frontend.cpp index c57fdaf..0a4949f 100644 --- a/src/client_frontend/client_frontend.cpp +++ b/src/client_frontend/client_frontend.cpp @@ -9,6 +9,8 @@ #define IDM_SCAN_FILE 101 #define IDM_SCAN_FOLDER 102 +#define IDM_DEEP_SCAN_FILE 103 +#define IDM_DEEP_SCAN_FOLDER 104 std::wstring string_to_widestring(const std::string& str) { @@ -35,17 +37,23 @@ void update_textfield(HWND hWndTextField, const std::string& text) { SendMessage(hWndTextField, EM_REPLACESEL, FALSE, (LPARAM)string_to_widestring(text).c_str()); } -void scan_file(HWND hWndTextField, const std::string& filePath) { +void scan_file(HWND hWndTextField, const std::string& filePath, bool deep) { // Remove the answer file std::remove(ANSWER_COM_PATH); // Display the scanned file path in the window - update_textfield(hWndTextField, "Scanning file: " + filePath + "\r\n"); + if(!deep) + update_textfield(hWndTextField, "Scanning file: " + filePath + "\r\n"); + else + update_textfield(hWndTextField, "Deep scanning file: " + filePath + "\r\n"); bool answered = false; // Write command into com file //printf("%d\n",send_to_pipe("scanfile \"" + filePath + "\"")); std::ofstream outputFile(MAIN_COM_PATH); if (outputFile.is_open()) { - outputFile << "scanfile \"" << filePath << "\""; + if(!deep) + outputFile << "scanfile \"" << filePath << "\""; + else + outputFile << "deepscanfile \"" << filePath << "\""; outputFile.close(); } else { @@ -76,7 +84,6 @@ void scan_file(HWND hWndTextField, const std::string& filePath) { if (status == "found") { update_textfield(hWndTextField, "Virus found in file: " + scannedFilePath + "\r\n"); - update_textfield(hWndTextField, "File: " + scannedFilePath + " is infected\r\n"); update_textfield(hWndTextField, "Hash: " + hash + "\r\n"); update_textfield(hWndTextField, "Action taken: " + action + "\r\n"); @@ -103,19 +110,25 @@ void scan_file(HWND hWndTextField, const std::string& filePath) { } // Function to simulate folder scanning -void scan_folder(HWND hProgressBar,HWND hWndTextField, const std::string& folderPath) { +void scan_folder(HWND hProgressBar,HWND hWndTextField, const std::string& folderPath,bool deep) { //set progress bar to 0 SendMessage(hProgressBar, PBM_SETPOS, 0, 0); int num_of_found = 0; // Remove the answer file std::remove(ANSWER_COM_PATH); // Display the scanned folder path in the window - update_textfield(hWndTextField, "Scanning folder: " + folderPath + "\r\n"); + if(!deep) + update_textfield(hWndTextField, "Scanning folder: " + folderPath + "\r\n"); + else + update_textfield(hWndTextField, "Deep scanning folder: " + folderPath + "\r\n"); bool answered = false; // Write command into com file std::ofstream outputFile(MAIN_COM_PATH); if (outputFile.is_open()) { - outputFile << "scanfolder \"" << folderPath << "\""; + if(!deep) + outputFile << "scanfolder \"" << folderPath << "\""; + else + outputFile << "deepscanfolder \"" << folderPath << "\""; outputFile.close(); } else { @@ -147,7 +160,6 @@ void scan_folder(HWND hProgressBar,HWND hWndTextField, const std::string& folder if (status == "found") { update_textfield(hWndTextField, "Virus found in file: " + scannedFilePath + "\r\n"); - update_textfield(hWndTextField, "File: " + scannedFilePath + " is infected\r\n"); update_textfield(hWndTextField, "Hash: " + hash + "\r\n"); update_textfield(hWndTextField, "Action taken: " + action + "\r\n"); num_of_found++; @@ -168,7 +180,7 @@ void scan_folder(HWND hProgressBar,HWND hWndTextField, const std::string& folder std::string all_files; inputFile.ignore(1); // Ignore space inputFile >> all_files; - update_textfield(hWndTextField, "Folder scan started with "+ all_files +" files queued for scan\r\n"); + update_textfield(hWndTextField, "Folder scan started with "+ all_files +" files queued for scan\r\n\r\n"); } else if (status == "end") { answered = true; @@ -244,22 +256,32 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // Create the "Scan File" button CreateWindowEx(NULL, L"BUTTON", L"Scan File", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 20, 10, 100, 30, hWnd, (HMENU)IDM_SCAN_FILE, GetModuleHandle(NULL), NULL); + 20, 10, 150, 30, hWnd, (HMENU)IDM_SCAN_FILE, GetModuleHandle(NULL), NULL); // Create the "Scan Folder" button CreateWindowEx(NULL, L"BUTTON", L"Scan Folder", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, - 20, 50, 100, 30, hWnd, (HMENU)IDM_SCAN_FOLDER, GetModuleHandle(NULL), NULL); + 20, 50, 150, 30, hWnd, (HMENU)IDM_SCAN_FOLDER, GetModuleHandle(NULL), NULL); + + // Create the "Deep Scan File" button + CreateWindowEx(NULL, L"BUTTON", L"Deep Scan File", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 20, 90, 150, 30, hWnd, (HMENU)IDM_DEEP_SCAN_FILE, GetModuleHandle(NULL), NULL); + + // Create the "Deep Scan Folder" button + CreateWindowEx(NULL, L"BUTTON", L"Deep Scan Folder", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 20, 130, 150, 30, hWnd, (HMENU)IDM_DEEP_SCAN_FOLDER, GetModuleHandle(NULL), NULL); // Create a multi-line edit control for displaying text hWndTextField = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY, - 140, 10, width-140-20, height-10-50, hWnd, NULL, NULL, NULL); - update_textfield(hWndTextField, "Welcome to Cyberhex endpoint protection!\r\n"); + 190, 10, width-190-20, height-10-50, hWnd, NULL, NULL, NULL); + update_textfield(hWndTextField, "Welcome to Cyberhex endpoint protection!\r\n\r\n"); hProgressBar = CreateWindowEx(0, PROGRESS_CLASS, NULL, WS_CHILD | WS_VISIBLE | PBS_SMOOTH, - 140, height-40, 200, 20, hWnd, NULL, NULL, NULL); + 190, height-40, width - 190 - 20, 20, hWnd, NULL, NULL, NULL); SendMessage(hProgressBar, PBM_SETRANGE, 0, MAKELPARAM(0, 100)); SendMessage(hProgressBar, PBM_SETSTEP, 1, 0); } @@ -267,8 +289,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_SIZE: { // Resize the text field to fit the window - MoveWindow(hWndTextField, 140, 10, width - 140 - 20, height - 10 - 50, TRUE); - MoveWindow(hProgressBar, 140, height - 40, 200, 20, TRUE); + MoveWindow(hWndTextField, 190, 10, width - 190 - 20, height - 10 - 50, TRUE); + MoveWindow(hProgressBar, 190, height - 40, width - 190 - 20, 20, TRUE); break; } case WM_COMMAND: @@ -298,7 +320,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if (GetOpenFileName(&ofn) == TRUE) { std::wstring selectedFile = ofn.lpstrFile; // Use std::wstring for wide characters std::string narrowSelectedFile(selectedFile.begin(), selectedFile.end()); - std::thread(scan_file, hWndTextField, narrowSelectedFile).detach(); + std::thread(scan_file, hWndTextField, narrowSelectedFile,0).detach(); } } break; @@ -308,9 +330,44 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // Call scan_folder function in a separate thread std::string selected_folder = getFolderPath(hWnd); if(selected_folder!="") - std::thread(scan_folder,hProgressBar, hWndTextField, selected_folder).detach(); + std::thread(scan_folder,hProgressBar, hWndTextField, selected_folder,0).detach(); } break; + case IDM_DEEP_SCAN_FILE: + { + // Open file dialog to select a file + // Call scan_file function in a separate thread + OPENFILENAME ofn; + WCHAR szFile[MAX_PATH] = L""; // Use WCHAR for Unicode compatibility + + ZeroMemory(&ofn, sizeof(ofn)); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hWnd; + ofn.lpstrFile = szFile; + ofn.lpstrFile[0] = L'\0'; // Use wide character constant L'\0' + ofn.nMaxFile = sizeof(szFile); + ofn.lpstrFilter = L"All Files\0*.*\0"; // Use wide character string literal L"" + ofn.nFilterIndex = 1; + ofn.lpstrFileTitle = NULL; + ofn.lpstrInitialDir = NULL; + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; + + if (GetOpenFileName(&ofn) == TRUE) { + std::wstring selectedFile = ofn.lpstrFile; // Use std::wstring for wide characters + std::string narrowSelectedFile(selectedFile.begin(), selectedFile.end()); + std::thread(scan_file, hWndTextField, narrowSelectedFile, 1).detach(); + } + + } + break; + case IDM_DEEP_SCAN_FOLDER: + { + // Open folder picker dialog + // Call scan_folder function in a separate thread + std::string selected_folder = getFolderPath(hWnd); + if(selected_folder!="") + std::thread(scan_folder,hProgressBar, hWndTextField, selected_folder,1).detach(); + } default: return DefWindowProc(hWnd, message, wParam, lParam); } diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk b/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk index 550ba68..c9072ec 100644 Binary files a/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk and b/src/client_frontend/client_frontend/x64/Debug/client_frontend.ilk differ diff --git a/src/client_frontend/client_frontend/x64/Debug/client_frontend.log b/src/client_frontend/client_frontend/x64/Debug/client_frontend.log index 2eb302f..a5e6d0e 100644 --- a/src/client_frontend/client_frontend/x64/Debug/client_frontend.log +++ b/src/client_frontend/client_frontend/x64/Debug/client_frontend.log @@ -1 +1,36 @@ - client_frontend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.exe + client_frontend.cpp +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 „client_frontend.cpp“ wird kompiliert) + C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xutility(4537,18): + der Vorlageninstanziierungskontext (der älteste zuerst) ist + C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend.cpp(241,23): + Siehe Verweis auf die gerade kompilierte Instanziierung "std::basic_string,std::allocator>::basic_string>>,0>(_Iter,_Iter,const _Alloc &)" der Funktions-Vorlage. + with + [ + _Elem=wchar_t, + _Iter=std::_String_iterator>>, + _Alloc=std::allocator + ] + C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\client_frontend.cpp(241,5): + Ersten Verweis auf "std::basic_string,std::allocator>::basic_string" in "getFolderPath" anzeigen + C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xstring(2600,17): + Siehe Verweis auf die gerade kompilierte Instanziierung "void std::basic_string,std::allocator>::_Construct_from_iter(_Iter,const _Sent,_Size)" der Funktions-Vorlage. + with + [ + _Size_type=unsigned __int64, + _Iter=wchar_t *, + _Sent=wchar_t *, + _Size=unsigned __int64 + ] + C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\xstring(2756,18): + Siehe Verweis auf die gerade kompilierte Instanziierung "_OutIt *std::_Copy_n_unchecked4(_InIt,_SizeTy,_OutIt)" der Funktions-Vorlage. + with + [ + _OutIt=char *, + _Size=unsigned __int64, + _InIt=wchar_t *, + _SizeTy=unsigned __int64 + ] + + client_frontend.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.exe +C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\vcpkg.targets(228,5): warning : [vcpkg] Failed to gather app local DLL dependencies, program may not run. Set VcpkgApplocalDeps to false in your project file to suppress this warning. PowerShell arguments: -ExecutionPolicy Bypass -noprofile -File "C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend\x64\Debug\client_frontend.exe" "C:\vcpkg\vcpkg-2023.08.09\installed\x64-windows\debug\bin" "client_frontend\x64\Debug\client_frontend.tlog\client_frontend.write.1u.tlog" "client_frontend\x64\Debug\vcpkg.applocal.log" diff --git a/src/client_frontend/client_frontend/x64/Debug/vc143.idb b/src/client_frontend/client_frontend/x64/Debug/vc143.idb index db8b7b9..9b45063 100644 Binary files a/src/client_frontend/client_frontend/x64/Debug/vc143.idb and b/src/client_frontend/client_frontend/x64/Debug/vc143.idb differ diff --git a/src/client_frontend/client_frontend/x64/Debug/vc143.pdb b/src/client_frontend/client_frontend/x64/Debug/vc143.pdb index dcfd1c2..f708535 100644 Binary files a/src/client_frontend/client_frontend/x64/Debug/vc143.pdb and b/src/client_frontend/client_frontend/x64/Debug/vc143.pdb differ diff --git a/src/client_frontend/x64/Debug/client_frontend.pdb b/src/client_frontend/x64/Debug/client_frontend.pdb index d2b5d69..ccef433 100644 Binary files a/src/client_frontend/x64/Debug/client_frontend.pdb and b/src/client_frontend/x64/Debug/client_frontend.pdb differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo index ab5ce10..8fd8217 100644 Binary files a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/.suo differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db index 7122f31..940d0ca 100644 Binary files a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/Browse.VC.db differ diff --git a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin index 89117ee..2a5efe5 100644 Binary files a/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin and b/src/client_frontend_guilite/.vs/client_frontend_guilite/v17/fileList.bin differ diff --git a/src/ma_installer/.vs/ma_installer/v17/.suo b/src/ma_installer/.vs/ma_installer/v17/.suo index 9bd9fa6..459427b 100644 Binary files a/src/ma_installer/.vs/ma_installer/v17/.suo and b/src/ma_installer/.vs/ma_installer/v17/.suo differ diff --git a/src/ma_installer/.vs/ma_installer/v17/Browse.VC.db b/src/ma_installer/.vs/ma_installer/v17/Browse.VC.db index c774998..c997d44 100644 Binary files a/src/ma_installer/.vs/ma_installer/v17/Browse.VC.db and b/src/ma_installer/.vs/ma_installer/v17/Browse.VC.db differ diff --git a/src/server/cyberhex-code/api/php/database/compile_database.php b/src/server/cyberhex-code/api/php/database/compile_database.php index a3cffd3..b493f06 100644 --- a/src/server/cyberhex-code/api/php/database/compile_database.php +++ b/src/server/cyberhex-code/api/php/database/compile_database.php @@ -42,7 +42,7 @@ function sort_hashes($inputFile, $excluded) { } function download_files($excluded){ //download from virusshare - $file_count=485; + /*$file_count=485; for($i=0;$i<$file_count;$i++){ $fileNumber = sprintf('%05d', $i); $url="https://virusshare.com/hashfiles/VirusShare_$fileNumber.md5"; @@ -58,7 +58,15 @@ function download_files($excluded){ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $fileContents = curl_exec($ch); file_put_contents("/var/www/html/database_srv/buf.md5", $fileContents); - sort_hashes("/var/www/html/database_srv/buf.md5", $excluded); + sort_hashes("/var/www/html/database_srv/buf.md5", $excluded);*/ + //download yara rules + $url="https://jakach.duckdns.org/cyberhex/yara/yara.zip"; + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $fileContents = curl_exec($ch); + file_put_contents("/var/www/html/database_srv/yara.zip", $fileContents); + //unzip the yara rules + unzip("/var/www/html/database_srv/yara.zip","/var/www/html/database/"); } function create_zip($directory) { @@ -85,6 +93,23 @@ function create_zip($directory) { $zip->close(); } +function unzip($zipFile, $destination) { + // Create a new ZipArchive object + $zip = new ZipArchive; + + // Open the zip file + if ($zip->open($zipFile) === TRUE) { + // Extract all files to the destination directory + $zip->extractTo($destination); + + // Close the zip file + $zip->close(); + + return true; // Extraction successful + } else { + return false; // Failed to open the zip file + } +} include "../../../config.php"; @@ -129,7 +154,7 @@ $files = glob($directory . '/*'); foreach ($files as $file) { // Check if the file is a regular file (not a directory) if (is_file($file)) { - unlink($file); + //unlink($file); } } set_time_limit(0); diff --git a/src/server/cyberhex-code/api/php/database/get_update_status.php b/src/server/cyberhex-code/api/php/database/get_update_status.php index 17315ec..2746de0 100644 --- a/src/server/cyberhex-code/api/php/database/get_update_status.php +++ b/src/server/cyberhex-code/api/php/database/get_update_status.php @@ -9,7 +9,7 @@ $totalFiles = count($files) - (16 * 16); // Calculate the percentage - $percentage = ($totalFiles / 485) * 100; + $percentage = ($totalFiles / 485+5) * 100; // Ensure the percentage is within the range 0-100 $percentage = max(0, min(100, $percentage)); diff --git a/src/server/cyberhex-code/system/secure_zone/php/database_settings.php b/src/server/cyberhex-code/system/secure_zone/php/database_settings.php index 9c901b0..cc7e2f7 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/database_settings.php +++ b/src/server/cyberhex-code/system/secure_zone/php/database_settings.php @@ -125,6 +125,9 @@ async function add_item(db,element_id1,field1,element_id2,field2){ //we have two + +