Compare commits

..

2 Commits

Author SHA1 Message Date
cubernetes ea0666b599 Change port for webserver 2023-07-31 14:04:11 +02:00
cubernetes c0f18f3351 clean 2023-07-31 14:03:49 +02:00
7 changed files with 4 additions and 12 deletions

View File

@ -1 +1 @@
[{"data": "<b style='color: yellow'>IDS: Malicious Activity was detected</b>", "timestamp": "1681466116"}, {"data": "<b style='color: red'>Malicious IP: 141.89.221.182</b>", "timestamp": "1681466116"}, {"data": "ubuntu@192.168.0.17: ssh -p1337 -A -L80:localhost:8080 mainframe3.localdomain", "timestamp": "1681466482"}]
[]

View File

@ -1 +1 @@
[{"data": "141.89.221.182: start of attack", "timestamp": "1681466111"}, {"data": "141.89.221.182: nmap scanning", "timestamp": "1681466115"}, {"data": "141.89.221.182: ssh bruteforce", "timestamp": "1681466117"}, {"data": "141.89.221.182: lateral scanning", "timestamp": "1681466119"}]
[]

Binary file not shown.

View File

@ -1 +0,0 @@
1681466111

View File

@ -1 +0,0 @@
True

View File

@ -1 +0,0 @@
1681466098

View File

@ -387,10 +387,6 @@ def api_get_logs():
}
return json.dumps(result, ensure_ascii=False)
def datas(logs):
for log in logs:
yield log['data']
@app.route('/api/red', methods=['POST'])
def api_red_logs():
global STARTED
@ -408,8 +404,7 @@ def api_red_logs():
with open('./database/logs/red.json') as f:
logs_list = json.load(f)
if temp_json_n['data'] not in datas(logs_list):
logs_list.append(temp_json_n)
logs_list.append(temp_json_n)
with open('./database/logs/red.json', 'w') as f:
json.dump(logs_list, f, ensure_ascii=False)
@ -445,5 +440,5 @@ def custom_404(error):
clear_session_full()
if __name__ == '__main__':
app.run(host='0.0.0.0', threaded=True, use_reloader=True, port=8088)
app.run(host='0.0.0.0', threaded=True, use_reloader=True, port=8086)
# app.run(host='185.78.255.231', threaded=True,use_reloader=True, port=443, ssl_context=('/etc/letsencrypt/live/network.kyudev.xyz/fullchain.pem', '/etc/letsencrypt/live/network.kyudev.xyz/privkey.pem'))