diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/webserver/database/logs/blue.json b/webserver/database/logs/blue.json index 0637a08..06de254 100644 --- a/webserver/database/logs/blue.json +++ b/webserver/database/logs/blue.json @@ -1 +1 @@ -[] \ No newline at end of file +[{"data": "archtosu@172.23.7.203: x\n", "timestamp": "1681449990"}] \ No newline at end of file diff --git a/webserver/database/logs/red.json b/webserver/database/logs/red.json index 0637a08..375e232 100644 --- a/webserver/database/logs/red.json +++ b/webserver/database/logs/red.json @@ -1 +1 @@ -[] \ No newline at end of file +[{"data": "start of attack", "timestamp": "1681449990"}, {"data": "command 0: ATTACK", "timestamp": "1681449990"}, {"data": "command 1: ATTACK", "timestamp": "1681449990"}, {"data": "command 2: ATTACK", "timestamp": "1681449990"}, {"data": "command 3: ATTACK", "timestamp": "1681449990"}, {"data": "command 4: ATTACK", "timestamp": "1681449990"}, {"data": "command 5: ATTACK", "timestamp": "1681449990"}, {"data": "command 6: ATTACK", "timestamp": "1681449990"}, {"data": "command 7: ATTACK", "timestamp": "1681449991"}, {"data": "command 8: ATTACK", "timestamp": "1681449991"}, {"data": "command 9: ATTACK", "timestamp": "1681449991"}, {"data": "command 10: ATTACK", "timestamp": "1681449991"}] \ No newline at end of file diff --git a/webserver/database/temp/attack_start.txt b/webserver/database/temp/attack_start.txt new file mode 100644 index 0000000..83ce00a --- /dev/null +++ b/webserver/database/temp/attack_start.txt @@ -0,0 +1 @@ +1681449990 \ No newline at end of file diff --git a/webserver/database/temp/sim_running.txt b/webserver/database/temp/sim_running.txt new file mode 100644 index 0000000..4791ed5 --- /dev/null +++ b/webserver/database/temp/sim_running.txt @@ -0,0 +1 @@ +True \ No newline at end of file diff --git a/webserver/database/temp/sim_start.txt b/webserver/database/temp/sim_start.txt new file mode 100644 index 0000000..8fb7397 --- /dev/null +++ b/webserver/database/temp/sim_start.txt @@ -0,0 +1 @@ +1681449989 \ No newline at end of file diff --git a/webserver/main.py b/webserver/main.py index baaf7d3..f01f141 100755 --- a/webserver/main.py +++ b/webserver/main.py @@ -310,6 +310,7 @@ def api_red_logs(): def api_blue_logs(): global STARTED temp_json_n = request.json + temp_json_n['data'] = b64decode(temp_json_n['data']).decode('utf-8') print('blue log received') print(temp_json_n) diff --git a/webserver/templates/main/dashboard_main1.html b/webserver/templates/main/dashboard_main1.html index cab6794..d317166 100644 --- a/webserver/templates/main/dashboard_main1.html +++ b/webserver/templates/main/dashboard_main1.html @@ -1303,7 +1303,7 @@