updating installer
i updated all installers to use tasks instead of services, made the uninstaller to work, and overworked the whole installing process
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
495
src/client_backend/.vs/client_backend/v17/DocumentLayout.json
Normal file
495
src/client_backend/.vs/client_backend/v17/DocumentLayout.json
Normal file
@@ -0,0 +1,495 @@
|
||||
{
|
||||
"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\\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\\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.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}"
|
||||
},
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"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.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:settings.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.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\\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}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:security.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}"
|
||||
},
|
||||
{
|
||||
"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}"
|
||||
},
|
||||
{
|
||||
"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\\local_com.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:local_com.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\\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\\security.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:security.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\\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}"
|
||||
},
|
||||
{
|
||||
"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.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:check_dir.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\\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\\thread_ctrl.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:thread_ctrl.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\\local_schedule.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:local_schedule.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\\queue_ctrl.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:queue_ctrl.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\\app_ctrl.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:app_ctrl.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\\app_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:app_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\\md5hash.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:md5hash.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\\permissions.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:permissions.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\\permissions.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:permissions.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"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": "AQIAAAcAAAAAAAAAAAAAAAcAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-02-18T12:49:41.861Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 15,
|
||||
"Title": "security.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.h",
|
||||
"RelativeDocumentMoniker": "security.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.h",
|
||||
"RelativeToolTip": "security.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAFAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-02-17T09:05:01.412Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 8,
|
||||
"Title": "security.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.cpp",
|
||||
"RelativeDocumentMoniker": "security.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\security.cpp",
|
||||
"RelativeToolTip": "security.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAEIAAAAMAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-02-17T09:04:52.66Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 16,
|
||||
"Title": "settings.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.h",
|
||||
"RelativeDocumentMoniker": "settings.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.h",
|
||||
"RelativeToolTip": "settings.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAAXAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.248Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "settings.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
||||
"RelativeDocumentMoniker": "settings.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
||||
"RelativeToolTip": "settings.cpp",
|
||||
"ViewState": "AQIAAA8AAAAAAAAAAAAAAFMAAAA1AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.264Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 19,
|
||||
"Title": "thread_ctrl.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.h",
|
||||
"RelativeDocumentMoniker": "thread_ctrl.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.h",
|
||||
"RelativeToolTip": "thread_ctrl.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAAlAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.264Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 10,
|
||||
"Title": "thread_ctrl.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp",
|
||||
"RelativeDocumentMoniker": "thread_ctrl.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp",
|
||||
"RelativeToolTip": "thread_ctrl.cpp",
|
||||
"ViewState": "AQIAABUAAAAAAAAAAAAAACAAAAAnAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.264Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 17,
|
||||
"Title": "check_dir.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.h",
|
||||
"RelativeDocumentMoniker": "check_dir.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.h",
|
||||
"RelativeToolTip": "check_dir.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAqAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.264Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 13,
|
||||
"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": "AQIAAH4AAAAAAAAAAAAAAI0AAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.279Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"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": "AQIAAAAAAAAAAAAAAAAAACQAAAAsAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "well_known.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeDocumentMoniker": "well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 11,
|
||||
"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": "AQIAAHQAAAAAAAAAAAAjwH4AAAAQAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.248Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"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": "AQIAAAAAAAAAAAAAAAAAABgAAABPAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.248Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"Title": "local_schedule.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp",
|
||||
"RelativeDocumentMoniker": "local_schedule.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp",
|
||||
"RelativeToolTip": "local_schedule.cpp",
|
||||
"ViewState": "AQIAAHIAAAAAAAAAAAAjwJcAAABKAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 9,
|
||||
"Title": "update.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.h",
|
||||
"RelativeDocumentMoniker": "update.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.h",
|
||||
"RelativeToolTip": "update.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAUAAAAlAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "log.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.h",
|
||||
"RelativeDocumentMoniker": "log.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.h",
|
||||
"RelativeToolTip": "log.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAFYAAAASAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "log.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.cpp",
|
||||
"RelativeDocumentMoniker": "log.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\log.cpp",
|
||||
"RelativeToolTip": "log.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAAYAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 20,
|
||||
"Title": "local_schedule.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.h",
|
||||
"RelativeDocumentMoniker": "local_schedule.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.h",
|
||||
"RelativeToolTip": "local_schedule.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAAvAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 21,
|
||||
"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": "AQIAAAAAAAAAAAAAAAAAAA4AAAAdAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 22,
|
||||
"Title": "queue_ctrl.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue_ctrl.h",
|
||||
"RelativeDocumentMoniker": "queue_ctrl.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue_ctrl.h",
|
||||
"RelativeToolTip": "queue_ctrl.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAXAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 23,
|
||||
"Title": "queue _ctrl.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp",
|
||||
"RelativeDocumentMoniker": "queue _ctrl.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp",
|
||||
"RelativeToolTip": "queue _ctrl.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAUAAAAaAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"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",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h",
|
||||
"RelativeToolTip": "app_ctrl.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAbAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.31Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 25,
|
||||
"Title": "app_ctrl.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.cpp",
|
||||
"RelativeDocumentMoniker": "app_ctrl.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.cpp",
|
||||
"RelativeToolTip": "app_ctrl.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAAPAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.31Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 26,
|
||||
"Title": "md5hash.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.h",
|
||||
"RelativeDocumentMoniker": "md5hash.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\md5hash.h",
|
||||
"RelativeToolTip": "md5hash.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAAxAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.315Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 27,
|
||||
"Title": "permissions.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\permissions.cpp",
|
||||
"RelativeDocumentMoniker": "permissions.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\permissions.cpp",
|
||||
"RelativeToolTip": "permissions.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABYAAAABAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.315Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 14,
|
||||
"Title": "connect.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
||||
"RelativeDocumentMoniker": "connect.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
||||
"RelativeToolTip": "connect.cpp",
|
||||
"ViewState": "AQIAACoAAAAAAAAAAAAAADkAAAARAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.315Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 12,
|
||||
"Title": "local_com.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp",
|
||||
"RelativeDocumentMoniker": "local_com.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp",
|
||||
"RelativeToolTip": "local_com.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAAXAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.217Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 18,
|
||||
"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": "AQIAAEYAAAAAAAAAAABBwFYAAABdAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.248Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 28,
|
||||
"Title": "permissions.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\permissions.h",
|
||||
"RelativeDocumentMoniker": "permissions.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\permissions.h",
|
||||
"RelativeToolTip": "permissions.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAA4AAAASAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-01-28T20:40:06.315Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21,20 +21,26 @@
|
||||
int main() {
|
||||
log(LOGLEVEL::INFO, "[main()]:Starting main thread.");
|
||||
printf("welcome to the jakach security tool main thread\n");
|
||||
load_settings();//load the settings from the settings file
|
||||
if (update_settings("settings")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
if (load_settings() == 0) {//load the settings from the settings file
|
||||
if (update_settings("settings")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
if (update_settings("rtp_included")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
if (update_settings("rtp_excluded")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
if (update_settings("sched")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
load_settings(); //load the updated settings from the settings file
|
||||
}
|
||||
if (update_settings("rtp_included")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
if (update_settings("rtp_excluded")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
if (update_settings("sched")) { //update the settings from the server
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings from server.");
|
||||
}
|
||||
load_settings();
|
||||
else {
|
||||
log(LOGLEVEL::ERR, "[main()]:Could not load settings from file.");
|
||||
log(LOGLEVEL::PANIC, "[main()]:Panic, no settings file loaded, terminating process!");
|
||||
exit(0);
|
||||
}
|
||||
initialize(DB_DIR); //load the hash databases into memory
|
||||
|
||||
//start a second thread which will scan for new files
|
||||
|
||||
BIN
src/client_backend/client_backend/x64/Debug/app_ctrl.h.ifc
Normal file
BIN
src/client_backend/client_backend/x64/Debug/app_ctrl.h.ifc
Normal file
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Version": "1.2",
|
||||
"Data": {
|
||||
"Source": "c:\\users\\janis\\documents\\projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h",
|
||||
"ProvidedModule": "",
|
||||
"Includes": [],
|
||||
"ImportedModules": [],
|
||||
"ImportedHeaderUnits": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"version": 1,
|
||||
"revision": 0,
|
||||
"rules": [
|
||||
{
|
||||
"primary-output": "client_backend\\x64\\Debug\\app_ctrl.h.obj",
|
||||
"outputs": [
|
||||
"C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend\\x64\\Debug\\vc143.pdb",
|
||||
"client_backend\\x64\\Debug\\",
|
||||
"C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend\\x64\\Debug\\app_ctrl.h.ifc"
|
||||
],
|
||||
"provides": [
|
||||
{
|
||||
"logical-name": "app_ctrl.h",
|
||||
"source-path": "c:\\users\\janis\\documents\\projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h",
|
||||
"lookup-method": "absolute"
|
||||
}
|
||||
],
|
||||
"requires": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Version": "1.2",
|
||||
"Data": {
|
||||
"Source": "c:\\users\\janis\\documents\\projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h",
|
||||
"ProvidedModule": "",
|
||||
"Includes": [],
|
||||
"ImportedModules": [],
|
||||
"ImportedHeaderUnits": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Version": "1.1",
|
||||
"Data": {
|
||||
"Source": "c:\\users\\janis\\documents\\projekte_mit_c\\ma\\ma\\src\\client_backend\\app_ctrl.h",
|
||||
"ProvidedModule": "",
|
||||
"ImportedModules": [],
|
||||
"ImportedHeaderUnits": []
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
src/client_backend/client_backend/x64/Debug/client_backend.ilk
Normal file
BIN
src/client_backend/client_backend/x64/Debug/client_backend.ilk
Normal file
Binary file not shown.
@@ -0,0 +1,57 @@
|
||||
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:\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):
|
||||
der Vorlageninstanziierungskontext (der älteste zuerst) ist
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\check_dir.cpp(155,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(155,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.39.33519\include\xstring(2600,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
|
||||
]
|
||||
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<wchar_t*,_Size,char*>(_InIt,_SizeTy,_OutIt)" der Funktions-Vorlage.
|
||||
with
|
||||
[
|
||||
_OutIt=char *,
|
||||
_Size=unsigned __int64,
|
||||
_InIt=wchar_t *,
|
||||
_SizeTy=unsigned __int64
|
||||
]
|
||||
|
||||
client_backend.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(88,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(88,24): warning C4244: with
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(88,24): warning C4244: [
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(88,24): warning C4244: _Rep=__int64
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(88,24): warning C4244: ]
|
||||
connect.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\connect.cpp(118,65): warning C4267: "Argument": Konvertierung von "size_t" nach "int", Datenverlust möglich
|
||||
local_com.cpp
|
||||
local_schedule.cpp
|
||||
log.cpp
|
||||
md5hash.cpp
|
||||
scan.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\scan.cpp(153,32): warning C4018: ">=": Konflikt zwischen "signed" und "unsigned"
|
||||
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
|
||||
BIN
src/client_backend/client_backend/x64/Debug/client_backend.res
Normal file
BIN
src/client_backend/client_backend/x64/Debug/client_backend.res
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
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\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\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\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\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\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\client_backend\x64\Debug\local_com.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\local_schedule.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\local_schedule.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\log.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\log.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\md5hash.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\md5hash.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\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\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\client_backend\x64\Debug\scan.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\security.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\security.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\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\client_backend\x64\Debug\thread_ctrl.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\update.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\update.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\client_backend\x64\Debug\virus_ctrl.obj
|
||||
@@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows:
|
||||
Debug|x64|C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\APP_CTRL.H.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\APP_CTRL.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\CHECK_DIR.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\CLIENT_BACKEND.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\CLIENT_BACKEND.RES|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\CONNECT.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\LOCAL_COM.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\LOCAL_SCHEDULE.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\LOG.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\MD5HASH.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\PERMISSIONS.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\QUEUE _CTRL.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\SCAN.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\SECURITY.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\SETTINGS.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\THREAD_CTRL.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\UPDATE.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_BACKEND\CLIENT_BACKEND\X64\DEBUG\VIRUS_CTRL.OBJ
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend\x64\Debug\client_backend.ilk
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
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\client_backend\x64\Debug\client_b.C1767528.Up2Date
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/client_backend/client_backend/x64/Debug/vc143.idb
Normal file
BIN
src/client_backend/client_backend/x64/Debug/vc143.idb
Normal file
Binary file not shown.
BIN
src/client_backend/client_backend/x64/Debug/vc143.pdb
Normal file
BIN
src/client_backend/client_backend/x64/Debug/vc143.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\libcrypto-3-x64.dll
|
||||
@@ -14,6 +14,8 @@ std::string get_loglevel(LOGLEVEL level) {
|
||||
return "VIRUS";
|
||||
case LOGLEVEL::RISK:
|
||||
return "RISK";
|
||||
case LOGLEVEL::PANIC:
|
||||
return "PANIC";
|
||||
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
|
||||
@@ -11,7 +11,8 @@ enum class LOGLEVEL {
|
||||
WARN,
|
||||
ERR,
|
||||
VIRUS,
|
||||
RISK
|
||||
RISK,
|
||||
PANIC
|
||||
};
|
||||
|
||||
std::string get_loglevel(LOGLEVEL level);
|
||||
@@ -54,6 +55,9 @@ void log(LOGLEVEL level, const std::string& message, Args&&... args) {
|
||||
case LOGLEVEL::RISK:
|
||||
error=fopen_s(&fp, RISKFILE, "a");
|
||||
break;
|
||||
case LOGLEVEL::PANIC:
|
||||
error = fopen_s(&fp, PANICFILE, "a");
|
||||
break;
|
||||
|
||||
default:
|
||||
error=fopen_s(&fp, LOGFILE, "a");
|
||||
@@ -81,6 +85,9 @@ void log(LOGLEVEL level, const std::string& message, Args&&... args) {
|
||||
case LOGLEVEL::RISK:
|
||||
fprintf_s(fp, "%s", logString.c_str());
|
||||
break;
|
||||
case LOGLEVEL::PANIC:
|
||||
fprintf_s(fp, "%s", logString.c_str());
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf_s(fp, "%s", logString.c_str());
|
||||
|
||||
@@ -12,15 +12,17 @@ int check_cert(const char*cert,const char*secrets_path) {
|
||||
if (strcmp("cert", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
if (strcmp(cert, secrets) == 0) {
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 2;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
char* get_apikey(const char* secrets_path) {
|
||||
FILE* fp;
|
||||
@@ -33,12 +35,15 @@ char* get_apikey(const char* secrets_path) {
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
if (strcmp("apikey", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
fclose(fp);
|
||||
return secrets;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
char* get_machineid(const char*secrets_path){
|
||||
FILE* fp;
|
||||
@@ -51,10 +56,13 @@ char* get_machineid(const char*secrets_path){
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
if (strcmp("machineid", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fclose(fp);
|
||||
return secrets;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
@@ -17,7 +17,7 @@ int load_settings() {
|
||||
|
||||
if (fopen_s(&fp, SETTINGS_DB, "r")!=0) {
|
||||
log(LOGLEVEL::ERR, "[load_settings()]: Could not open settings file. ", SETTINGS_DB);
|
||||
strcpy_s(setting_server_server_url, 295, "http://localhost");
|
||||
strcpy_s(setting_server_server_url, 295, "nan");
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
#include "settings.h"
|
||||
#include "security.h"
|
||||
|
||||
int update_db(const std::string& folder_path) {
|
||||
|
||||
int update_db(const char* folder_path) {
|
||||
//download the databases from the server
|
||||
for (char firstChar = '0'; firstChar <= 'f'; ++firstChar) {
|
||||
for (char secondChar = '0'; secondChar <= 'f'; ++secondChar) {
|
||||
@@ -16,22 +17,26 @@ int update_db(const std::string& folder_path) {
|
||||
}
|
||||
|
||||
// Create the filename based on the naming convention
|
||||
std::string file_path = folder_path + "\\" + firstChar + secondChar + ".jdbf";
|
||||
std::string file_name = firstChar + secondChar + ".jdbf";
|
||||
|
||||
char file_name[] = { firstChar, secondChar ,'.','j','d','b','f','\0' };
|
||||
//create the strings to download the files
|
||||
char*url=new char[300];
|
||||
char*output_path=new char[300];
|
||||
get_setting("server:server_url", url);
|
||||
strcat_s(url, 295,"/database/");
|
||||
strcat_s(url, 295,file_name.c_str() );
|
||||
strcpy_s(output_path, 295, file_path.c_str());
|
||||
|
||||
int res = download_file_from_srv(url, output_path);
|
||||
if (res != 0) {
|
||||
log(LOGLEVEL::ERR, "[update_db()]: Error downloading database file from server", url);
|
||||
return 1;
|
||||
char* output_path = new char[300];
|
||||
char* url = new char[1000];
|
||||
if (get_setting("server:server_url", url) == 0 or strcmp(url, "nan") == 0) {
|
||||
strcat_s(url, 295, "/database_srv/");
|
||||
strcat_s(url, 295, file_name);
|
||||
strcpy_s(output_path, 295, folder_path);
|
||||
strcat_s(output_path, 295, "\\");
|
||||
strcat_s(output_path, 295, file_name);
|
||||
printf("%s\n", url);
|
||||
int res = download_file_from_srv(url, output_path);
|
||||
if (res != 0) {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
delete[] url;
|
||||
delete[] output_path;
|
||||
@@ -43,30 +48,36 @@ int update_db(const std::string& folder_path) {
|
||||
int update_settings(const char*settings_type) {
|
||||
//create the strings to download the files
|
||||
char* url = new char[1000];
|
||||
get_setting("server:server_url", url);
|
||||
strcat_s(url, 1000, "/api/php/settings/get_settings.php?");//need to add machine_id and apikey
|
||||
strcat_s(url, 1000, settings_type);
|
||||
strcat_s(url, 1000, "&machine_id=");
|
||||
strcat_s(url, 1000, get_machineid(SECRETS));
|
||||
strcat_s(url, 1000, "&apikey=");
|
||||
strcat_s(url, 1000, get_apikey(SECRETS));
|
||||
int res = 1;
|
||||
if(strcmp(settings_type,"settings")==0)
|
||||
res = download_file_from_srv(url, SETTINGS_DB);
|
||||
else if (strcmp(settings_type, "rtp_included") == 0)
|
||||
res = download_file_from_srv(url, INCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "rtp_excluded") == 0)
|
||||
res = download_file_from_srv(url, EXCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "sched") == 0)
|
||||
res = download_file_from_srv(url, SCHED_PATH);
|
||||
//int res = 0;
|
||||
if (res != 0) {
|
||||
log(LOGLEVEL::ERR, "[update_settings()]: Error downloading settings database file from server", url, " ERROR:",res);
|
||||
return 1;
|
||||
}
|
||||
if (get_setting("server:server_url", url) == 0 or strcmp(url,"nan")==0) {
|
||||
strcat_s(url, 1000, "/api/php/settings/get_settings.php?");//need to add machine_id and apikey
|
||||
strcat_s(url, 1000, settings_type);
|
||||
strcat_s(url, 1000, "&machine_id=");
|
||||
strcat_s(url, 1000, get_machineid(SECRETS));
|
||||
strcat_s(url, 1000, "&apikey=");
|
||||
strcat_s(url, 1000, get_apikey(SECRETS));
|
||||
int res = 1;
|
||||
if (strcmp(settings_type, "settings") == 0)
|
||||
res = download_file_from_srv(url, SETTINGS_DB);
|
||||
else if (strcmp(settings_type, "rtp_included") == 0)
|
||||
res = download_file_from_srv(url, INCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "rtp_excluded") == 0)
|
||||
res = download_file_from_srv(url, EXCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "sched") == 0)
|
||||
res = download_file_from_srv(url, SCHED_PATH);
|
||||
//int res = 0;
|
||||
if (res != 0) {
|
||||
log(LOGLEVEL::ERR, "[update_settings()]: Error downloading settings database file from server", url, " ERROR:", res);
|
||||
return 1;
|
||||
}
|
||||
|
||||
delete[] url;
|
||||
return 0;
|
||||
delete[] url;
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
delete[] url;
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
int action_update_settings() {
|
||||
//update the settings
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define UPDATE_H
|
||||
#include <curl/curl.h>
|
||||
#include<string>
|
||||
int update_db(const std::string& folder_path);
|
||||
int update_db(const char* folder_path);
|
||||
int update_settings(const char*settings_type);
|
||||
int action_update_settings();
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
#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];
|
||||
@@ -31,7 +32,7 @@ int virus_ctrl_process( const char* id) {
|
||||
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);
|
||||
log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Failed to open virus control database to process it.", db_path);
|
||||
delete[] db_path;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#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 PANICFILE "C:\\Program Files\\cyberhex\\secure\\log\\panic.txt"
|
||||
#define SRV_LOGFILE "C:\\Program Files\\cyberhex\\secure\\log\\srv_log.txt"
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
87
src/ma_installer/.vs/ma_installer/v17/DocumentLayout.json
Normal file
87
src/ma_installer/.vs/ma_installer/v17/DocumentLayout.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\ma_installer.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:ma_installer.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:download.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:download.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "well_known.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\well_known.h",
|
||||
"RelativeDocumentMoniker": "well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\well_known.h",
|
||||
"RelativeToolTip": "well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABoAAAAOAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-02-17T10:06:35.859Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "download.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.cpp",
|
||||
"RelativeDocumentMoniker": "download.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.cpp",
|
||||
"RelativeToolTip": "download.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAABAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-22T19:47:31.583Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "download.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.h",
|
||||
"RelativeDocumentMoniker": "download.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\download.h",
|
||||
"RelativeToolTip": "download.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAABIAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2023-12-22T19:47:23.597Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "ma_installer.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\ma_installer.cpp",
|
||||
"RelativeDocumentMoniker": "ma_installer.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\ma_installer.cpp",
|
||||
"RelativeToolTip": "ma_installer.cpp",
|
||||
"ViewState": "AQIAACwAAAAAAAAAAAAuwDwAAAAyAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-22T18:52:51.74Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
21
src/ma_installer/install.bat
Normal file
21
src/ma_installer/install.bat
Normal file
@@ -0,0 +1,21 @@
|
||||
#cyberhex installer downloader
|
||||
@echo off
|
||||
echo "Downloading Cyberhex installer"
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/ma_installer.exe
|
||||
echo "Downloading dll files"
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcrypto-3-x64.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcurl.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/zlib1.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/client_frontend.exe
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/client_backend.exe
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/ma_uninstaller.exe
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcurl-d.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/msvcp140.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/vcruntime140.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/vcruntime140_1d.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/msvcp140d.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/vcruntime140d.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/ucrtbased.dll
|
||||
curl -O -L https://github.com/jakani24/cyberhex_bin_distro/raw/main/zlibd1.dll
|
||||
echo "Download finished, starting installer"
|
||||
start ma_installer.exe
|
||||
@@ -19,6 +19,243 @@ Tasks to do:
|
||||
- create folder for communication
|
||||
|
||||
*/
|
||||
//create task thx chatgpt ;)#define _WIN32_DCOM
|
||||
|
||||
#include <windows.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <comdef.h>
|
||||
#include <taskschd.h>
|
||||
#pragma comment(lib, "taskschd.lib")
|
||||
#pragma comment(lib, "comsupp.lib")
|
||||
|
||||
using namespace std;
|
||||
|
||||
int CreateTask()
|
||||
{
|
||||
HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "CoInitializeEx failed: " << hex << hr << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = CoInitializeSecurity(
|
||||
NULL,
|
||||
-1,
|
||||
NULL,
|
||||
NULL,
|
||||
RPC_C_AUTHN_LEVEL_PKT_PRIVACY,
|
||||
RPC_C_IMP_LEVEL_IMPERSONATE,
|
||||
NULL,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "CoInitializeSecurity failed: " << hex << hr << endl;
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
LPCWSTR wszTaskName = L"CyberhexBackgroundTask";
|
||||
wstring wstrExecutablePath = L"c:\\program files\\cyberhex\\secure\\app\\cyberhex.exe";
|
||||
|
||||
ITaskService* pService = NULL;
|
||||
hr = CoCreateInstance(CLSID_TaskScheduler,
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
IID_ITaskService,
|
||||
(void**)&pService);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Failed to create an instance of ITaskService: " << hex << hr << endl;
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = pService->Connect(_variant_t(), _variant_t(),
|
||||
_variant_t(), _variant_t());
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "ITaskService::Connect failed: " << hex << hr << endl;
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ITaskFolder* pRootFolder = NULL;
|
||||
hr = pService->GetFolder(_bstr_t(L"\\"), &pRootFolder);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot get Root Folder pointer: " << hex << hr << endl;
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
pRootFolder->DeleteTask(_bstr_t(wszTaskName), 0);
|
||||
|
||||
ITaskDefinition* pTask = NULL;
|
||||
hr = pService->NewTask(0, &pTask);
|
||||
|
||||
pService->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Failed to create a task definition: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
IPrincipal* pPrincipal = NULL;
|
||||
hr = pTask->get_Principal(&pPrincipal);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot get principal pointer: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = pPrincipal->put_RunLevel(TASK_RUNLEVEL_HIGHEST);
|
||||
pPrincipal->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot set highest privilege level: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ITaskSettings* pSettings = NULL;
|
||||
hr = pTask->get_Settings(&pSettings);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot get settings pointer: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = pSettings->put_DisallowStartIfOnBatteries(VARIANT_FALSE); // Set to allow start on batteries
|
||||
pSettings->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot set start on batteries: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ITriggerCollection* pTriggerCollection = NULL;
|
||||
hr = pTask->get_Triggers(&pTriggerCollection);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot get trigger collection: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
ITrigger* pTrigger = NULL;
|
||||
hr = pTriggerCollection->Create(TASK_TRIGGER_BOOT, &pTrigger);
|
||||
pTriggerCollection->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot create the trigger: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
IActionCollection* pActionCollection = NULL;
|
||||
hr = pTask->get_Actions(&pActionCollection);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot get Task collection pointer: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
IAction* pAction = NULL;
|
||||
hr = pActionCollection->Create(TASK_ACTION_EXEC, &pAction);
|
||||
pActionCollection->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot create the action: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
IExecAction* pExecAction = NULL;
|
||||
hr = pAction->QueryInterface(
|
||||
IID_IExecAction, (void**)&pExecAction);
|
||||
pAction->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "QueryInterface call failed for IExecAction: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
hr = pExecAction->put_Path(_bstr_t(wstrExecutablePath.c_str()));
|
||||
pExecAction->Release();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Cannot set path of executable: " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
IRegisteredTask* pRegisteredTask = NULL;
|
||||
VARIANT varPassword;
|
||||
varPassword.vt = VT_EMPTY;
|
||||
hr = pRootFolder->RegisterTaskDefinition(
|
||||
_bstr_t(wszTaskName),
|
||||
pTask,
|
||||
TASK_CREATE_OR_UPDATE,
|
||||
_variant_t(L"SYSTEM"),
|
||||
varPassword,
|
||||
TASK_LOGON_SERVICE_ACCOUNT,
|
||||
_variant_t(L""),
|
||||
&pRegisteredTask);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
cout << "Error saving the Task : " << hex << hr << endl;
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
CoUninitialize();
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Success! Task successfully registered." << endl;
|
||||
|
||||
pRootFolder->Release();
|
||||
pTask->Release();
|
||||
pRegisteredTask->Release();
|
||||
CoUninitialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//check if programm is run as admin
|
||||
bool is_admin() {
|
||||
BOOL fIsRunAsAdmin = FALSE;
|
||||
@@ -205,11 +442,11 @@ int check_cert(const char* cert, const char* secrets_path) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
char* secrets = new char[300];
|
||||
char* secrets = new char[505];
|
||||
while (!feof(fp)) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
if (strcmp("cert", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
if (strcmp(cert, secrets) == 0) {
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
@@ -227,17 +464,20 @@ char* get_apikey(const char* secrets_path) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
char* secrets = new char[300];
|
||||
char* secrets = new char[505];
|
||||
while (!feof(fp)) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
if (strcmp("apikey", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fscanf_s(fp, "%s", secrets, 500); // get the secret
|
||||
fclose(fp);
|
||||
return secrets;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
char* get_machineid(const char* secrets_path) {
|
||||
FILE* fp;
|
||||
@@ -250,12 +490,15 @@ char* get_machineid(const char* secrets_path) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
if (strcmp("machineid", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fclose(fp);
|
||||
return secrets;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
char* get_server(const char* secrets_path) {
|
||||
FILE* fp;
|
||||
@@ -268,12 +511,130 @@ char* get_server(const char* secrets_path) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
if (strcmp("server", secrets) == 0) {
|
||||
fscanf_s(fp, "%s", secrets, 295); // get the secret
|
||||
fclose(fp);
|
||||
return secrets;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
delete[] secrets;
|
||||
return 0;
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
int update_db(const char* folder_path) {
|
||||
//download the databases from the server
|
||||
for (char firstChar = '0'; firstChar <= 'f'; ++firstChar) {
|
||||
for (char secondChar = '0'; secondChar <= 'f'; ++secondChar) {
|
||||
// Ensure that the characters are valid hexadecimal digits
|
||||
if (!std::isxdigit(firstChar) || !std::isxdigit(secondChar) or std::isupper(firstChar) or std::isupper(secondChar)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create the filename based on the naming convention
|
||||
|
||||
char file_name[]= { firstChar, secondChar ,'.','j','d','b','f','\0' };
|
||||
//create the strings to download the files
|
||||
char* url = new char[300];
|
||||
char* output_path = new char[300];
|
||||
strcpy_s(url, 295, get_server("setup.txt"));
|
||||
strcat_s(url, 295, "/database_srv/");
|
||||
strcat_s(url, 295, file_name);
|
||||
strcpy_s(output_path, 295, folder_path);
|
||||
strcat_s(output_path, 295, "\\");
|
||||
strcat_s(output_path, 295, file_name);
|
||||
printf("%s\n", url);
|
||||
int res = download_file_from_srv(url, output_path);
|
||||
if (res != 0) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
delete[] url;
|
||||
delete[] output_path;
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int update_settings(const char* settings_type) {
|
||||
//create the strings to download the files
|
||||
char* url = new char[1000];
|
||||
strcpy_s(url, 1000, get_server("setup.txt"));
|
||||
strcat_s(url, 1000, "/api/php/settings/get_settings.php?");//need to add machine_id and apikey
|
||||
strcat_s(url, 1000, settings_type);
|
||||
strcat_s(url, 1000, "&machine_id=");
|
||||
strcat_s(url, 1000, get_machineid(SECRETS));
|
||||
strcat_s(url, 1000, "&apikey=");
|
||||
strcat_s(url, 1000, get_apikey(SECRETS));
|
||||
int res = 1;
|
||||
if (strcmp(settings_type, "settings") == 0)
|
||||
res = download_file_from_srv(url, SETTINGS_DB);
|
||||
else if (strcmp(settings_type, "rtp_included") == 0)
|
||||
res = download_file_from_srv(url, INCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "rtp_excluded") == 0)
|
||||
res = download_file_from_srv(url, EXCLUDED_FOLDERS);
|
||||
else if (strcmp(settings_type, "sched") == 0)
|
||||
res = download_file_from_srv(url, SCHED_PATH);
|
||||
//int res = 0;
|
||||
if (res != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
delete[] url;
|
||||
return 0;
|
||||
}
|
||||
int action_update_settings() {
|
||||
//update the settings
|
||||
int err = 0;
|
||||
if (update_settings("settings") != 0) {
|
||||
err = 9;
|
||||
}
|
||||
//update the included folders
|
||||
if (update_settings("rtp_included") != 0) {
|
||||
err = 9;
|
||||
}
|
||||
//update the excluded folders
|
||||
if (update_settings("rtp_excluded") != 0) {
|
||||
err = 9;
|
||||
}
|
||||
//update the schedule
|
||||
if (update_settings("sched") != 0) {
|
||||
err = 9;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
int action_update_db() {
|
||||
//update the databases
|
||||
return update_db(DB_DIR);
|
||||
}
|
||||
int copy(const char* source_path, const char* destination_path) {
|
||||
FILE* source_file, * destination_file;
|
||||
char buffer[4096]; // Buffer to store data read from source file
|
||||
|
||||
// Open source file for reading
|
||||
if (fopen_s(&source_file, source_path, "rb") != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Open destination file for writing
|
||||
if (fopen_s(&destination_file, destination_path, "wb") != 0) {
|
||||
fclose(source_file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Copy contents from source to destination
|
||||
size_t bytes_read;
|
||||
while ((bytes_read = fread(buffer, 1, sizeof(buffer), source_file)) > 0) {
|
||||
fwrite(buffer, 1, bytes_read, destination_file);
|
||||
}
|
||||
|
||||
// Close files
|
||||
fclose(source_file);
|
||||
fclose(destination_file);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
@@ -283,7 +644,7 @@ int main()
|
||||
printf("We are not administrator, requesting UAC\n");
|
||||
if (!run_as_admin()) {
|
||||
printf("We did not get administrative rights. Please restart the installer!\n");
|
||||
MessageBox(NULL, L"Please start the installer with amdin privileges!", L"Error", MB_OK);
|
||||
MessageBox(NULL, L"Please start the installer with admin privileges!", L"Error", MB_OK);
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
@@ -332,92 +693,98 @@ int main()
|
||||
FILE* fp;
|
||||
char*apikey=get_apikey("secrets.txt");
|
||||
char*machineid=get_machineid("secrets.txt");
|
||||
char* server_url = get_server("setup.txt");
|
||||
char*server_url = get_server("setup.txt");
|
||||
printf("%s\n", server_url);
|
||||
//copy secrets.txt into the secrets folder
|
||||
if (rename("secrets.txt", SECRETS)!=0) {
|
||||
error = 8;
|
||||
}
|
||||
//download all the other files
|
||||
//download the settings:
|
||||
if (error == 0) {
|
||||
printf("Downloading settings from server\n");
|
||||
error = action_update_settings();
|
||||
}
|
||||
if (error == 0) {
|
||||
printf("Downloading databases from server\n");
|
||||
error = action_update_db();
|
||||
}
|
||||
|
||||
|
||||
if (error == 0) {
|
||||
printf("Downloading files from server\n");
|
||||
printf("Downloading cyberhex.exe\n");
|
||||
error=download_file_from_srv("https://cyberhex.org/download/cyberhex.exe", "C:\\Program Files\\cyberhex\\secure\\app\\cyberhex.exe");
|
||||
printf("Moving files into secure directorys\n");
|
||||
printf("Movin cyberhex.exe\n");
|
||||
//!!need to change: download in advance and then move to the correct folder
|
||||
//error=download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/client_backend.exe", "C:\\Program Files\\cyberhex\\secure\\app\\cyberhex.exe");
|
||||
if(rename("client_backend.exe", "C:\\Program Files\\cyberhex\\secure\\app\\cyberhex.exe")!=0)
|
||||
error = 7;
|
||||
if (error == 0) {
|
||||
printf("Downloading libcrypto-3-x64.dll\n");
|
||||
error = download_file_from_srv("https://cyberhex.org/download/libcrypto-3-x64.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcrypto-3-x64.dll");
|
||||
printf("Moving libcrypto-3-x64.dll\n");
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcrypto-3-x64.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcrypto-3-x64.dll");
|
||||
if(rename("libcrypto-3-x64.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcrypto-3-x64.dll")!=0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Downloading libcurl.dll\n");
|
||||
error = download_file_from_srv("https://cyberhex.org/download/libcurl.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcurl.dll");
|
||||
printf("Moving libcurl.dll\n");
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcurl.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcurl.dll");
|
||||
if(rename("libcurl.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcurl.dll")!=0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Downloading zlib1.dll\n");
|
||||
error = download_file_from_srv("https://cyberhex.org/download/zlib1.dll", "C:\\Program Files\\cyberhex\\secure\\app\\zlib1.dll");
|
||||
printf("Moving zlib1.dll\n");
|
||||
if(rename("zlib1.dll", "C:\\Program Files\\cyberhex\\secure\\app\\zlib1.dll")!=0)
|
||||
error = 7;
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/zlib1.dll", "C:\\Program Files\\cyberhex\\secure\\app\\zlib1.dll");
|
||||
}if (error == 0) {
|
||||
printf("Downloading cyberhex_desktop.dll\n");
|
||||
error = download_file_from_srv("https://cyberhex.org/download/cyberhex_desktop.exe", "C:\\Program Files\\cyberhex\\app\\cyberhex_desktop.exe");
|
||||
printf("Moving cyberhex_desktop.exe\n");
|
||||
if(rename("client_frontend.exe", "C:\\Program Files\\cyberhex\\app\\cyberhex_desktop.exe")!=0)
|
||||
error = 7;
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/client_frontend.exe", "C:\\Program Files\\cyberhex\\app\\cyberhex_desktop.exe");
|
||||
}if (error == 0) {
|
||||
printf("Moving msvcp140.dll\n");
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcurl.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcurl.dll");
|
||||
if (copy("msvcp140.dll", "C:\\Program Files\\cyberhex\\secure\\app\\msvcp140.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("msvcp140.dll", "C:\\Program Files\\cyberhex\\app\\msvcp140.dll") != 0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Moving msvcp140d.dll\n");
|
||||
//error = download_file_from_srv("https://github.com/jakani24/cyberhex_bin_distro/raw/main/libcurl.dll", "C:\\Program Files\\cyberhex\\secure\\app\\libcurl.dll");
|
||||
if (copy("msvcp140d.dll", "C:\\Program Files\\cyberhex\\secure\\app\\msvcp140d.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("msvcp140d.dll", "C:\\Program Files\\cyberhex\\app\\msvcp140d.dll") != 0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Moving vcruntime140.dll\n");
|
||||
if (copy("vcruntime140.dll", "C:\\Program Files\\cyberhex\\secure\\app\\vcruntime140.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("vcruntime140.dll", "C:\\Program Files\\cyberhex\\app\\vcruntime140.dll") != 0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Moving vcruntime140d.dll\n");
|
||||
if (copy("vcruntime140d.dll", "C:\\Program Files\\cyberhex\\secure\\app\\vcruntime140d.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("vcruntime140d.dll", "C:\\Program Files\\cyberhex\\app\\vcruntime140d.dll") != 0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Moving vcruntime140_1d.dll\n");
|
||||
if (copy("vcruntime140_1d.dll", "C:\\Program Files\\cyberhex\\secure\\app\\vcruntime140_1d.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("vcruntime140_1d.dll", "C:\\Program Files\\cyberhex\\app\\vcruntime140_1d.dll") != 0)
|
||||
error = 7;
|
||||
}if (error == 0) {
|
||||
printf("Moving ucrtbased.dll\n");
|
||||
if (copy("ucrtbased.dll", "C:\\Program Files\\cyberhex\\secure\\app\\ucrtbased.dll") != 0)
|
||||
error = 7;
|
||||
if (copy("ucrtbased.dll", "C:\\Program Files\\cyberhex\\app\\ucrtbased.dll") != 0)
|
||||
error = 7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//create background service
|
||||
if (error == 0) {
|
||||
printf("Creating background service\n");
|
||||
SC_HANDLE hSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS);
|
||||
if (!hSCManager) {
|
||||
//std::cerr << "Failed to open service control manager. Error code: " << GetLastError() << std::endl;
|
||||
error = 4;
|
||||
}
|
||||
|
||||
LPCWSTR serviceName = L"cyberhex_background_service";
|
||||
LPCWSTR servicePath = L"C:\\Program Files\\cyberhex\\secure\\app\\cyberhex.exe";
|
||||
|
||||
SC_HANDLE hService = CreateService(
|
||||
hSCManager,
|
||||
serviceName,
|
||||
serviceName,
|
||||
SERVICE_ALL_ACCESS,
|
||||
SERVICE_WIN32_OWN_PROCESS,
|
||||
SERVICE_AUTO_START,
|
||||
SERVICE_ERROR_NORMAL,
|
||||
servicePath,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr
|
||||
);
|
||||
|
||||
if (!hService) {
|
||||
//std::cerr << "Failed to create service. Error code: " << GetLastError() << std::endl;
|
||||
CloseServiceHandle(hSCManager);
|
||||
error = 5;
|
||||
}
|
||||
|
||||
// Configure the service to run with LocalSystem account (administrator rights)
|
||||
if (!ChangeServiceConfig(
|
||||
hService,
|
||||
SERVICE_NO_CHANGE,
|
||||
SERVICE_NO_CHANGE,
|
||||
SERVICE_NO_CHANGE,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
L"LocalSystem",
|
||||
nullptr,
|
||||
nullptr
|
||||
)) {
|
||||
//std::cerr << "Failed to configure service. Error code: " << GetLastError() << std::endl
|
||||
error = 6;
|
||||
}
|
||||
else {
|
||||
//std::cout << "Service created and configured successfully." << std::endl;
|
||||
//no error
|
||||
}
|
||||
|
||||
CloseServiceHandle(hService);
|
||||
CloseServiceHandle(hSCManager);
|
||||
|
||||
HRESULT hr = CreateTask();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
std::cerr << "Task creation failed!" << std::endl;
|
||||
error=5;
|
||||
}
|
||||
}
|
||||
switch (error) {
|
||||
@@ -451,14 +818,23 @@ int main()
|
||||
MessageBox(NULL, L"Failed to configure service", L"Error", MB_OK);
|
||||
break;
|
||||
case 7:
|
||||
printf("Failed to download file\n");
|
||||
MessageBox(NULL, L"Failed to download file", L"Error", MB_OK);
|
||||
printf("Failed to move file\n");
|
||||
MessageBox(NULL, L"Failed to move file", L"Error", MB_OK);
|
||||
break;
|
||||
case 8:
|
||||
printf("Failed to open secrets.txt\n");
|
||||
MessageBox(NULL, L"Failed to open secrets.txt", L"Error", MB_OK);
|
||||
printf("Failed to move secrets.txt\n");
|
||||
MessageBox(NULL, L"Failed to move secrets.txt", L"Error", MB_OK);
|
||||
break;
|
||||
case 9:
|
||||
printf("Failed to download settings\n");
|
||||
MessageBox(NULL, L"Failed to download settings", L"Error", MB_OK);
|
||||
break;
|
||||
case 10:
|
||||
printf("Failed to download database file\n");
|
||||
MessageBox(NULL, L"Failed to download database file", L"Error", MB_OK);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
system("pause");
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="download.h" />
|
||||
<ClInclude Include="well_known.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -26,5 +26,8 @@
|
||||
<ClInclude Include="download.h">
|
||||
<Filter>Headerdateien</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="well_known.h">
|
||||
<Filter>Headerdateien</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\ma_installer.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
src/ma_installer/ma_installer/x64/Debug/ma_installer.ilk
Normal file
BIN
src/ma_installer/ma_installer/x64/Debug/ma_installer.ilk
Normal file
Binary file not shown.
3
src/ma_installer/ma_installer/x64/Debug/ma_installer.log
Normal file
3
src/ma_installer/ma_installer/x64/Debug/ma_installer.log
Normal file
@@ -0,0 +1,3 @@
|
||||
ma_installer.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer.cpp(693,15): warning C4101: "fp": Unreferenzierte lokale Variable
|
||||
ma_installer.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\ma_installer.exe
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\download.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer\x64\Debug\download.obj
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer\x64\Debug\ma_installer.obj
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\MA_INSTALLER\MA_INSTALLER\X64\DEBUG\DOWNLOAD.OBJ|C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\MA_INSTALLER\MA_INSTALLER\X64\DEBUG\MA_INSTALLER.OBJ
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer\x64\Debug\ma_installer.ilk
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows:
|
||||
Debug|x64|C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\|
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\libcurl-d.dll
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\zlibd1.dll
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer\x64\Debug\ma_insta.BC7E6B48.Up2Date
|
||||
BIN
src/ma_installer/ma_installer/x64/Debug/vc143.idb
Normal file
BIN
src/ma_installer/ma_installer/x64/Debug/vc143.idb
Normal file
Binary file not shown.
BIN
src/ma_installer/ma_installer/x64/Debug/vc143.pdb
Normal file
BIN
src/ma_installer/ma_installer/x64/Debug/vc143.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\libcurl-d.dll
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\zlibd1.dll
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_uninstaller\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A8DFEDE3-F066-4583-94C9-257F88DFF56A}|ma_uninstaller.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_uninstaller\\ma_uninstaller.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{A8DFEDE3-F066-4583-94C9-257F88DFF56A}|ma_uninstaller.vcxproj|solutionrelative:ma_uninstaller.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "ma_uninstaller.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_uninstaller\\ma_uninstaller.cpp",
|
||||
"RelativeDocumentMoniker": "ma_uninstaller.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_uninstaller\\ma_uninstaller.cpp",
|
||||
"RelativeToolTip": "ma_uninstaller.cpp",
|
||||
"ViewState": "AQIAAI0AAAAAAAAAAAAAALYAAAAhAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-23T09:04:19.505Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
src/ma_uninstaller/.vs/ma_uninstaller/v17/Solution.VC.db
Normal file
BIN
src/ma_uninstaller/.vs/ma_uninstaller/v17/Solution.VC.db
Normal file
Binary file not shown.
@@ -6,6 +6,11 @@
|
||||
*/
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include <taskschd.h>
|
||||
#include <comdef.h>
|
||||
#pragma comment(lib, "taskschd.lib")
|
||||
//check if programm is run as admin
|
||||
bool is_admin() {
|
||||
BOOL fIsRunAsAdmin = FALSE;
|
||||
@@ -101,6 +106,62 @@ bool remove_dir(const std::wstring& path) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool remove_scheduled_task(const std::wstring& taskName) {
|
||||
HRESULT hr;
|
||||
|
||||
// Initialize COM
|
||||
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
if (FAILED(hr)) {
|
||||
std::cerr << "COM initialization failed with error code: " << hr << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create an instance of the Task Service
|
||||
ITaskService* pService = NULL;
|
||||
hr = CoCreateInstance(CLSID_TaskScheduler, NULL, CLSCTX_INPROC_SERVER, IID_ITaskService, (void**)&pService);
|
||||
if (FAILED(hr)) {
|
||||
std::cerr << "Failed to create an instance of ITaskService: " << hr << std::endl;
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Connect to the task service
|
||||
hr = pService->Connect(_variant_t(), _variant_t(), _variant_t(), _variant_t());
|
||||
if (FAILED(hr)) {
|
||||
std::cerr << "ITaskService::Connect failed with error code: " << hr << std::endl;
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the root task folder
|
||||
ITaskFolder* pRootFolder = NULL;
|
||||
hr = pService->GetFolder(_bstr_t(L"\\"), &pRootFolder);
|
||||
if (FAILED(hr)) {
|
||||
std::cerr << "Cannot get Root Folder pointer: " << hr << std::endl;
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Delete the task
|
||||
hr = pRootFolder->DeleteTask(_bstr_t(taskName.c_str()), 0);
|
||||
if (FAILED(hr)) {
|
||||
std::cerr << "Failed to delete the task: " << hr << std::endl;
|
||||
pRootFolder->Release();
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Release COM objects
|
||||
pRootFolder->Release();
|
||||
pService->Release();
|
||||
CoUninitialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
printf("Welcome to the Cyberhex uninstaller!\n");
|
||||
@@ -118,6 +179,8 @@ int main()
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf("Stopping cyberhex");
|
||||
system("taskkill /F /IM cyberhex.exe");
|
||||
printf("Removing directorys\n");
|
||||
printf("Removing directory for application\n");
|
||||
error = remove_dir(L"C:\\Program Files\\Cyberhex");
|
||||
@@ -127,33 +190,9 @@ int main()
|
||||
error = 0;
|
||||
if (error == 0) {
|
||||
printf("Removing background task\n");
|
||||
SC_HANDLE hSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS);
|
||||
if (!hSCManager) {
|
||||
//std::cerr << "Failed to open service control manager. Error code: " << GetLastError() << std::endl;
|
||||
//return 1;
|
||||
error = 1;
|
||||
}
|
||||
|
||||
LPCWSTR serviceName = L"cyberhex_background_service";
|
||||
|
||||
SC_HANDLE hService = OpenService(hSCManager, serviceName, DELETE);
|
||||
if (!hService) {
|
||||
//std::cerr << "Failed to open service. Error code: " << GetLastError() << std::endl;
|
||||
CloseServiceHandle(hSCManager);
|
||||
//return 1;
|
||||
error = 2;
|
||||
}
|
||||
|
||||
if (!DeleteService(hService)) {
|
||||
//std::cerr << "Failed to delete service. Error code: " << GetLastError() << std::endl;
|
||||
error = 3;
|
||||
}
|
||||
else {
|
||||
//std::cout << "Service deleted successfully." << std::endl;
|
||||
}
|
||||
|
||||
CloseServiceHandle(hService);
|
||||
CloseServiceHandle(hSCManager);
|
||||
if (!remove_scheduled_task(L"CyberhexBackgroundTask")) {
|
||||
error = 5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -186,13 +225,3 @@ int main()
|
||||
}
|
||||
}
|
||||
|
||||
// Programm ausführen: STRG+F5 oder Menüeintrag "Debuggen" > "Starten ohne Debuggen starten"
|
||||
// Programm debuggen: F5 oder "Debuggen" > Menü "Debuggen starten"
|
||||
|
||||
// Tipps für den Einstieg:
|
||||
// 1. Verwenden Sie das Projektmappen-Explorer-Fenster zum Hinzufügen/Verwalten von Dateien.
|
||||
// 2. Verwenden Sie das Team Explorer-Fenster zum Herstellen einer Verbindung mit der Quellcodeverwaltung.
|
||||
// 3. Verwenden Sie das Ausgabefenster, um die Buildausgabe und andere Nachrichten anzuzeigen.
|
||||
// 4. Verwenden Sie das Fenster "Fehlerliste", um Fehler anzuzeigen.
|
||||
// 5. Wechseln Sie zu "Projekt" > "Neues Element hinzufügen", um neue Codedateien zu erstellen, bzw. zu "Projekt" > "Vorhandenes Element hinzufügen", um dem Projekt vorhandene Codedateien hinzuzufügen.
|
||||
// 6. Um dieses Projekt später erneut zu öffnen, wechseln Sie zu "Datei" > "Öffnen" > "Projekt", und wählen Sie die SLN-Datei aus.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\x64\Debug\ma_uninstaller.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/ma_uninstaller.ilk
Normal file
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/ma_uninstaller.ilk
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
ma_uninstaller.cpp
|
||||
ma_uninstaller.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\x64\Debug\ma_uninstaller.exe
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\ma_uninstaller.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\ma_uninstaller\x64\Debug\ma_uninstaller.obj
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\MA_UNINSTALLER\MA_UNINSTALLER\X64\DEBUG\MA_UNINSTALLER.OBJ
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\ma_uninstaller\x64\Debug\ma_uninstaller.ilk
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.39.33519:TargetPlatformVersion=10.0.22621.0:VcpkgTriplet=x64-windows:
|
||||
Debug|x64|C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_uninstaller\|
|
||||
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/vc143.idb
Normal file
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/vc143.idb
Normal file
Binary file not shown.
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/vc143.pdb
Normal file
BIN
src/ma_uninstaller/ma_uninstaller/x64/Debug/vc143.pdb
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
@@ -52,6 +52,7 @@ include "../../../config.php";
|
||||
<label for="ip">IP: (can be left blank)</label>
|
||||
<input type="text" class="form-control" id="ip" name="ip">
|
||||
</div>
|
||||
<br>
|
||||
<button type="submit" class="btn btn-primary btn-block">Add Machine</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user