Created
March 7, 2013 01:05
-
-
Save dguido/5104701 to your computer and use it in GitHub Desktop.
Heap spray code snippet from lcamtuf's ref_fuzz5 JavaScript DOM fuzzer
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 heap_spray() { | |
if (MEGS == 0 || R(2) == 0) return; | |
if (!spray_str) { | |
var spray_str = "ABCDABCD"; | |
for (var i=0;i<21;i++) spray_str += spray_str; /* 16M */ | |
} | |
window.name = Math.random() + spray_str + Math.random(); | |
eval("window.name=''"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment