forked from tauh33dkhan/XSStrike-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcs.js
More file actions
40 lines (36 loc) · 1.21 KB
/
cs.js
File metadata and controls
40 lines (36 loc) · 1.21 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
38
39
var cookie = encodeURIComponent(document.cookie);
var skipDom = 'no';
function scan(cookie, skipDom, customHeader) {
a=document.URL;
b=encodeURIComponent(a);
c='target=' + b + '&op=scan&skipDom=' + skipDom;
d='http://127.0.0.1/XSStrike-extension/src/xss.php?' + c + '&cookie=Cookie: ' + cookie + '\\n' + customHeader;
window.open(d);
}
function crawl(cookie, skipDom, customHeader) {
e=document.URL;
f=encodeURIComponent(e);
g='target=' + f + '&op=crawl&skipDom=' + skipDom;
h='http://127.0.0.1/XSStrike-extension/src/xss.php?' + g + '&cookie=Cookie: ' + cookie + '\\n' + customHeader;
window.open(h);
}
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
customHeader = request.header
if( request.message == "crawl" ) {
crawl(cookie, skipDom, customHeader);
}
else if(request.message == "crawl-skipDom") {
skipDom = "yes";
crawl(cookie, skipDom, customHeader);
}
else if(request.message == "scan-skipDom") {
skipDom = "yes"
scan(cookie, skipDom, customHeader);
}
else {
skipDom = "no";
scan(cookie, skipDom, customHeader);
}
}
);