-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathskipCTI.js
More file actions
37 lines (31 loc) · 1.25 KB
/
skipCTI.js
File metadata and controls
37 lines (31 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function skipCTI() {
const req = new XMLHttpRequest();
req.open("GET",'https://gist.githubusercontent.com/ControlCompass/da98f63af81c831d15cb794ab8646038/raw/5cd4465769dd5a2b316261f60d2bae26c6cc7bec/All_v11_Techniques.json',true);
req.send();
req.onload = function(){
const div_JSONinput = document.getElementById("div_JSONinput")
const JSONinput = document.getElementById("JSONinput")
const JSONinput_header_get = document.getElementById("JSONinput_header")
if (JSONinput) {
JSONinput.remove()
}
if (JSONinput_header_get) {
JSONinput_header_get.remove()
}
const JSONinput_header = document.createElement("h4")
JSONinput_header.id = "JSONinput_header"
JSONinput_header.innerHTML = "ATT&CK Navigator Layer (TTPs)"
JSONinput_header.style.textAlign = "center"
div_JSONinput.appendChild(JSONinput_header)
const textarea = document.createElement("textarea")
textarea.className = "form-control"
textarea.id = "JSONinput"
textarea.rows = "10"
div_JSONinput.appendChild(textarea)
const JSONinput_final = document.getElementById("JSONinput")
JSONinput_final.textContent = req.responseText;
window.location.href = '#controls'
document.getElementById("controlsDropdown").open = true;
};
};
$('#Skip').on('click', skipCTI)