-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcallback.js
46 lines (41 loc) · 1.39 KB
/
callback.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
(function() {
var proxied = window.alert;
window.alert = function() {
console.log("\nURL: " + window.location.href+ " Executed Payload: " + arguments[0]);
var http = new XMLHttpRequest();
var url = "http://localhost:8787/?b64="+window.btoa(window.location.href);
http.open("GET", url, true);
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
console.log(http.responseText);
}
}
http.send();
};
var proxied = window.prompt;
window.prompt = function() {
console.log("\nURL: " + window.location.href+ " Executed Payload: " + arguments[0]);
var http = new XMLHttpRequest();
var url = "http://localhost:8787/?b64="+window.btoa(window.location.href);
http.open("GET", url, true);
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
console.log(http.responseText);
}
}
http.send();
};
var proxied = window.confirm;
window.confirm = function() {
console.log("\nURL: " + window.location.href+ " Executed Payload: " + arguments[0]);
var http = new XMLHttpRequest();
var url = "http://localhost:8787/?b64="+window.btoa(window.location.href);
http.open("GET", url, true);
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
console.log(http.responseText);
}
}
http.send();
};
})();