adding support for uploading log entrys to server
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -2,6 +2,18 @@
|
|||||||
"Version": 1,
|
"Version": 1,
|
||||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\",
|
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\",
|
||||||
"Documents": [
|
"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\\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\\connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||||
|
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\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\\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\\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}"
|
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:virus_ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||||
@@ -11,33 +23,37 @@
|
|||||||
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative: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\\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\\log.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}"
|
"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\\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\\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\\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}"
|
"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\\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\\update.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}"
|
"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_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\\scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
"AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.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}"
|
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:scan.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||||
|
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:check_dir.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"AbsoluteMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
"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}"
|
"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\\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\\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\\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\\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}"
|
"RelativeMoniker": "D:0:0:{56E65283-AAC9-43F6-9613-72BE8D648AC4}|client_backend.vcxproj|solutionrelative:queue _ctrl.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||||
@@ -54,11 +70,62 @@
|
|||||||
"DocumentGroups": [
|
"DocumentGroups": [
|
||||||
{
|
{
|
||||||
"DockedWidth": 200,
|
"DockedWidth": 200,
|
||||||
"SelectedChildIndex": 10,
|
"SelectedChildIndex": 2,
|
||||||
"Children": [
|
"Children": [
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 6,
|
"DocumentIndex": 1,
|
||||||
|
"Title": "connect.h",
|
||||||
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.h",
|
||||||
|
"RelativeDocumentMoniker": "connect.h",
|
||||||
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.h",
|
||||||
|
"RelativeToolTip": "connect.h",
|
||||||
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAABAAAA",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||||
|
"WhenOpened": "2024-03-09T12:32:01.859Z",
|
||||||
|
"EditorCaption": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 9,
|
||||||
|
"Title": "check_dir.cpp",
|
||||||
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp",
|
||||||
|
"RelativeDocumentMoniker": "check_dir.cpp",
|
||||||
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\check_dir.cpp",
|
||||||
|
"RelativeToolTip": "check_dir.cpp",
|
||||||
|
"ViewState": "AQIAACIBAAAAAAAAAAAkwEwBAAAZAAAA",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
|
"WhenOpened": "2024-02-25T13:36:05.414Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 0,
|
||||||
|
"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": "AQIAAFEAAAAAAAAAAAAAAHEAAABCAAAA",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||||
|
"WhenOpened": "2024-02-25T09:02:55.874Z",
|
||||||
|
"EditorCaption": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 5,
|
||||||
|
"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": "AQIAAAAAAAAAAAAAAAAAABkAAAAeAAAA",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
|
"WhenOpened": "2024-02-25T09:08:59.07Z",
|
||||||
|
"EditorCaption": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 12,
|
||||||
"Title": "local_com.cpp",
|
"Title": "local_com.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_com.cpp",
|
||||||
"RelativeDocumentMoniker": "local_com.cpp",
|
"RelativeDocumentMoniker": "local_com.cpp",
|
||||||
@@ -66,25 +133,23 @@
|
|||||||
"RelativeToolTip": "local_com.cpp",
|
"RelativeToolTip": "local_com.cpp",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAApAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAgAAAApAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.217Z",
|
"WhenOpened": "2024-01-28T20:40:06.217Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 2,
|
"DocumentIndex": 11,
|
||||||
"Title": "settings.cpp",
|
"Title": "settings.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
||||||
"RelativeDocumentMoniker": "settings.cpp",
|
"RelativeDocumentMoniker": "settings.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\settings.cpp",
|
||||||
"RelativeToolTip": "settings.cpp",
|
"RelativeToolTip": "settings.cpp",
|
||||||
"ViewState": "AQIAAC0AAAAAAAAAAAAAAD4AAAAFAAAA",
|
"ViewState": "AQIAAAYAAAAAAAAAAAAAABkAAAAUAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.264Z",
|
"WhenOpened": "2024-01-28T20:40:06.264Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 1,
|
"DocumentIndex": 4,
|
||||||
"Title": "thread_ctrl.cpp",
|
"Title": "thread_ctrl.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\thread_ctrl.cpp",
|
||||||
"RelativeDocumentMoniker": "thread_ctrl.cpp",
|
"RelativeDocumentMoniker": "thread_ctrl.cpp",
|
||||||
@@ -97,46 +162,46 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 4,
|
"DocumentIndex": 6,
|
||||||
"Title": "client_backend.cpp",
|
"Title": "client_backend.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp",
|
||||||
"RelativeDocumentMoniker": "client_backend.cpp",
|
"RelativeDocumentMoniker": "client_backend.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\client_backend.cpp",
|
||||||
"RelativeToolTip": "client_backend.cpp",
|
"RelativeToolTip": "client_backend.cpp",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAADEAAAAGAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAACwAAAAiAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 7,
|
"DocumentIndex": 8,
|
||||||
"Title": "scan.cpp",
|
"Title": "scan.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp",
|
||||||
"RelativeDocumentMoniker": "scan.cpp",
|
"RelativeDocumentMoniker": "scan.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.cpp",
|
||||||
"RelativeToolTip": "scan.cpp",
|
"RelativeToolTip": "scan.cpp",
|
||||||
"ViewState": "AQIAAC8AAAAAAAAAAAAkwLEAAAAAAAAA",
|
"ViewState": "AQIAABgAAAAAAAAAAAAAAA4AAAAVAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.248Z",
|
"WhenOpened": "2024-01-28T20:40:06.248Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 3,
|
"DocumentIndex": 7,
|
||||||
"Title": "update.cpp",
|
"Title": "update.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp",
|
||||||
"RelativeDocumentMoniker": "update.cpp",
|
"RelativeDocumentMoniker": "update.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\update.cpp",
|
||||||
"RelativeToolTip": "update.cpp",
|
"RelativeToolTip": "update.cpp",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAEAAAAAvAAAA",
|
"ViewState": "AQIAABMAAAAAAAAAAAAkwEQAAABzAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.248Z",
|
"WhenOpened": "2024-01-28T20:40:06.248Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 8,
|
"DocumentIndex": 10,
|
||||||
"Title": "local_schedule.cpp",
|
"Title": "local_schedule.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\local_schedule.cpp",
|
||||||
"RelativeDocumentMoniker": "local_schedule.cpp",
|
"RelativeDocumentMoniker": "local_schedule.cpp",
|
||||||
@@ -144,12 +209,11 @@
|
|||||||
"RelativeToolTip": "local_schedule.cpp",
|
"RelativeToolTip": "local_schedule.cpp",
|
||||||
"ViewState": "AQIAAEgAAAAAAAAAAAAAAFoAAAAKAAAA",
|
"ViewState": "AQIAAEgAAAAAAAAAAAAAAFoAAAAKAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.279Z",
|
"WhenOpened": "2024-01-28T20:40:06.279Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 10,
|
"DocumentIndex": 14,
|
||||||
"Title": "scan.h",
|
"Title": "scan.h",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.h",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\scan.h",
|
||||||
"RelativeDocumentMoniker": "scan.h",
|
"RelativeDocumentMoniker": "scan.h",
|
||||||
@@ -157,12 +221,11 @@
|
|||||||
"RelativeToolTip": "scan.h",
|
"RelativeToolTip": "scan.h",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAADAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAAADAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.295Z",
|
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 9,
|
"DocumentIndex": 13,
|
||||||
"Title": "queue _ctrl.cpp",
|
"Title": "queue _ctrl.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\queue _ctrl.cpp",
|
||||||
"RelativeDocumentMoniker": "queue _ctrl.cpp",
|
"RelativeDocumentMoniker": "queue _ctrl.cpp",
|
||||||
@@ -170,31 +233,30 @@
|
|||||||
"RelativeToolTip": "queue _ctrl.cpp",
|
"RelativeToolTip": "queue _ctrl.cpp",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAACsAAAABAAAA",
|
"ViewState": "AQIAAAAAAAAAAAAAAAAAACsAAAABAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.295Z",
|
"WhenOpened": "2024-01-28T20:40:06.295Z"
|
||||||
"EditorCaption": ""
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 5,
|
"DocumentIndex": 2,
|
||||||
"Title": "connect.cpp",
|
"Title": "connect.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
||||||
"RelativeDocumentMoniker": "connect.cpp",
|
"RelativeDocumentMoniker": "connect.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\connect.cpp",
|
||||||
"RelativeToolTip": "connect.cpp",
|
"RelativeToolTip": "connect.cpp",
|
||||||
"ViewState": "AQIAAAYAAAAAAAAAAAAAACwAAAAAAAAA",
|
"ViewState": "AQIAAG8AAAAAAAAAAAAAAIMAAAABAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-01-28T20:40:06.315Z",
|
"WhenOpened": "2024-01-28T20:40:06.315Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Document",
|
"$type": "Document",
|
||||||
"DocumentIndex": 0,
|
"DocumentIndex": 3,
|
||||||
"Title": "virus_ctrl.cpp",
|
"Title": "virus_ctrl.cpp",
|
||||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp",
|
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp",
|
||||||
"RelativeDocumentMoniker": "virus_ctrl.cpp",
|
"RelativeDocumentMoniker": "virus_ctrl.cpp",
|
||||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp",
|
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp",
|
||||||
"RelativeToolTip": "virus_ctrl.cpp",
|
"RelativeToolTip": "virus_ctrl.cpp",
|
||||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABwAAAAxAAAA",
|
"ViewState": "AQIAADYAAAAAAAAAAAAAAGEAAAAvAAAA",
|
||||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||||
"WhenOpened": "2024-02-18T12:49:41.861Z",
|
"WhenOpened": "2024-02-18T12:49:41.861Z",
|
||||||
"EditorCaption": ""
|
"EditorCaption": ""
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ void monitor_directory(LPCSTR directory) {
|
|||||||
buffer,
|
buffer,
|
||||||
bufferSize,
|
bufferSize,
|
||||||
TRUE,
|
TRUE,
|
||||||
FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE,
|
FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_FILE_NAME,
|
||||||
NULL,
|
NULL,
|
||||||
&overlapped,
|
&overlapped,
|
||||||
NULL) == 0) {
|
NULL) == 0) {
|
||||||
@@ -331,7 +331,7 @@ void monitor_directory(LPCSTR directory) {
|
|||||||
buffer,
|
buffer,
|
||||||
bufferSize,
|
bufferSize,
|
||||||
TRUE,
|
TRUE,
|
||||||
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE,
|
FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_FILE_NAME,
|
||||||
NULL,
|
NULL,
|
||||||
&overlapped,
|
&overlapped,
|
||||||
NULL) == 0) {
|
NULL) == 0) {
|
||||||
|
|||||||
@@ -19,127 +19,92 @@
|
|||||||
#include "virus_ctrl.h"
|
#include "virus_ctrl.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
int main() {
|
int main() {
|
||||||
|
//log(LOGLEVEL::INFO, "[main()]:Starting main thread.");
|
||||||
|
//return 0;
|
||||||
|
|
||||||
|
log(LOGLEVEL::INFO_NOSEND, "[main()]:Starting main thread.");
|
||||||
int err = 0;
|
int err = 0;
|
||||||
log(LOGLEVEL::INFO, "[main()]:Starting main thread.");
|
|
||||||
printf("welcome to the jakach security tool main thread\n");
|
printf("welcome to the jakach security tool main thread\n");
|
||||||
if (load_settings() == 0) {//load the settings from the settings file
|
if (load_settings() == 0) {//load the settings from the settings file
|
||||||
if (update_settings("settings")!=0) { //update the settings from the server
|
if (update_settings("settings")!=0) { //update the settings from the server
|
||||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings (settings) from server.");
|
log(LOGLEVEL::ERR_NOSEND, "[main()]:Could not update settings (settings) from server.");
|
||||||
}
|
}
|
||||||
if (update_settings("rtp_included")!=0) { //update the settings from the server
|
if (update_settings("rtp_included")!=0) { //update the settings from the server
|
||||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings (rtp_included) from server.");
|
log(LOGLEVEL::ERR_NOSEND, "[main()]:Could not update settings (rtp_included) from server.");
|
||||||
}
|
}
|
||||||
if (update_settings("rtp_excluded")!=0) { //update the settings from the server
|
if (update_settings("rtp_excluded")!=0) { //update the settings from the server
|
||||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings (rtp_excluded) from server.");
|
log(LOGLEVEL::ERR_NOSEND, "[main()]:Could not update settings (rtp_excluded) from server.");
|
||||||
}
|
}
|
||||||
if (update_settings("sched")!=0) { //update the settings from the server
|
if (update_settings("sched")!=0) { //update the settings from the server
|
||||||
log(LOGLEVEL::ERR, "[main()]:Could not update settings (scheduled_tasks) from server.");
|
log(LOGLEVEL::ERR_NOSEND, "[main()]:Could not update settings (scheduled_tasks) from server.");
|
||||||
}
|
}
|
||||||
load_settings(); //load the updated settings from the settings file
|
load_settings(); //load the updated settings from the settings file
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log(LOGLEVEL::ERR, "[main()]:Could not load settings from file.");
|
log(LOGLEVEL::ERR_NOSEND, "[main()]:Could not load settings from file.");
|
||||||
log(LOGLEVEL::PANIC, "[main()]:Panic, no settings file loaded, terminating process!");
|
log(LOGLEVEL::PANIC_NOSEND, "[main()]:Panic, no settings file loaded, terminating process!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if ((err=initialize(DB_DIR)) != 0) { //load the hash databases into memory
|
|
||||||
|
// Initialize hash databases
|
||||||
|
err = initialize(DB_DIR);
|
||||||
|
if (err != 0) {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case 1:
|
case 1:
|
||||||
log(LOGLEVEL::ERR, "[main()]:Error opening database file in: ", DB_DIR);
|
log(LOGLEVEL::ERR, "[main()]:Error opening database file in: ", DB_DIR);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
log(LOGLEVEL::ERR, "[main()]:Error creating database file mapping in: ", DB_DIR);
|
log(LOGLEVEL::ERR, "[main()]:Error creating database file mapping in: ", DB_DIR);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
log(LOGLEVEL::ERR, "[main()]:Error mapping database file in: ", DB_DIR);
|
log(LOGLEVEL::ERR, "[main()]:Error mapping database file in: ", DB_DIR);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log(LOGLEVEL::ERR, "[main()]:Unknown error while loading database file in: ", DB_DIR);
|
log(LOGLEVEL::ERR, "[main()]:Unknown error while loading database file in: ", DB_DIR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//start a second thread which will scan for new files
|
|
||||||
|
// Start a second thread for real-time protection
|
||||||
if (get_setting("rtp_folder_scan:status") == 1) {
|
if (get_setting("rtp_folder_scan:status") == 1) {
|
||||||
log(LOGLEVEL::INFO, "[main()]:Starting real time protection.");
|
log(LOGLEVEL::INFO, "[main()]:Starting real time protection.");
|
||||||
std::thread folder_scannner_thread(folder_scanner);
|
std::thread folder_scanner_thread(folder_scanner);
|
||||||
folder_scannner_thread.detach();
|
folder_scanner_thread.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
//main thread:
|
// Main thread loop
|
||||||
/* watches for notifications on bus
|
|
||||||
* start threads (scans etc); only one at a time may run
|
|
||||||
* updates settings etc
|
|
||||||
* start scheduled tasks
|
|
||||||
*/
|
|
||||||
while (!app_stop()) {
|
while (!app_stop()) {
|
||||||
//run all the tasks described above
|
|
||||||
//check for tasks in com
|
|
||||||
//check for scheduled tasks
|
|
||||||
//execute tasks
|
|
||||||
auto start = std::chrono::high_resolution_clock::now();
|
auto start = std::chrono::high_resolution_clock::now();
|
||||||
if ((err = check_for_com_tasks(MAIN_COM, MAIN_COM_PATH)) != 0) { //check for tasks from user interface and add them to the queue
|
|
||||||
switch (err) {
|
// Check for tasks from user interface
|
||||||
case 1:
|
if (check_for_com_tasks(MAIN_COM, MAIN_COM_PATH) != 0) {
|
||||||
//the log here is not needed, because default state is that this file does not exist
|
// Log message commented out as this error is expected when the file doesn't exist
|
||||||
//log(LOGLEVEL::ERR, "[main()]:Error opening communication file in: ", MAIN_COM_PATH);
|
// log(LOGLEVEL::ERR, "[main()]:Error opening communication file in: ", MAIN_COM_PATH);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((err = check_for_sched_tasks(SCHED, SCHED_PATH)) != 0) { //check for scheduled tasks and add them to the queue
|
|
||||||
switch (err) {
|
|
||||||
case 1:
|
|
||||||
log(LOGLEVEL::ERR, "[main()]:Error opening schedule file in: ", SCHED_PATH);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for scheduled tasks
|
||||||
|
if (check_for_sched_tasks(SCHED, SCHED_PATH) != 0) {
|
||||||
|
log(LOGLEVEL::ERR, "[main()]:Error opening schedule file in: ", SCHED_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute tasks from the queue
|
||||||
if (can_run_thread()) {
|
if (can_run_thread()) {
|
||||||
int queue_size = get_queue_size();
|
int queue_size = get_queue_size();
|
||||||
for (int i = 0; i < queue_size; i++) {
|
for (int i = 0; i < queue_size; i++) {
|
||||||
char* queue_entry = new char[300 * 2 + 5];
|
char* queue_entry = new char[300 * 2 + 5];
|
||||||
queue_entry[0] = '\0';
|
queue_entry[0] = '\0';
|
||||||
queue_pop(queue_entry);
|
queue_pop(queue_entry);
|
||||||
//execute the function which starts the threads
|
|
||||||
start_thread(queue_entry);
|
start_thread(queue_entry);
|
||||||
delete[] queue_entry;
|
delete[] queue_entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//to ensure that the loop takes at least 1 second else it will run too fast nd destroy you CPU :)
|
|
||||||
|
// Sleep to ensure loop takes at least 1 second
|
||||||
auto stop = std::chrono::high_resolution_clock::now();
|
auto stop = std::chrono::high_resolution_clock::now();
|
||||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
|
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start);
|
||||||
if (duration.count() < 1000)
|
if (duration.count() < 1000)
|
||||||
Sleep(1000 - duration.count());
|
Sleep(1000 - duration.count());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
//ListFilesRecursive("C:\\", 0);
|
|
||||||
/*char md5Hash[2 * MD5_DIGEST_LENGTH + 1]; // +1 for null-terminator
|
|
||||||
printf("Hash of the executable: ");
|
|
||||||
md5_file("C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\x64\\Debug\\client_backend.exe", md5Hash);
|
|
||||||
printf("%s", md5Hash);
|
|
||||||
char a_[2000];
|
|
||||||
printf("\nerror:%d\n",connect_to_srv("https://self-signed.badssl.com/", a_, 2000,1)); //error 60: self signed => option f<>r self-signed ignorieren aktivieren (bool ignore_invalid=true)
|
|
||||||
printf("%s", a_); //error 6: not reachable
|
|
||||||
download_file_from_srv("https://jakach.duckdns.org/php/login/v3/login.php", "c:\\programdata\\jakach\\out12.txt");
|
|
||||||
/*
|
|
||||||
const int numThreads = 12;
|
|
||||||
std::thread threads[numThreads];
|
|
||||||
|
|
||||||
for (int i = 0; i < numThreads; ++i) {
|
|
||||||
threads[i] = std::thread(ListFilesRecursive, "C:\\Users\\janis\\Documents\\ma_av_tests",i);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Join threads to wait for them to finish
|
|
||||||
for (int i = 0; i < numThreads; ++i) {
|
|
||||||
threads[i].join();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "All threads have finished." << std::endl;
|
|
||||||
*/
|
|
||||||
|
|
||||||
//printf("code:%d",scan_hash("C:\\Users\\janis\\Documents\\ma_av_tests\\OutputFile.txt", "1fddc13c02a79442c911a44b02ee0f58"));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,6 +1,53 @@
|
|||||||
Quellen werden auf Modulabhängigkeiten überprüft...
|
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(106,24): warning C4244: "Argument": Konvertierung von "_Rep" in "DWORD", möglicher Datenverlust
|
||||||
|
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: with
|
||||||
|
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: [
|
||||||
|
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: _Rep=__int64
|
||||||
|
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\client_backend.cpp(106,24): warning C4244: ]
|
||||||
|
local_schedule.cpp
|
||||||
|
log.cpp
|
||||||
|
md5hash.cpp
|
||||||
|
scan.cpp
|
||||||
settings.cpp
|
settings.cpp
|
||||||
|
thread_ctrl.cpp
|
||||||
update.cpp
|
update.cpp
|
||||||
virus_ctrl.cpp
|
virus_ctrl.cpp
|
||||||
Code wird generiert...
|
Code wird generiert...
|
||||||
LINK : fatal error LNK1168: "C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_backend\x64\Debug\client_backend.exe" kann nicht zum Schreiben geöffnet werden.
|
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
|
||||||
|
|||||||
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.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,29 @@
|
|||||||
#include "well_known.h"
|
#include "well_known.h"
|
||||||
#include "security.h"
|
#include "security.h"
|
||||||
|
|
||||||
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp)
|
|
||||||
|
int fast_send(const char * url,bool ignore_insecure) {
|
||||||
|
//send get rewuest to server, and cloe connection after maximum 1 second
|
||||||
|
CURL* curl;
|
||||||
|
CURLcode res;
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if (curl) {
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
|
if(ignore_insecure==true)
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1L);
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
if (res == CURLE_OK) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
static size_t write_callback_connect(void* contents, size_t size, size_t nmemb, void* userp)
|
||||||
{
|
{
|
||||||
((std::string*)userp)->append((char*)contents, size * nmemb);
|
((std::string*)userp)->append((char*)contents, size * nmemb);
|
||||||
return size * nmemb;
|
return size * nmemb;
|
||||||
@@ -19,7 +41,7 @@ int connect_to_srv(const char*url,char*out,int max_len, bool ignore_insecure) {
|
|||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if (curl) {
|
if (curl) {
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback_connect);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
|
||||||
if(ignore_insecure==true)
|
if(ignore_insecure==true)
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||||
@@ -34,7 +56,7 @@ int connect_to_srv(const char*url,char*out,int max_len, bool ignore_insecure) {
|
|||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
size_t write_callback(void* contents, size_t size, size_t nmemb, void* userp) {
|
size_t write_callback_download(void* contents, size_t size, size_t nmemb, void* userp) {
|
||||||
size_t totalSize = size * nmemb;
|
size_t totalSize = size * nmemb;
|
||||||
FILE* file = (FILE*)userp;
|
FILE* file = (FILE*)userp;
|
||||||
if (file) {
|
if (file) {
|
||||||
@@ -69,7 +91,7 @@ int download_file_from_srv(const char* url, const char* output_file_path, bool i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the write callback function
|
// Set the write callback function
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback_download);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, output_file);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, output_file);
|
||||||
if (ignore_insecure == true)
|
if (ignore_insecure == true)
|
||||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||||
@@ -106,4 +128,40 @@ int download_file_from_srv(const char* url, const char* output_file_path, bool i
|
|||||||
delete[] temp_path;
|
delete[] temp_path;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* url_encode(const char* input) {
|
||||||
|
// Allocate memory for the encoded string (worst case: every character needs encoding)
|
||||||
|
size_t input_len = strlen(input);
|
||||||
|
char* encoded = (char*)malloc(input_len * 3 + 1); // +1 for null terminator
|
||||||
|
if (!encoded) {
|
||||||
|
fprintf(stderr, "Memory allocation failed\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define the characters that don't need encoding
|
||||||
|
const char* safe_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~";
|
||||||
|
|
||||||
|
// Initialize variables for input and output string indices
|
||||||
|
size_t i = 0; // index for input string
|
||||||
|
size_t j = 0; // index for output string
|
||||||
|
|
||||||
|
// Loop through each character in the input string
|
||||||
|
while (input[i]) {
|
||||||
|
// Check if the character is a safe character
|
||||||
|
if (strchr(safe_chars, input[i]) != NULL) {
|
||||||
|
encoded[j++] = input[i++]; // Copy safe character as is
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Encode non-safe character as percent-encoded representation
|
||||||
|
sprintf(encoded + j, "%%%02X", (unsigned char)input[i]);
|
||||||
|
j += 3; // Increment output index by 3 to account for encoding (%XX)
|
||||||
|
i++; // Move to the next character in the input string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Null-terminate the encoded string
|
||||||
|
encoded[j] = '\0';
|
||||||
|
|
||||||
|
return encoded;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -6,4 +6,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
int connect_to_srv(const char* url, char* out, int max_len, bool ignore_insecure);
|
int connect_to_srv(const char* url, char* out, int max_len, bool ignore_insecure);
|
||||||
int download_file_from_srv(const char* url, const char* outputFileName,bool ignore_insecure);
|
int download_file_from_srv(const char* url, const char* outputFileName,bool ignore_insecure);
|
||||||
|
int fast_send(const char* url, bool ignore_insecure);
|
||||||
|
char* url_encode(const char* input);
|
||||||
@@ -16,7 +16,14 @@ std::string get_loglevel(LOGLEVEL level) {
|
|||||||
return "RISK";
|
return "RISK";
|
||||||
case LOGLEVEL::PANIC:
|
case LOGLEVEL::PANIC:
|
||||||
return "PANIC";
|
return "PANIC";
|
||||||
|
case LOGLEVEL::INFO_NOSEND:
|
||||||
|
return "INFO_NOSEND";
|
||||||
|
case LOGLEVEL::WARN_NOSEND:
|
||||||
|
return "WARNING_NOSEND";
|
||||||
|
case LOGLEVEL::ERR_NOSEND:
|
||||||
|
return "ERROR_NOSEND";
|
||||||
|
case LOGLEVEL::PANIC_NOSEND:
|
||||||
|
return "PANIC_NOSEND";
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,21 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include "connect.h"
|
||||||
#include "well_known.h"
|
#include "well_known.h"
|
||||||
|
#include "settings.h"
|
||||||
|
#include "security.h"
|
||||||
enum class LOGLEVEL {
|
enum class LOGLEVEL {
|
||||||
INFO,
|
INFO,
|
||||||
WARN,
|
WARN,
|
||||||
ERR,
|
ERR,
|
||||||
VIRUS,
|
VIRUS,
|
||||||
RISK,
|
RISK,
|
||||||
PANIC
|
PANIC,
|
||||||
|
INFO_NOSEND,
|
||||||
|
WARN_NOSEND,
|
||||||
|
ERR_NOSEND,
|
||||||
|
PANIC_NOSEND
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string get_loglevel(LOGLEVEL level);
|
std::string get_loglevel(LOGLEVEL level);
|
||||||
@@ -30,10 +37,10 @@ void log(LOGLEVEL level, const std::string& message, Args&&... args) {
|
|||||||
logStream << std::put_time(&tm, "%Y-%m-%d %H:%M:%S") << " " << prefix << " " << message;
|
logStream << std::put_time(&tm, "%Y-%m-%d %H:%M:%S") << " " << prefix << " " << message;
|
||||||
if constexpr (sizeof...(args) > 0) {
|
if constexpr (sizeof...(args) > 0) {
|
||||||
((logStream << ' ' << std::forward<Args>(args)), ...);
|
((logStream << ' ' << std::forward<Args>(args)), ...);
|
||||||
((to_srv << ' ' << std::forward<Args>(args)), ...);
|
((to_srv << ' ' << std::forward<Args>(args)), ...);
|
||||||
}
|
}
|
||||||
logStream << std::endl;
|
logStream << std::endl;
|
||||||
to_srv << std::endl;
|
//to_srv << std::endl;
|
||||||
std::string logString = logStream.str();
|
std::string logString = logStream.str();
|
||||||
std::string to_srv_string = to_srv.str();
|
std::string to_srv_string = to_srv.str();
|
||||||
printf("info from logger: %s", logString.c_str());
|
printf("info from logger: %s", logString.c_str());
|
||||||
@@ -41,68 +48,79 @@ void log(LOGLEVEL level, const std::string& message, Args&&... args) {
|
|||||||
FILE* fp;
|
FILE* fp;
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case LOGLEVEL::INFO:
|
case LOGLEVEL::INFO:
|
||||||
error=fopen_s(&fp, INFOFILE, "a");
|
error = fopen_s(&fp, INFOFILE, "a");
|
||||||
break;
|
break;
|
||||||
case LOGLEVEL::WARN:
|
case LOGLEVEL::WARN:
|
||||||
error=fopen_s(&fp, WARNFILE, "a");
|
error = fopen_s(&fp, WARNFILE, "a");
|
||||||
break;
|
break;
|
||||||
case LOGLEVEL::ERR:
|
case LOGLEVEL::ERR:
|
||||||
error=fopen_s(&fp, ERRORFILE, "a");
|
error = fopen_s(&fp, ERRORFILE, "a");
|
||||||
break;
|
break;
|
||||||
case LOGLEVEL::VIRUS:
|
case LOGLEVEL::VIRUS:
|
||||||
error=fopen_s(&fp, VIRUSFILE, "a");
|
error = fopen_s(&fp, VIRUSFILE, "a");
|
||||||
break;
|
break;
|
||||||
case LOGLEVEL::RISK:
|
case LOGLEVEL::RISK:
|
||||||
error=fopen_s(&fp, RISKFILE, "a");
|
error = fopen_s(&fp, RISKFILE, "a");
|
||||||
break;
|
break;
|
||||||
case LOGLEVEL::PANIC:
|
case LOGLEVEL::PANIC:
|
||||||
error = fopen_s(&fp, PANICFILE, "a");
|
error = fopen_s(&fp, PANICFILE, "a");
|
||||||
break;
|
break;
|
||||||
|
case LOGLEVEL::INFO_NOSEND:
|
||||||
default:
|
error = fopen_s(&fp, INFOFILE, "a");
|
||||||
error=fopen_s(&fp, LOGFILE, "a");
|
break;
|
||||||
break;
|
case LOGLEVEL::WARN_NOSEND:
|
||||||
}
|
error = fopen_s(&fp, WARNFILE, "a");
|
||||||
if (error != 0) {
|
break;
|
||||||
//panic, create log entry, return 1;
|
case LOGLEVEL::ERR_NOSEND:
|
||||||
//printf("a");
|
error = fopen_s(&fp, ERRORFILE, "a");
|
||||||
return;
|
break;
|
||||||
|
default:
|
||||||
|
error = fopen_s(&fp, LOGFILE, "a");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (error != 0) {
|
||||||
|
//panic, create log entry, return 1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (level) {
|
//write log entry to disk
|
||||||
case LOGLEVEL::INFO:
|
fprintf_s(fp, "%s", logString.c_str());
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
case LOGLEVEL::WARN:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
case LOGLEVEL::ERR:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
case LOGLEVEL::VIRUS:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
case LOGLEVEL::RISK:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
case LOGLEVEL::PANIC:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
//write to general log file
|
||||||
if (fopen_s(&fp, LOGFILE, "a") == 0) {
|
if (fopen_s(&fp, LOGFILE, "a") == 0) {
|
||||||
fprintf_s(fp, "%s", logString.c_str());
|
fprintf_s(fp, "%s", logString.c_str());
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
//write to server log file
|
||||||
if (fopen_s(&fp, SRV_LOGFILE, "a") == 0) {
|
if (fopen_s(&fp, SRV_LOGFILE, "a") == 0) {
|
||||||
fprintf_s(fp, "%s", to_srv_string.c_str());
|
fprintf_s(fp, "%s\n", to_srv_string.c_str());
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//send log so srv
|
||||||
|
//build up the log string: loglevel&logtext&machineid&date
|
||||||
|
//to_srv_string=includes the log message
|
||||||
|
//we now need to build up the request string and append the machineid
|
||||||
|
if (level!=LOGLEVEL::INFO_NOSEND && level!=LOGLEVEL::WARN_NOSEND && level!=LOGLEVEL::ERR_NOSEND && level!=LOGLEVEL::PANIC_NOSEND) {
|
||||||
|
char* url = new char[3000];
|
||||||
|
if (get_setting("server:server_url", url) == 0 or strcmp(url, "nan") == 0) {
|
||||||
|
strcat_s(url, 3000, "/api/php/log/add_entry.php?logtext=");//need to add machine_id and apikey
|
||||||
|
strcat_s(url, 3000, url_encode(to_srv_string.c_str()));
|
||||||
|
strcat_s(url, 3000, "&machine_id=");
|
||||||
|
strcat_s(url, 3000, get_machineid(SECRETS));
|
||||||
|
strcat_s(url, 3000, "&apikey=");
|
||||||
|
strcat_s(url, 3000, get_apikey(SECRETS));
|
||||||
|
fast_send(url, get_setting("communication:unsafe_tls");
|
||||||
|
//we might not want to log an error occuring here because it will create a loop
|
||||||
|
delete[] url;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete[] url;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}//else we do not send the log to the server
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // LOGGER_H
|
#endif // LOGGER_H
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ int load_settings() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char*settings_cmd=new char[505];
|
char*settings_cmd=new char[505];
|
||||||
char*settings_arg= new char[300];
|
char*settings_arg=new char[300];
|
||||||
fscanf_s(fp, "%s", settings_cmd, 500); //the cert is always the firs tline
|
fscanf_s(fp, "%s", settings_cmd, 500); //the cert is always the firs tline
|
||||||
while (!feof(fp)) {
|
while (!feof(fp)) {
|
||||||
fscanf_s(fp, "%s", settings_cmd, 295); // get the command
|
fscanf_s(fp, "%s", settings_cmd, 295); // get the command
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ int update_settings(const char*settings_type) {
|
|||||||
res = download_file_from_srv(url, SCHED_PATH, get_setting("communication:unsafe_tls"));
|
res = download_file_from_srv(url, SCHED_PATH, get_setting("communication:unsafe_tls"));
|
||||||
//int res = 0;
|
//int res = 0;
|
||||||
if (res != 0) {
|
if (res != 0) {
|
||||||
log(LOGLEVEL::ERR, "[update_settings()]: Error downloading settings database file from server", url, " ERROR:", res);
|
log(LOGLEVEL::ERR, "[update_settings()]: Error downloading settings database file from server", " ERROR:", res);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -8,13 +8,16 @@ if(check_apikey()!==true){
|
|||||||
|
|
||||||
//add the entry to the log db
|
//add the entry to the log db
|
||||||
//this page has no gui, it may return ok or error
|
//this page has no gui, it may return ok or error
|
||||||
if(!isset($_GET["loglevel"]) or !isset($_GET["logtext"]) or !isset($_GET["machine_id"]) or !isset($_GET["time"]))
|
if(!isset($_GET["logtext"]) or !isset($_GET["machine_id"]))
|
||||||
echo("syn_err");
|
echo("syn_err");
|
||||||
else{
|
else{
|
||||||
$loglevel=htmlspecialchars($_GET["loglevel"]);
|
|
||||||
$logtext=htmlspecialchars($_GET["logtext"]);
|
$logtext=htmlspecialchars($_GET["logtext"]);
|
||||||
|
$log=explode(";",$logtext);
|
||||||
|
$message=$log[2];
|
||||||
|
$loglevel=$log[1];
|
||||||
$machine_id=htmlspecialchars($_GET["machine_id"]);
|
$machine_id=htmlspecialchars($_GET["machine_id"]);
|
||||||
$time=htmlspecialchars($_GET["time"]);
|
$time=log[0];
|
||||||
|
|
||||||
//include db pw
|
//include db pw
|
||||||
include "../../../config.php";
|
include "../../../config.php";
|
||||||
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
|
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ if(isset($_GET["page"])){
|
|||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<p>Home</p>
|
<p>Home</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="index.php?page=welcome.php">Welcome</a></li>
|
<li><a href="index.php?page=welcome.php">Dashboard</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>User</p>
|
<p>User</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user