Skip to content

Instantly share code, notes, and snippets.

@opyate
Last active September 13, 2017 19:33
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 opyate/5dd65f5529d9508cf78e to your computer and use it in GitHub Desktop.
Save opyate/5dd65f5529d9508cf78e to your computer and use it in GitHub Desktop.
var contents = '<form action="https://httpbin.org/post" method="POST">';
contents += '<input name="secret" placeholder="Secret stuff here">';
contents += '<input type="submit" onclick="return hack()">';
contents += '<script type="text/javascript">';
contents += 'function hack() { alert("h4x0rz"); }';
contents += '</script>';
contents += '</form>';
document.getElementById('frame1').src = "data:text/html;charset=utf-8," + escape(contents);
<form action="https://httpbin.org/post" method="POST">
<input name="secret" placeholder="Secret stuff here">
<input type="submit">
</form>
<p>IFRAME below</p>
<iframe id="frame1" src="http://localhost:8000/i-dont-matter.html"></iframe>
python -m SimpleHTTPServer
@opyate
Copy link
Author

opyate commented Sep 13, 2017

Python 3: python -m http.server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment