Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>HTML Clickjacking demonstration - drag and WTF!?</title>
- <style>
- iframe{position: absolute; top:0px; left:0; filter: alpha(opacity=0); opacity:0;z-index:1}
- button{position: absolute; top:40px; left: 805px; z-index:-1; width:107px; height:26px;}
- .magicfield1{position: absolute; top:40px; left: 340px; z-index:-1; height: 26px; border: 1px solid orange}
- .magicfield2{position: absolute; top:40px; left: 480px; z-index:-1; height: 26px; border: 1px solid orange}
- .magicfield3{position: absolute; top:40px; left: 650px; z-index:-1; height: 26px; border: 1px solid orange}
- .magictext{position: absolute; top:54%; left: 50%; z-index:-1; }
- .showhider{position: absolute; top:90%; left: 1%}
- .intro{position: absolute; top:50%; left:0}
- </style>
- <script type="text/javascript">
- function mask(){
- document.getElementById("iframe").style.opacity = ".1"; // for most browsers
- document.getElementById("iframe").style.filter = "alpha(opacity=10)"; // for IE
- }
- function hide(){
- document.getElementById("iframe").style.opacity = ".0"; // for most browsers
- document.getElementById("iframe").style.filter = "alpha(opacity=0)"; // for IE
- }
- function show(){
- document.getElementById("iframe").style.opacity = ".9"; // for most browsers;
- document.getElementById("iframe").style.filter = "alpha(opacity=90)"; // for IE
- }
- function reveal(){
- alert("Checking your answer...");
- document.getElementById("iframe").style.opacity = ".9"; // for most browsers
- document.getElementById("iframe").style.filter = "alpha(opacity=90)"; //for IE
- }
- </script>
- </head>
- <body>
- <div class="intro">
- <p>Hello and welcome to the match game</p>
- <p>All you have to do is drag the following 3 letter acronym to the matching string ---> </p>
- <p class="showhider">As you know it's a test - <a onClick="show()">Show iframe</a> - <a onClick="hide()">Hide iframe</a> - <a onClick="mask()">Mask iframe</a> </p>
- </div>
- <div class="magictext" draggable="true" ondragstart="event.dataTransfer.setData('text/plain', 'Rick Astley')">
- <H1 style="border: 1px dashed black">CSS</H1>
- </div>
- <iframe src="http://video.search.yahoo.com/" width="99%" id="iframe" height="50%"></iframe>
- <span class=magicfield1>Cross Site Scripting</span><span class=magicfield2>Cuddly Slippery Snakes</span> <span class="magicfield3">Cascading Style Sheets</span>
- <button>Answer</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement