Created
August 6, 2021 02:52
-
-
Save 0x1F602/4aee3cd0af9df674c32cd0d5bf73fbab to your computer and use it in GitHub Desktop.
Intercept AJAX Tampermonkey Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
XMLHttpRequest.prototype.realOpen = XMLHttpRequest.prototype.open; | |
var myOpen = function(method, url, async, user, password) { | |
console.log('h00ked', url); | |
// if(url != 'post.php') { | |
//call original | |
this.realOpen (method, url, async, user, password); | |
// } | |
// else { | |
// return 1; | |
// } | |
} | |
//ensure all XMLHttpRequests use our custom open method | |
XMLHttpRequest.prototype.open = myOpen ; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment