-
-
Notifications
You must be signed in to change notification settings - Fork 181
/
pentest_disclaimer.js
31 lines (23 loc) · 1.04 KB
/
pentest_disclaimer.js
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
//Use this script to notify a user that his browser has been compromised.
function notify(){
let trans = `\
html, body {background: red; transition: all 0.2s linear 0s; padding: 12px, text-align: justify;}\
h2, h1 {color: #fff;}\
\
.xlD9f3eDf {\
opacity: 0;
}\
`
let styleSheet = document.createElement("style");
styleSheet.innerText = trans;
document.head.appendChild(styleSheet);
let doc_body = document.getElementsByTagName("body")[0]
doc_body.classList.add("xlD9f3eDf");
new_body = '<h1>Your browser has been poisoned.</h1><h2>As a result of an authorized Penetration Testing (simulated hacking attempt), you have been subject to malicious attacks.You are strongly advised to clear your browser\'s history. You may also want to contact your IT Department and report this incident.</h2>'
doc_body.innerHTML = '';
doc_body.style.width = '50%';
doc_body.insertAdjacentHTML('beforeend', new_body);
doc_body.classList.remove('xlD9f3eDf');
return 'Pentest disclaimer transformation completed!';
}
notify();