Bugfix
This commit is contained in:
parent
6c1f37d4cc
commit
39783b32c8
|
@ -1 +1 @@
|
|||
[{"data": "archtosu@172.23.7.203: ./auto.sh", "timestamp": "1681451149"}, {"data": "<b style='color: yellow'>Snort: Intrusion Detected!</b>", "timestamp": "1681451149"}, {"data": "archtosu@172.23.7.203: mv auto.sh blueteam1.sh", "timestamp": "1681451169"}, {"data": "archtosu@172.23.7.203: git s", "timestamp": "1681451171"}, {"data": "archtosu@172.23.7.203: git status", "timestamp": "1681451173"}]
|
||||
[{"data": "archtosu@172.23.7.203: git status", "timestamp": "1681452893"}]
|
|
@ -1 +1 @@
|
|||
[{"data": "141.89.221.182: Start of post-exploitation", "timestamp": "1681451149"}]
|
||||
[]
|
|
@ -1 +1 @@
|
|||
1681451148
|
||||
1681452887
|
|
@ -328,7 +328,8 @@ def api_red_logs():
|
|||
temp_json_n['data'] = remote_addr + ': ' + temp_json_n['data']
|
||||
|
||||
if STARTED:
|
||||
if temp_json_n['data'].lower() == 'start of attack':
|
||||
print(temp_json_n['data'])
|
||||
if 'start of attack' in temp_json_n['data'].lower():
|
||||
with open('./database/temp/attack_start.txt', 'w') as f:
|
||||
f.write(str(temp_json_n['timestamp']))
|
||||
|
||||
|
|
|
@ -1553,7 +1553,18 @@
|
|||
return res;
|
||||
|
||||
}
|
||||
|
||||
function add_info(blue) {
|
||||
blue.sort(timestamp_sort);
|
||||
let blue_count = blue.length;
|
||||
if (blue_count > 1 && document.getElementById('attackstart').getAttribute('data-start') !== '-1') {
|
||||
let t = to_min_s(document.getElementById('attackstart').getAttribute('data-start'), blue[1].timestamp);
|
||||
blue.splice(1, 0, {data: `Time to respond: ${t}`, timestamp: parseInt(blue[1].timestamp)})
|
||||
}
|
||||
}
|
||||
|
||||
function populateTimeline(data) {
|
||||
add_info(data.blue);
|
||||
data = flatten_dict(data);
|
||||
data.sort(timestamp_sort);
|
||||
let tl = document.getElementById('timeline');
|
||||
|
@ -1561,13 +1572,13 @@
|
|||
data.forEach(data_entry => {
|
||||
entry_div = document.createElement('div');
|
||||
container = document.createElement('div');
|
||||
timestamp_h2 = document.createElement('h2');
|
||||
data_tag = document.createElement('p');
|
||||
data_h2 = document.createElement('h2');
|
||||
timestamp_tag = document.createElement('p');
|
||||
timestamp_txt = document.createTextNode(to_min_s(document.getElementById('simstart').getAttribute('data-start'), data_entry.timestamp));
|
||||
data_tag.innerHTML = data_entry.data;
|
||||
timestamp_h2.appendChild(timestamp_txt);
|
||||
container.appendChild(timestamp_h2);
|
||||
container.appendChild(data_tag);
|
||||
timestamp_tag.appendChild(timestamp_txt);
|
||||
data_h2.innerHTML = data_entry.data;
|
||||
container.appendChild(data_h2);
|
||||
container.appendChild(timestamp_tag);
|
||||
container.classList.add("content_time");
|
||||
container.setAttribute("style", 'box-sizing: border-box;');
|
||||
entry_div.appendChild(container);
|
||||
|
|
Loading…
Reference in New Issue