diff --git a/src/client_backend/.vs/client_backend/v17/.suo b/src/client_backend/.vs/client_backend/v17/.suo index 8035e2b..5088bab 100644 Binary files a/src/client_backend/.vs/client_backend/v17/.suo and b/src/client_backend/.vs/client_backend/v17/.suo differ diff --git a/src/client_backend/.vs/client_backend/v17/Browse.VC.db b/src/client_backend/.vs/client_backend/v17/Browse.VC.db index 748625f..3fe6a1e 100644 Binary files a/src/client_backend/.vs/client_backend/v17/Browse.VC.db and b/src/client_backend/.vs/client_backend/v17/Browse.VC.db differ diff --git a/src/client_backend/.vs/client_backend/v17/DocumentLayout.json b/src/client_backend/.vs/client_backend/v17/DocumentLayout.json index 88c6d18..c4584e4 100644 --- a/src/client_backend/.vs/client_backend/v17/DocumentLayout.json +++ b/src/client_backend/.vs/client_backend/v17/DocumentLayout.json @@ -94,8 +94,7 @@ "RelativeToolTip": "security.cpp", "ViewState": "AQIAABsAAAAAAAAAAAAAADoAAAA2AAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-12T10:18:22.033Z", - "EditorCaption": "" + "WhenOpened": "2024-03-12T10:18:22.033Z" }, { "$type": "Document", @@ -107,8 +106,7 @@ "RelativeToolTip": "permissions.cpp", "ViewState": "AQIAAAQAAAAAAAAAAAAIwDsAAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-12T10:18:17.369Z", - "EditorCaption": "" + "WhenOpened": "2024-03-12T10:18:17.369Z" }, { "$type": "Document", @@ -120,8 +118,7 @@ "RelativeToolTip": "app_ctrl.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAAPAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-12T10:10:59.685Z", - "EditorCaption": "" + "WhenOpened": "2024-03-12T10:10:59.685Z" }, { "$type": "Document", @@ -133,8 +130,7 @@ "RelativeToolTip": "check_process.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAAYAAAARAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-10T14:40:03.094Z", - "EditorCaption": "" + "WhenOpened": "2024-03-10T14:40:03.094Z" }, { "$type": "Document", @@ -146,8 +142,7 @@ "RelativeToolTip": "md5hash.cpp", "ViewState": "AQIAACQAAAAAAAAAAAAAADUAAAA1AAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-03-09T19:22:09.647Z", - "EditorCaption": "" + "WhenOpened": "2024-03-09T19:22:09.647Z" }, { "$type": "Document", @@ -159,8 +154,7 @@ "RelativeToolTip": "check_dir.cpp", "ViewState": "AQIAAEkAAAAAAAAAAAAIwHYAAACFAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-02-25T13:36:05.414Z", - "EditorCaption": "" + "WhenOpened": "2024-02-25T13:36:05.414Z" }, { "$type": "Document", @@ -172,8 +166,7 @@ "RelativeToolTip": "log.h", "ViewState": "AQIAAFMAAAAAAAAAAAAkwFsAAAAjAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000680|", - "WhenOpened": "2024-02-25T09:02:55.874Z", - "EditorCaption": "" + "WhenOpened": "2024-02-25T09:02:55.874Z" }, { "$type": "Document", @@ -185,8 +178,7 @@ "RelativeToolTip": "log.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAB8AAAAFAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-02-25T09:08:59.07Z", - "EditorCaption": "" + "WhenOpened": "2024-02-25T09:08:59.07Z" }, { "$type": "Document", @@ -198,8 +190,7 @@ "RelativeToolTip": "local_com.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAADYAAAAYAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.217Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.217Z" }, { "$type": "Document", @@ -211,8 +202,7 @@ "RelativeToolTip": "settings.cpp", "ViewState": "AQIAAMwAAAAAAAAAAAAIwAMBAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.264Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.264Z" }, { "$type": "Document", @@ -224,8 +214,7 @@ "RelativeToolTip": "thread_ctrl.cpp", "ViewState": "AQIAABUAAAAAAAAAAAAAADMAAAAFAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.264Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.264Z" }, { "$type": "Document", @@ -237,8 +226,7 @@ "RelativeToolTip": "scan.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAAKEAAAAAAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.248Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.248Z" }, { "$type": "Document", @@ -250,8 +238,7 @@ "RelativeToolTip": "client_backend.cpp", "ViewState": "AQIAADMAAAAAAAAAAAAAAFsAAAAhAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.279Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.279Z" }, { "$type": "Document", @@ -263,8 +250,7 @@ "RelativeToolTip": "update.cpp", "ViewState": "AQIAACwAAAAAAAAAAAAkwFIAAAAWAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.248Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.248Z" }, { "$type": "Document", @@ -276,8 +262,7 @@ "RelativeToolTip": "local_schedule.cpp", "ViewState": "AQIAAGYAAAAAAAAAAAAAAJoAAAAaAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.279Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.279Z" }, { "$type": "Document", @@ -289,8 +274,7 @@ "RelativeToolTip": "queue _ctrl.cpp", "ViewState": "AQIAAAAAAAAAAAAAAAAAACsAAAABAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.295Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.295Z" }, { "$type": "Document", @@ -302,8 +286,7 @@ "RelativeToolTip": "connect.cpp", "ViewState": "AQIAABQAAAAAAAAAAAAkwEAAAAAVAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", - "WhenOpened": "2024-01-28T20:40:06.315Z", - "EditorCaption": "" + "WhenOpened": "2024-01-28T20:40:06.315Z" }, { "$type": "Document", @@ -313,7 +296,7 @@ "RelativeDocumentMoniker": "virus_ctrl.cpp", "ToolTip": "C:\\Users\\janis\\Documents\\Projekte_mit_c\\ma\\ma\\src\\client_backend\\virus_ctrl.cpp", "RelativeToolTip": "virus_ctrl.cpp", - "ViewState": "AQIAADAAAAAAAAAAAAAAAEkAAAA+AAAA", + "ViewState": "AQIAADAAAAAAAAAAAAAAAFIAAABzAAAA", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", "WhenOpened": "2024-02-18T12:49:41.861Z", "EditorCaption": "" diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.ilk b/src/client_backend/client_backend/x64/Debug/client_backend.ilk index daba621..e6226c6 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.ilk and b/src/client_backend/client_backend/x64/Debug/client_backend.ilk differ diff --git a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog index 8e2e128..7a966a3 100644 Binary files a/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog and b/src/client_backend/client_backend/x64/Debug/client_backend.tlog/client_backend.write.1u.tlog differ diff --git a/src/client_backend/client_backend/x64/Debug/vc143.idb b/src/client_backend/client_backend/x64/Debug/vc143.idb index e611443..74ec6ab 100644 Binary files a/src/client_backend/client_backend/x64/Debug/vc143.idb and b/src/client_backend/client_backend/x64/Debug/vc143.idb differ diff --git a/src/client_backend/client_backend/x64/Debug/vc143.pdb b/src/client_backend/client_backend/x64/Debug/vc143.pdb index 680c6fb..447e1fa 100644 Binary files a/src/client_backend/client_backend/x64/Debug/vc143.pdb and b/src/client_backend/client_backend/x64/Debug/vc143.pdb differ diff --git a/src/client_backend/virus_ctrl.cpp b/src/client_backend/virus_ctrl.cpp index f0ed7a4..764a7ab 100644 --- a/src/client_backend/virus_ctrl.cpp +++ b/src/client_backend/virus_ctrl.cpp @@ -71,26 +71,6 @@ int virus_ctrl_process( const char* id) { log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while removing infected file: ", path," ",hash); else log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Removed Virus: ", path, " ", hash, ""); - //call the server and say him that we have found a virus. - url[0] = '\0'; - if (get_setting("server:server_url", url) == 0 or strcmp(url, "nan") == 0) { - strcat_s(url, 1000, "/api/php/virus/notify_virus.php?"); - strcat_s(url, 1000, "file="); - strcat_s(url, 1000, url_encode(path)); - strcat_s(url, 1000, "&hash="); - strcat_s(url, 1000, hash); - strcat_s(url, 1000, "&action="); - strcat_s(url, 1000, "remove"); - strcat_s(url, 1000, "&machine_id="); - strcat_s(url, 1000, get_machineid(SECRETS)); - strcat_s(url, 1000, "&apikey="); - strcat_s(url, 1000, get_apikey(SECRETS)); - if (connect_to_srv(url, server_response, 100, get_setting("communication:unsafe_tls")) != 0 or strcmp("wrt_ok", server_response) != 0) - log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while notifying server about virus: ", path, " ", hash); - } - else { - log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while notifying server about virus: ", path, " ", hash); - } break; case 2://quarantine @@ -101,26 +81,6 @@ int virus_ctrl_process( const char* id) { log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while quarantining infected file: ", path," ",hash); else log(LOGLEVEL::VIRUS, "[virus_ctrl_process()]:Quarantined Virus: ", path, " ", hash, " to ", quarantine_path); - //call the server and say him that we have found a virus. - url[0] = '\0'; - if (get_setting("server:server_url", url) == 0 or strcmp(url, "nan") == 0) { - strcat_s(url, 1000, "/api/php/virus/notify_virus.php?"); - strcat_s(url, 1000, "file="); - strcat_s(url, 1000, url_encode(path)); - strcat_s(url, 1000, "&hash="); - strcat_s(url, 1000, hash); - strcat_s(url, 1000, "&action="); - strcat_s(url, 1000, "quarantine"); - strcat_s(url, 1000, "&machine_id="); - strcat_s(url, 1000, get_machineid(SECRETS)); - strcat_s(url, 1000, "&apikey="); - strcat_s(url, 1000, get_apikey(SECRETS)); - if (connect_to_srv(url, server_response, 100, get_setting("communication:unsafe_tls")) != 0 or strcmp("wrt_ok", server_response) != 0) - log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while notifying server about virus: ", path, " ", hash); - } - else { - log(LOGLEVEL::ERR, "[virus_ctrl_process()]:Error while notifying server about virus: ", path, " ", hash); - } break; case 3://ignore diff --git a/src/client_backend/x64/Debug/client_backend.pdb b/src/client_backend/x64/Debug/client_backend.pdb index e57f347..5957358 100644 Binary files a/src/client_backend/x64/Debug/client_backend.pdb and b/src/client_backend/x64/Debug/client_backend.pdb differ diff --git a/src/server/cyberhex-code/system/secure_zone/php/server_settings.php b/src/server/cyberhex-code/system/secure_zone/php/server_settings.php new file mode 100644 index 0000000..c91ddc0 --- /dev/null +++ b/src/server/cyberhex-code/system/secure_zone/php/server_settings.php @@ -0,0 +1,116 @@ +connect_error) { + $success=0; + die("Connection failed: " . $conn->connect_error); +} +//we store all the functions like update,safe,load etc in this file, because else "client_settings.php" will get way to big +include "client_settings_functions.php"; +if(isset($_GET["update"])){ + safe_settings(); +} +if(isset($_GET["delete"])){ + delete_item($_GET["db"],$_GET["delete"]); +} +if(isset($_GET["add"])){ + add_item($_GET["add"],$_GET["value"],$_GET["field"]); +} +load_settings(); + +?> + + +
+ + + +