adding xss mitigations to server
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$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": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAA5AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAGwAAAAAAAAAAAAAAJYAAAABAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "connect.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp",
|
||||
"RelativeDocumentMoniker": "connect.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp",
|
||||
"RelativeToolTip": "connect.cpp",
|
||||
"ViewState": "AQIAACEAAAAAAAAAAAAIwC0AAAArAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-19T18:03:49.536Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "connect.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h",
|
||||
"RelativeDocumentMoniker": "connect.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h",
|
||||
"RelativeToolTip": "connect.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-19T18:03:42.761Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "well_known.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeDocumentMoniker": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAA5AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAGYAAAAAAAAAAAAAAJEAAAA0AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:connect.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:connect.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 3,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "connect.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp",
|
||||
"RelativeDocumentMoniker": "connect.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.cpp",
|
||||
"RelativeToolTip": "connect.cpp",
|
||||
"ViewState": "AQIAACEAAAAAAAAAAAAIwC0AAAArAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-19T18:03:49.536Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "connect.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h",
|
||||
"RelativeDocumentMoniker": "connect.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\connect.h",
|
||||
"RelativeToolTip": "connect.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-19T18:03:42.761Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "well_known.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeDocumentMoniker": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAA5AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAGYAAAAAAAAAAAAAAJEAAAA0AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$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": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAAVAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABQAAAAbAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$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": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAAVAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAAMAAAAAAAAAAAAAAB8AAAA6AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{C434E5CA-752E-4D35-9986-BECF1CC34A98}|client_frontend_guilite.vcxproj|solutionrelative:main.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$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": "..\\client_backend\\well_known.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\well_known.h",
|
||||
"RelativeToolTip": "..\\client_backend\\well_known.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAAVAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-03-17T16:32:22.34Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "main.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeDocumentMoniker": "main.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_frontend_guilite\\main.cpp",
|
||||
"RelativeToolTip": "main.cpp",
|
||||
"ViewState": "AQIAAFYAAAAAAAAAAAAIwIsAAAANAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-03-14T19:45:55.142Z",
|
||||
"EditorCaption": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\main.cpp;C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\main.obj
|
||||
@@ -1,2 +0,0 @@
|
||||
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_frontend_guilite\|
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
^C:\USERS\JANIS\DOCUMENTS\PROJEKTE_MIT_C\MA\MA\SRC\CLIENT_FRONTEND_GUILITE\CLIENT_F.C434E5CA\X64\DEBUG\MAIN.OBJ
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\client_frontend_guilite.ilk
|
||||
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\client_frontend_guilite.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
main.cpp
|
||||
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared\minwindef.h(130,1): warning C4005: "APIENTRY": Makro-Neudefinition
|
||||
(Quelldatei „main.cpp“ wird kompiliert)
|
||||
C:\vcpkg\vcpkg-2023.08.09\installed\x64-windows\include\GLFW\glfw3.h(123,1):
|
||||
Siehe vorherige Definition von "APIENTRY"
|
||||
|
||||
LINK : warning LNK4044: Nicht erkannte Option /lOpenGL; wird ignoriert.
|
||||
LINK : warning LNK4044: Nicht erkannte Option /lOpenGL; wird ignoriert.
|
||||
client_frontend_guilite.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\client_frontend_guilite.exe
|
||||
@@ -1,2 +0,0 @@
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\glfw3.dll
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\client_f.c434e5ca\x64\Debug\client_f.58F0C424.Up2Date
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\client_frontend_guilite\x64\Debug\glfw3.dll
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34701.34
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client_frontend_guilite", "client_frontend_guilite.vcxproj", "{C434E5CA-752E-4D35-9986-BECF1CC34A98}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x64.Build.0 = Debug|x64
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x64.ActiveCfg = Release|x64
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x64.Build.0 = Release|x64
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C434E5CA-752E-4D35-9986-BECF1CC34A98}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4C17868F-AC7A-4A40-8081-8BB25B004F6A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{c434e5ca-752e-4d35-9986-becf1cc34a98}</ProjectGuid>
|
||||
<RootNamespace>clientfrontendguilite</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(VCPKG_ROOT);</AdditionalIncludeDirectories>
|
||||
<ForcedIncludeFiles>
|
||||
</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>$(CoreLibraryDependencies);%(AdditionalDependencies);-lOpenGL;</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Quelldateien">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Headerdateien">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Ressourcendateien">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Quelldateien</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,271 +0,0 @@
|
||||
#include <nanogui/nanogui.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <shlobj.h>
|
||||
#include <windows.h>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include <fstream>
|
||||
|
||||
#include "../client_backend/well_known.h"
|
||||
// Function to simulate file scanning
|
||||
void scan_file(nanogui::Screen* screen, nanogui::Widget* contentWidget, const std::string& filePath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned file path in the window
|
||||
nanogui::Label* lineLabel1 = new nanogui::Label(contentWidget, "Scanning file: " + filePath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
//printf("%d\n",send_to_pipe("scanfile \"" + filePath + "\""));
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfile \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel2 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
nanogui::Label* lineLabel3 = new nanogui::Label(contentWidget, "Virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel4 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is infected\n");
|
||||
nanogui::Label* lineLabel5 = new nanogui::Label(contentWidget, "Hash: " + hash + "\n");
|
||||
nanogui::Label* lineLabel6 = new nanogui::Label(contentWidget, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel7 = new nanogui::Label(contentWidget, "No virus found in file: " + scannedFilePath + "\n");
|
||||
}
|
||||
nanogui::Label* lineLabel9 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
answered = true;
|
||||
nanogui::Label* lineLabel10 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
nanogui::Label* lineLabel11 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
inputFile.close();
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
|
||||
// Function to simulate folder scanning
|
||||
void scan_folder(nanogui::Screen* screen, nanogui::Widget* contentWidget, const std::string& filePath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned folder path in the window
|
||||
nanogui::Label* lineLabel1 = new nanogui::Label(contentWidget, "Scanning folder: " + filePath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfolder \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel2 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
while (!inputFile.eof()) {
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
//answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
nanogui::Label* lineLabel3 = new nanogui::Label(contentWidget, "Virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel4 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is infected\n");
|
||||
nanogui::Label* lineLabel5 = new nanogui::Label(contentWidget, "Hash: " + hash + "\n");
|
||||
nanogui::Label* lineLabel6 = new nanogui::Label(contentWidget, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel7 = new nanogui::Label(contentWidget, "No virus found in file: " + scannedFilePath + "\n");
|
||||
}
|
||||
nanogui::Label* lineLabel9 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
if (status == "end")
|
||||
answered = true;
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
Sleep(1000);//only see for new entrys ~ once a second
|
||||
std::ofstream (ANSWER_COM_PATH);//clear the file
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
std::string getFolderPath() {
|
||||
std::string selectedFolderPath;
|
||||
|
||||
// Initialize COM
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
// Display the folder picker dialog
|
||||
BROWSEINFO browseInfo = { 0 };
|
||||
TCHAR selectedPath[MAX_PATH];
|
||||
browseInfo.hwndOwner = NULL; // Use the desktop window as the owner
|
||||
browseInfo.pidlRoot = NULL; // Start from the desktop
|
||||
browseInfo.pszDisplayName = selectedPath;
|
||||
browseInfo.lpszTitle = TEXT("Select a folder");
|
||||
browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
|
||||
|
||||
LPITEMIDLIST pidlSelected = SHBrowseForFolder(&browseInfo);
|
||||
if (pidlSelected != NULL) {
|
||||
SHGetPathFromIDList(pidlSelected, selectedPath);
|
||||
|
||||
// Convert TCHAR array to std::string
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
selectedFolderPath = converter.to_bytes(selectedPath);
|
||||
|
||||
// Free the PIDL
|
||||
IMalloc* pMalloc;
|
||||
if (SUCCEEDED(SHGetMalloc(&pMalloc))) {
|
||||
pMalloc->Free(pidlSelected);
|
||||
pMalloc->Release();
|
||||
}
|
||||
}
|
||||
|
||||
// Uninitialize COM
|
||||
CoUninitialize();
|
||||
|
||||
return selectedFolderPath;
|
||||
}
|
||||
int main() {
|
||||
// Initialize NanoGUI
|
||||
nanogui::init();
|
||||
|
||||
// Create a NanoGUI screen
|
||||
nanogui::Screen screen(nanogui::Vector2i(800, 600), "Cyberhex endpoint protection");
|
||||
// Create a layout for the buttons
|
||||
nanogui::Widget* buttonWidget = new nanogui::Widget(&screen);
|
||||
nanogui::BoxLayout* buttonLayout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Middle,
|
||||
5, 5);
|
||||
buttonWidget->setLayout(buttonLayout);
|
||||
|
||||
// Create a widget inside the scroll panel to hold the content
|
||||
|
||||
nanogui::VScrollPanel* scrollPanel = new nanogui::VScrollPanel(&screen);
|
||||
scrollPanel->setLayout(new nanogui::GroupLayout(10));
|
||||
nanogui::Widget* contentWidget = new nanogui::Widget(scrollPanel);
|
||||
contentWidget->setLayout(new nanogui::GroupLayout(10));
|
||||
scrollPanel->setFixedSize(nanogui::Vector2i(750, 450));
|
||||
|
||||
|
||||
|
||||
// Create a button for scanning a file
|
||||
nanogui::Button* scanFileButton = new nanogui::Button(buttonWidget, "Scan File");
|
||||
scanFileButton->setFixedWidth(150);
|
||||
scanFileButton->setCallback([&] {
|
||||
// Open file dialog to select a file
|
||||
std::string selectedFile = nanogui::file_dialog(
|
||||
{ {"*", "All Files"} },
|
||||
false
|
||||
);
|
||||
if (!selectedFile.empty()) {
|
||||
// Call scan_file function in a separate thread
|
||||
std::thread(scan_file, &screen, contentWidget, selectedFile).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Create a button for scanning a folder
|
||||
nanogui::Button* scanFolderButton = new nanogui::Button(buttonWidget, "Scan Folder");
|
||||
scanFolderButton->setFixedWidth(150);
|
||||
scanFolderButton->setCallback([&] {
|
||||
// Open file dialog to select a folder
|
||||
std::string selectedFolder = getFolderPath();
|
||||
if (!selectedFolder.empty()) {
|
||||
// Call scan_folder function in a separate thread
|
||||
std::thread(scan_folder, &screen, contentWidget, selectedFolder).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Set the layout for the main screen
|
||||
nanogui::BoxLayout* layout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Minimum,
|
||||
10, 10);
|
||||
|
||||
|
||||
|
||||
// Add 100 lines to the content widget
|
||||
//for (int i = 0; i < 100; ++i) {
|
||||
// nanogui::Label* lineLabel = new nanogui::Label(contentWidget, "Line " + std::to_string(i));
|
||||
// lineLabel->setFixedWidth(200);
|
||||
//}
|
||||
|
||||
// Scroll panel will automatically take the size of its content
|
||||
//scrollPanel->setFixedHeight(300);
|
||||
|
||||
//screen.setVisible(true);
|
||||
|
||||
|
||||
screen.setLayout(layout);
|
||||
|
||||
|
||||
// Draw NanoGUI
|
||||
screen.performLayout();
|
||||
screen.setVisible(true);
|
||||
|
||||
// Main event loop
|
||||
nanogui::mainloop();
|
||||
|
||||
// Shutdown NanoGUI
|
||||
nanogui::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,243 +0,0 @@
|
||||
#include <nanogui/nanogui.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <shlobj.h>
|
||||
#include <windows.h>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include <fstream>
|
||||
#include "../client_backend/well_known.h"
|
||||
// Function to simulate file scanning
|
||||
void scan_file(nanogui::Screen* screen, const std::string& filePath) {
|
||||
// Display the scanned file path in the window
|
||||
screen->add<nanogui::Label>("Scanning file: " + filePath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfile \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
screen->add<nanogui::Label>("Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
screen->add<nanogui::Label>("Virus found in file: " + scannedFilePath + "\n");
|
||||
screen->add<nanogui::Label>("File: " + scannedFilePath + " is infected\n");
|
||||
screen->add<nanogui::Label>("Hash: " + hash + "\n");
|
||||
screen->add<nanogui::Label>("Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
screen->add<nanogui::Label>("No virus found in file: " + scannedFilePath + "\n");
|
||||
screen->add<nanogui::Label>("File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
screen->add<nanogui::Label>("------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
answered = true;
|
||||
screen->add<nanogui::Label>("Error: Unable to talk to daemon!\n");
|
||||
screen->add<nanogui::Label>("------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
|
||||
// Function to simulate folder scanning
|
||||
void scan_folder(nanogui::Screen* screen, const std::string& folderPath) {
|
||||
// Display the scanned folder path in the window
|
||||
screen->add<nanogui::Label>("Scanning folder: " + folderPath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfolder \"" << folderPath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
screen->add<nanogui::Label>("Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
while (!inputFile.eof()) {
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
screen->add<nanogui::Label>("Virus found in file: " + scannedFilePath + "\n");
|
||||
screen->add<nanogui::Label>("File: " + scannedFilePath + " is infected\n");
|
||||
screen->add<nanogui::Label>("Hash: " + hash + "\n");
|
||||
screen->add<nanogui::Label>("Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
screen->add<nanogui::Label>("No virus found in file: " + scannedFilePath + "\n");
|
||||
screen->add<nanogui::Label>("File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
screen->add<nanogui::Label>("------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
answered = true;
|
||||
screen->add<nanogui::Label>("Error: Unable to talk to daemon!\n");
|
||||
screen->add<nanogui::Label>("------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
std::string getFolderPath() {
|
||||
std::string selectedFolderPath;
|
||||
|
||||
// Initialize COM
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
// Display the folder picker dialog
|
||||
BROWSEINFO browseInfo = { 0 };
|
||||
TCHAR selectedPath[MAX_PATH];
|
||||
browseInfo.hwndOwner = NULL; // Use the desktop window as the owner
|
||||
browseInfo.pidlRoot = NULL; // Start from the desktop
|
||||
browseInfo.pszDisplayName = selectedPath;
|
||||
browseInfo.lpszTitle = TEXT("Select a folder");
|
||||
browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
|
||||
|
||||
LPITEMIDLIST pidlSelected = SHBrowseForFolder(&browseInfo);
|
||||
if (pidlSelected != NULL) {
|
||||
SHGetPathFromIDList(pidlSelected, selectedPath);
|
||||
|
||||
// Convert TCHAR array to std::string
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
selectedFolderPath = converter.to_bytes(selectedPath);
|
||||
|
||||
// Free the PIDL
|
||||
IMalloc* pMalloc;
|
||||
if (SUCCEEDED(SHGetMalloc(&pMalloc))) {
|
||||
pMalloc->Free(pidlSelected);
|
||||
pMalloc->Release();
|
||||
}
|
||||
}
|
||||
|
||||
// Uninitialize COM
|
||||
CoUninitialize();
|
||||
|
||||
return selectedFolderPath;
|
||||
}
|
||||
int main() {
|
||||
// Initialize NanoGUI
|
||||
nanogui::init();
|
||||
|
||||
// Create a NanoGUI screen
|
||||
nanogui::Screen screen(nanogui::Vector2i(800, 600), "Cyberhex endpoint protection");
|
||||
|
||||
// Create a layout for the buttons
|
||||
nanogui::Widget* buttonWidget = new nanogui::Widget(&screen);
|
||||
nanogui::BoxLayout* buttonLayout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Middle,
|
||||
5, 5);
|
||||
buttonWidget->setLayout(buttonLayout);
|
||||
|
||||
// Create a button for scanning a file
|
||||
nanogui::Button* scanFileButton = new nanogui::Button(buttonWidget, "Scan File");
|
||||
scanFileButton->setFixedWidth(150);
|
||||
scanFileButton->setCallback([&] {
|
||||
// Open file dialog to select a file
|
||||
std::string selectedFile = nanogui::file_dialog(
|
||||
{ {"*", "All Files"} },
|
||||
false
|
||||
);
|
||||
if (!selectedFile.empty()) {
|
||||
// Call scan_file function in a separate thread
|
||||
std::thread(scan_file, &screen, selectedFile).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Create a button for scanning a folder
|
||||
nanogui::Button* scanFolderButton = new nanogui::Button(buttonWidget, "Scan Folder");
|
||||
scanFolderButton->setFixedWidth(150);
|
||||
scanFolderButton->setCallback([&] {
|
||||
// Open file dialog to select a folder
|
||||
std::string selectedFolder = getFolderPath();
|
||||
if (!selectedFolder.empty()) {
|
||||
// Call scan_folder function in a separate thread
|
||||
std::thread(scan_folder, &screen, selectedFolder).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Set the layout for the main screen
|
||||
nanogui::BoxLayout* layout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Minimum,
|
||||
10, 10);
|
||||
screen.setLayout(layout);
|
||||
|
||||
// Draw NanoGUI
|
||||
screen.performLayout();
|
||||
screen.setVisible(true);
|
||||
|
||||
// Main event loop
|
||||
nanogui::mainloop();
|
||||
|
||||
// Shutdown NanoGUI
|
||||
nanogui::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,272 +0,0 @@
|
||||
#include <nanogui/nanogui.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <shlobj.h>
|
||||
#include <windows.h>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include <fstream>
|
||||
#include "../client_backend/well_known.h"
|
||||
|
||||
// Function to add a message to the scrollable field
|
||||
void addMessage(nanogui::Widget* scrollContent, const std::string& message) {
|
||||
nanogui::Label* label = new nanogui::Label(scrollContent, message);
|
||||
label->setFixedWidth(600);
|
||||
//label->setWordWrap(true);
|
||||
}
|
||||
|
||||
// Function to simulate file scanning
|
||||
void scan_file(nanogui::Screen* screen, const std::string& filePath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned file path in the window
|
||||
auto scrollContent = new nanogui::Widget(screen);
|
||||
screen->setLayout(new nanogui::BoxLayout(nanogui::Orientation::Vertical, nanogui::Alignment::Minimum, 0, 0));
|
||||
addMessage(scrollContent, "Scanning file: " + filePath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfile \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
addMessage(scrollContent, "Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
addMessage(scrollContent, "Virus found in file: " + scannedFilePath + "\n");
|
||||
addMessage(scrollContent, "File: " + scannedFilePath + " is infected\n");
|
||||
addMessage(scrollContent, "Hash: " + hash + "\n");
|
||||
addMessage(scrollContent, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
addMessage(scrollContent, "No virus found in file: " + scannedFilePath + "\n");
|
||||
addMessage(scrollContent, "File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
addMessage(scrollContent, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
answered = true;
|
||||
addMessage(scrollContent, "Error: Unable to talk to daemon!\n");
|
||||
addMessage(scrollContent, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
inputFile.close();
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
|
||||
// Function to simulate folder scanning
|
||||
void scan_folder(nanogui::Screen* screen, const std::string& folderPath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned folder path in the window
|
||||
auto scrollContent = new nanogui::Widget(screen);
|
||||
screen->setLayout(new nanogui::BoxLayout(nanogui::Orientation::Vertical, nanogui::Alignment::Minimum, 0, 0));
|
||||
addMessage(scrollContent, "Scanning folder: " + folderPath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfolder \"" << folderPath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
addMessage(scrollContent, "Error: Unable to talk to daemon!\n");
|
||||
screen->performLayout();
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
while (!inputFile.eof()) {
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
//answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
addMessage(scrollContent, "Virus found in file: " + scannedFilePath + "\n");
|
||||
addMessage(scrollContent, "File: " + scannedFilePath + " is infected\n");
|
||||
addMessage(scrollContent, "Hash: " + hash + "\n");
|
||||
addMessage(scrollContent, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
addMessage(scrollContent, "No virus found in file: " + scannedFilePath + "\n");
|
||||
addMessage(scrollContent, "File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
addMessage(scrollContent, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
if (status == "end")
|
||||
answered = true;
|
||||
}
|
||||
else {
|
||||
//answered = true;
|
||||
addMessage(scrollContent, "Error: Unable to talk to daemon!\n");
|
||||
addMessage(scrollContent, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
|
||||
std::string getFolderPath() {
|
||||
std::string selectedFolderPath;
|
||||
|
||||
// Initialize COM
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
// Display the folder picker dialog
|
||||
BROWSEINFO browseInfo = { 0 };
|
||||
TCHAR selectedPath[MAX_PATH];
|
||||
browseInfo.hwndOwner = NULL; // Use the desktop window as the owner
|
||||
browseInfo.pidlRoot = NULL; // Start from the desktop
|
||||
browseInfo.pszDisplayName = selectedPath;
|
||||
browseInfo.lpszTitle = TEXT("Select a folder");
|
||||
browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
|
||||
|
||||
LPITEMIDLIST pidlSelected = SHBrowseForFolder(&browseInfo);
|
||||
if (pidlSelected != NULL) {
|
||||
SHGetPathFromIDList(pidlSelected, selectedPath);
|
||||
|
||||
// Convert TCHAR array to std::string
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
selectedFolderPath = converter.to_bytes(selectedPath);
|
||||
|
||||
// Free the PIDL
|
||||
IMalloc* pMalloc;
|
||||
if (SUCCEEDED(SHGetMalloc(&pMalloc))) {
|
||||
pMalloc->Free(pidlSelected);
|
||||
pMalloc->Release();
|
||||
}
|
||||
}
|
||||
|
||||
// Uninitialize COM
|
||||
CoUninitialize();
|
||||
|
||||
return selectedFolderPath;
|
||||
}
|
||||
|
||||
int main() {
|
||||
// Initialize NanoGUI
|
||||
nanogui::init();
|
||||
|
||||
// Create a NanoGUI screen
|
||||
nanogui::Screen screen(nanogui::Vector2i(800, 600), "Cyberhex endpoint protection");
|
||||
|
||||
// Create a layout for the buttons
|
||||
nanogui::Widget* buttonWidget = new nanogui::Widget(&screen);
|
||||
nanogui::BoxLayout* buttonLayout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Middle,
|
||||
5, 5);
|
||||
buttonWidget->setLayout(buttonLayout);
|
||||
|
||||
// Create a button for scanning a file
|
||||
nanogui::Button* scanFileButton = new nanogui::Button(buttonWidget, "Scan File");
|
||||
scanFileButton->setFixedWidth(150);
|
||||
scanFileButton->setCallback([&] {
|
||||
// Open file dialog to select a file
|
||||
std::string selectedFile = nanogui::file_dialog(
|
||||
{ {"*", "All Files"} },
|
||||
false
|
||||
);
|
||||
if (!selectedFile.empty()) {
|
||||
// Call scan_file function in a separate thread
|
||||
std::thread(scan_file, &screen, selectedFile).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Create a button for scanning a folder
|
||||
nanogui::Button* scanFolderButton = new nanogui::Button(buttonWidget, "Scan Folder");
|
||||
scanFolderButton->setFixedWidth(150);
|
||||
scanFolderButton->setCallback([&] {
|
||||
// Open file dialog to select a folder
|
||||
std::string selectedFolder = getFolderPath();
|
||||
if (!selectedFolder.empty()) {
|
||||
// Call scan_folder function in a separate thread
|
||||
std::thread(scan_folder, &screen, selectedFolder).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Create a scrollable panel
|
||||
nanogui::VScrollPanel* scrollPanel = new nanogui::VScrollPanel(&screen);
|
||||
scrollPanel->setFixedWidth(700);
|
||||
scrollPanel->setFixedHeight(500);
|
||||
nanogui::Widget* scrollContent = new nanogui::Widget(scrollPanel);
|
||||
scrollContent->setLayout(new nanogui::BoxLayout(nanogui::Orientation::Vertical, nanogui::Alignment::Minimum, 0, 0));
|
||||
scrollPanel->setFixedSize({ 700, 500 });
|
||||
|
||||
// Set the layout for the main screen
|
||||
nanogui::BoxLayout* layout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Minimum,
|
||||
10, 10);
|
||||
screen.setLayout(layout);
|
||||
|
||||
// Draw NanoGUI
|
||||
screen.performLayout();
|
||||
screen.setVisible(true);
|
||||
|
||||
// Main event loop
|
||||
nanogui::mainloop();
|
||||
|
||||
// Shutdown NanoGUI
|
||||
nanogui::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,270 +0,0 @@
|
||||
#include <nanogui/nanogui.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <iostream>
|
||||
#include <shlobj.h>
|
||||
#include <windows.h>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
#include <fstream>
|
||||
#include "../client_backend/well_known.h"
|
||||
// Function to simulate file scanning
|
||||
void scan_file(nanogui::Screen*screen ,nanogui::Widget* contentWidget, const std::string& filePath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned file path in the window
|
||||
nanogui::Label* lineLabel1 = new nanogui::Label(contentWidget, "Scanning file: " + filePath + "\n");
|
||||
screen->performLayout();
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfile \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel2 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
nanogui::Label* lineLabel3 = new nanogui::Label(contentWidget, "Virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel4 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is infected\n");
|
||||
nanogui::Label* lineLabel5 = new nanogui::Label(contentWidget, "Hash: " + hash + "\n");
|
||||
nanogui::Label* lineLabel6 = new nanogui::Label(contentWidget, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel7 = new nanogui::Label(contentWidget, "No virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel8 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
nanogui::Label* lineLabel9 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
}
|
||||
else {
|
||||
answered = true;
|
||||
nanogui::Label* lineLabel10 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
nanogui::Label* lineLabel11 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
screen->performLayout();
|
||||
}
|
||||
inputFile.close();
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
|
||||
// Function to simulate folder scanning
|
||||
void scan_folder(nanogui::Widget* contentWidget, const std::string& filePath) {
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
// Display the scanned folder path in the window
|
||||
nanogui::Label* lineLabel1 = new nanogui::Label(contentWidget, "Scanning folder: " + filePath + "\n");
|
||||
bool answered = false;
|
||||
// Write command into com file
|
||||
std::ofstream outputFile(MAIN_COM_PATH);
|
||||
if (outputFile.is_open()) {
|
||||
outputFile << "scanfolder \"" << filePath << "\"";
|
||||
outputFile.close();
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel2 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
return;
|
||||
}
|
||||
while (!answered) {
|
||||
// Wait for answer in file
|
||||
std::ifstream inputFile(ANSWER_COM_PATH);
|
||||
// The structure of the answer file is as follows:
|
||||
// found/not_found
|
||||
// filepath
|
||||
// hash
|
||||
// action_taken/no_action_taken
|
||||
if (inputFile.is_open()) {
|
||||
std::string status, scannedFilePath, hash, action;
|
||||
while (!inputFile.eof()) {
|
||||
if (inputFile >> status) {
|
||||
inputFile.ignore(1); // Ignore space
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
if (status == "found" || status == "not_found") {
|
||||
std::getline(inputFile, scannedFilePath, '\"'); // Read until closing double quote
|
||||
inputFile.ignore(1); // Ignore space between filepath and hash
|
||||
inputFile.ignore(1); // Ignore starting double quote
|
||||
std::getline(inputFile, hash, ' '); // Read until space
|
||||
std::getline(inputFile, action); // Read until end of line
|
||||
|
||||
//answered = true;
|
||||
|
||||
if (status == "found") {
|
||||
nanogui::Label* lineLabel3 = new nanogui::Label(contentWidget, "Virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel4 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is infected\n");
|
||||
nanogui::Label* lineLabel5 = new nanogui::Label(contentWidget, "Hash: " + hash + "\n");
|
||||
nanogui::Label* lineLabel6 = new nanogui::Label(contentWidget, "Action taken: " + action + "\n");
|
||||
}
|
||||
else {
|
||||
nanogui::Label* lineLabel7 = new nanogui::Label(contentWidget, "No virus found in file: " + scannedFilePath + "\n");
|
||||
nanogui::Label* lineLabel8 = new nanogui::Label(contentWidget, "File: " + scannedFilePath + " is not infected\n");
|
||||
}
|
||||
nanogui::Label* lineLabel9 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
}
|
||||
if (status == "end")
|
||||
answered = true;
|
||||
}
|
||||
else {
|
||||
//answered = true;
|
||||
nanogui::Label* lineLabel10 = new nanogui::Label(contentWidget, "Error: Unable to talk to daemon!\n");
|
||||
nanogui::Label* lineLabel11 = new nanogui::Label(contentWidget, "------------------------------------------");
|
||||
}
|
||||
}
|
||||
inputFile.close();
|
||||
}
|
||||
// Wait for 1 second before checking again
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
// Remove the answer file
|
||||
std::remove(ANSWER_COM_PATH);
|
||||
}
|
||||
std::string getFolderPath() {
|
||||
std::string selectedFolderPath;
|
||||
|
||||
// Initialize COM
|
||||
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
|
||||
|
||||
// Display the folder picker dialog
|
||||
BROWSEINFO browseInfo = { 0 };
|
||||
TCHAR selectedPath[MAX_PATH];
|
||||
browseInfo.hwndOwner = NULL; // Use the desktop window as the owner
|
||||
browseInfo.pidlRoot = NULL; // Start from the desktop
|
||||
browseInfo.pszDisplayName = selectedPath;
|
||||
browseInfo.lpszTitle = TEXT("Select a folder");
|
||||
browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
|
||||
|
||||
LPITEMIDLIST pidlSelected = SHBrowseForFolder(&browseInfo);
|
||||
if (pidlSelected != NULL) {
|
||||
SHGetPathFromIDList(pidlSelected, selectedPath);
|
||||
|
||||
// Convert TCHAR array to std::string
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
selectedFolderPath = converter.to_bytes(selectedPath);
|
||||
|
||||
// Free the PIDL
|
||||
IMalloc* pMalloc;
|
||||
if (SUCCEEDED(SHGetMalloc(&pMalloc))) {
|
||||
pMalloc->Free(pidlSelected);
|
||||
pMalloc->Release();
|
||||
}
|
||||
}
|
||||
|
||||
// Uninitialize COM
|
||||
CoUninitialize();
|
||||
|
||||
return selectedFolderPath;
|
||||
}
|
||||
int main() {
|
||||
// Initialize NanoGUI
|
||||
nanogui::init();
|
||||
|
||||
// Create a NanoGUI screen
|
||||
nanogui::Screen screen(nanogui::Vector2i(800, 600), "Cyberhex endpoint protection");
|
||||
// Create a layout for the buttons
|
||||
nanogui::Widget* buttonWidget = new nanogui::Widget(&screen);
|
||||
nanogui::BoxLayout* buttonLayout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Middle,
|
||||
5, 5);
|
||||
buttonWidget->setLayout(buttonLayout);
|
||||
|
||||
// Create a widget inside the scroll panel to hold the content
|
||||
|
||||
nanogui::VScrollPanel* scrollPanel = new nanogui::VScrollPanel(&screen);
|
||||
scrollPanel->setLayout(new nanogui::GroupLayout(10));
|
||||
nanogui::Widget* contentWidget = new nanogui::Widget(scrollPanel);
|
||||
contentWidget->setLayout(new nanogui::GroupLayout(10));
|
||||
scrollPanel->setFixedSize(nanogui::Vector2i(750, 450));
|
||||
|
||||
|
||||
|
||||
// Create a button for scanning a file
|
||||
nanogui::Button* scanFileButton = new nanogui::Button(buttonWidget, "Scan File");
|
||||
scanFileButton->setFixedWidth(150);
|
||||
scanFileButton->setCallback([&] {
|
||||
// Open file dialog to select a file
|
||||
std::string selectedFile = nanogui::file_dialog(
|
||||
{ {"*", "All Files"} },
|
||||
false
|
||||
);
|
||||
if (!selectedFile.empty()) {
|
||||
// Call scan_file function in a separate thread
|
||||
std::thread(scan_file,&screen, contentWidget, selectedFile).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Create a button for scanning a folder
|
||||
nanogui::Button* scanFolderButton = new nanogui::Button(buttonWidget, "Scan Folder");
|
||||
scanFolderButton->setFixedWidth(150);
|
||||
scanFolderButton->setCallback([&] {
|
||||
// Open file dialog to select a folder
|
||||
std::string selectedFolder = getFolderPath();
|
||||
if (!selectedFolder.empty()) {
|
||||
// Call scan_folder function in a separate thread
|
||||
std::thread(scan_folder, contentWidget, selectedFolder).detach();
|
||||
}
|
||||
});
|
||||
|
||||
// Set the layout for the main screen
|
||||
nanogui::BoxLayout* layout = new nanogui::BoxLayout(nanogui::Orientation::Vertical,
|
||||
nanogui::Alignment::Minimum,
|
||||
10, 10);
|
||||
|
||||
|
||||
|
||||
// Add 100 lines to the content widget
|
||||
//for (int i = 0; i < 100; ++i) {
|
||||
// nanogui::Label* lineLabel = new nanogui::Label(contentWidget, "Line " + std::to_string(i));
|
||||
// lineLabel->setFixedWidth(200);
|
||||
//}
|
||||
|
||||
// Scroll panel will automatically take the size of its content
|
||||
//scrollPanel->setFixedHeight(300);
|
||||
|
||||
screen.setVisible(true);
|
||||
|
||||
|
||||
screen.setLayout(layout);
|
||||
|
||||
|
||||
// Draw NanoGUI
|
||||
screen.performLayout();
|
||||
screen.setVisible(true);
|
||||
|
||||
// Main event loop
|
||||
nanogui::mainloop();
|
||||
|
||||
// Shutdown NanoGUI
|
||||
nanogui::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,14 +2,14 @@
|
||||
"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\\create_folder.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:create_folder.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\\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\\service.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}",
|
||||
"RelativeMoniker": "D:0:0:{AAE7A550-D2C0-45AC-8C26-ED57DF20BFC3}|ma_installer.vcxproj|solutionrelative:service.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}"
|
||||
@@ -66,29 +66,17 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 13,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"Title": "create_folder.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.h",
|
||||
"RelativeDocumentMoniker": "create_folder.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.h",
|
||||
"RelativeToolTip": "create_folder.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAEAAAAUAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-04-04T15:28:46.78Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"DocumentIndex": 0,
|
||||
"Title": "create_folder.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.cpp",
|
||||
"RelativeDocumentMoniker": "create_folder.cpp",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.cpp",
|
||||
"RelativeToolTip": "create_folder.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAABFAAAA",
|
||||
"ViewState": "AQIAALsAAAAAAAAAAAAAANQAAAAtAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-04-04T15:28:38.27Z",
|
||||
"EditorCaption": ""
|
||||
@@ -115,8 +103,7 @@
|
||||
"RelativeToolTip": "service.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAABvAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-04-04T15:26:20.564Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-04T15:26:20.564Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -140,8 +127,7 @@
|
||||
"RelativeToolTip": "setup_var.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAfAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-04-04T15:23:26.149Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-04T15:23:26.149Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -165,8 +151,7 @@
|
||||
"RelativeToolTip": "update.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAABCAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-04-04T15:21:28.758Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-04T15:21:28.758Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -190,8 +175,7 @@
|
||||
"RelativeToolTip": "zip.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAAA3AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2024-04-04T15:06:51.493Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2024-04-04T15:06:51.493Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -215,8 +199,7 @@
|
||||
"RelativeToolTip": "download.cpp",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAABRAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-22T19:47:31.583Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2023-12-22T19:47:31.583Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
@@ -232,7 +215,7 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"DocumentIndex": 1,
|
||||
"Title": "ma_installer.cpp",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\ma_installer.cpp",
|
||||
"RelativeDocumentMoniker": "ma_installer.cpp",
|
||||
@@ -242,6 +225,18 @@
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|",
|
||||
"WhenOpened": "2023-12-22T18:52:51.74Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"Title": "create_folder.h",
|
||||
"DocumentMoniker": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.h",
|
||||
"RelativeDocumentMoniker": "create_folder.h",
|
||||
"ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\ma_installer\\create_folder.h",
|
||||
"RelativeToolTip": "create_folder.h",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAEAAAAUAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|",
|
||||
"WhenOpened": "2024-04-04T15:28:46.78Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -210,6 +210,7 @@ HRESULT create_shortcut(const wchar_t* targetPath, const wchar_t* shortcutPath,
|
||||
|
||||
// Set the path of the target file
|
||||
pShellLink->SetPath(targetPath);
|
||||
pShellLink->SetIconLocation(iconPath, 0);
|
||||
|
||||
// Query the IPropertyStore interface
|
||||
IPropertyStore* pPropertyStore = NULL;
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,3 @@
|
||||
create_folder.cpp
|
||||
download.cpp
|
||||
ma_installer.cpp
|
||||
C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\ma_installer.cpp(154,15): warning C4101: "fp": Unreferenzierte lokale Variable
|
||||
service.cpp
|
||||
setup_var.cpp
|
||||
update.cpp
|
||||
zip.cpp
|
||||
Code wird generiert...
|
||||
ma_installer.vcxproj -> C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\ma_installer.exe
|
||||
C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\vcpkg.targets(228,5): warning : [vcpkg] Failed to gather app local DLL dependencies, program may not run. Set VcpkgApplocalDeps to false in your project file to suppress this warning. PowerShell arguments: -ExecutionPolicy Bypass -noprofile -File "C:\vcpkg\vcpkg-2023.08.09\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\janis\Documents\Projekte_mit_c\ma\ma\src\ma_installer\x64\Debug\ma_installer.exe" "C:\vcpkg\vcpkg-2023.08.09\installed\x64-windows\debug\bin" "ma_installer\x64\Debug\ma_installer.tlog\ma_installer.write.1u.tlog" "ma_installer\x64\Debug\vcpkg.applocal.log"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -80,29 +80,29 @@ function safe_settings(){
|
||||
}
|
||||
if($_GET["update"]=="rtp_included"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE rtp_included set path= ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE rtp_included set path= ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
if($_GET["update"]=="rtp_excluded"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE rtp_excluded set path= ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE rtp_excluded set path= ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
if($_GET["update"]=="user_tasks"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE user_tasks set task = ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE user_tasks set task = ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
if($_GET["update"]=="system_tasks"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE system_tasks set task = ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE system_tasks set task = ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
|
||||
@@ -98,15 +98,15 @@ function safe_settings(){
|
||||
}
|
||||
if($_GET["update"]=="rtp_included"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE rtp_included set path= ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE rtp_included set path= ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
if($_GET["update"]=="rtp_excluded"){
|
||||
$id=htmlspecialchars($_GET["id"]);
|
||||
$stmt = $conn->prepare("UPDATE rtp_excluded set path= ? WHERE id=$id");
|
||||
$stmt->bind_param("s",$value);
|
||||
$stmt = $conn->prepare("UPDATE rtp_excluded set path= ? WHERE id=?");
|
||||
$stmt->bind_param("si",$value,$id);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ if ($perms[2] !== "1") {
|
||||
}
|
||||
|
||||
// Handle filter submission
|
||||
$loglevel = isset($_GET["loglevel"]) ? $_GET["loglevel"] : "";
|
||||
$logtext = isset($_GET["logtext"]) ? $_GET["logtext"] : "";
|
||||
$machine_id = isset($_GET["machine_id"]) ? $_GET["machine_id"] : "";
|
||||
$time = isset($_GET["time"]) ? $_GET["time"] : "";
|
||||
$loglevel = htmlspecialchars(isset($_GET["loglevel"]) ? $_GET["loglevel"] : "");
|
||||
$logtext = htmlspecialchars(isset($_GET["logtext"]) ? $_GET["logtext"] : "");
|
||||
$machine_id = htmlspecialchars(isset($_GET["machine_id"]) ? $_GET["machine_id"] : "");
|
||||
$time = htmlspecialchars(isset($_GET["time"]) ? $_GET["time"] : "");
|
||||
$filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&time=$time";
|
||||
|
||||
?>
|
||||
@@ -97,7 +97,7 @@ $filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&tim
|
||||
//now display the normal page
|
||||
// Define page size and current page
|
||||
$page_size = 50;
|
||||
$current_page = isset($_GET['page']) ? intval($_GET['page']) : 1;
|
||||
$current_page = htmlspecialchars(isset($_GET['page']) ? intval($_GET['page']) : 1;
|
||||
$offset = ($current_page - 1) * $page_size;
|
||||
|
||||
// Get total number of log entries based on filters
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!isset($_SESSION['username']) or !isset($_SESSION["login"])) {
|
||||
$username = $_SESSION['username'];
|
||||
$perms = $_SESSION["perms"];
|
||||
if(isset($_GET["page"])){
|
||||
$page=$_GET["page"];
|
||||
$page=htmlspecialchars($_GET["page"]);
|
||||
}else{
|
||||
$page="welcome.php"; //this is actually the Dashboard
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ if($perms[2]!=="1"){
|
||||
|
||||
// Handle filter submission
|
||||
|
||||
$loglevel = isset($_GET["loglevel"]) ? $_GET["loglevel"] : "";
|
||||
$logtext = isset($_GET["logtext"]) ? $_GET["logtext"] : "";
|
||||
$machine_id = isset($_GET["machine_id"]) ? $_GET["machine_id"] : "";
|
||||
$time = isset($_GET["time"]) ? $_GET["time"] : "";
|
||||
$loglevel = htmlspecialchars(isset($_GET["loglevel"]) ? $_GET["loglevel"] : "");
|
||||
$logtext = htmlspecialchars(isset($_GET["logtext"]) ? $_GET["logtext"] : "");
|
||||
$machine_id = htmlspecialchars(isset($_GET["machine_id"]) ? $_GET["machine_id"] : "");
|
||||
$time = htmlspecialchars(isset($_GET["time"]) ? $_GET["time"] : "");
|
||||
$filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&time=$time";
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ $filter_query = "&loglevel=$loglevel&logtext=$logtext&machine_id=$machine_id&tim
|
||||
|
||||
// Define page size and current page
|
||||
$page_size = 50;
|
||||
$current_page = isset($_GET['page']) ? intval($_GET['page']) : 1;
|
||||
$current_page = htmlspecialchars(isset($_GET['page']) ? intval($_GET['page']) : 1);
|
||||
$offset = ($current_page - 1) * $page_size;
|
||||
|
||||
// Get total number of log entries based on filters
|
||||
|
||||
@@ -13,10 +13,10 @@ $perms = $_SESSION["perms"];
|
||||
$email = $_SESSION["email"];
|
||||
|
||||
|
||||
$machine_id = isset($_GET["machine_id"]) ? $_GET["machine_id"] : "";
|
||||
$path = isset($_GET["path"]) ? $_GET["path"] : "";
|
||||
$hash = isset($_GET["hash"]) ? $_GET["hash"] : "";
|
||||
$action = isset($_GET["action"]) ? $_GET["action"] : "";
|
||||
$machine_id = htmlspecialchars(isset($_GET["machine_id"]) ? $_GET["machine_id"] : "");
|
||||
$path = htmlspecialchars(isset($_GET["path"]) ? $_GET["path"] : "");
|
||||
$hash = htmlspecialchars(isset($_GET["hash"]) ? $_GET["hash"] : "");
|
||||
$action = htmlspecialchars(isset($_GET["action"]) ? $_GET["action"] : "");
|
||||
$filter_query = "&hash=$hash&path=$path&machine_id=$machine_id&action=$action";
|
||||
|
||||
?>
|
||||
@@ -91,7 +91,7 @@ $filter_query = "&hash=$hash&path=$path&machine_id=$machine_id&action=$action";
|
||||
|
||||
// Define page size and current page
|
||||
$page_size = 50;
|
||||
$current_page = isset($_GET['page']) ? intval($_GET['page']) : 1;
|
||||
$current_page = htmlspecialchars(isset($_GET['page']) ? intval($_GET['page']) : 1);
|
||||
$offset = ($current_page - 1) * $page_size;
|
||||
|
||||
// Get total number of log entries based on filters
|
||||
|
||||
Reference in New Issue
Block a user