一,题目--点击一百万次
<pre id="line1"> <!DOCTYPE html> <html> <style> h1{
color: white;
text-align: center;
}
body{
background-color: black;
}
img{
display: block;
margin: 0 auto;
}
#flag{
color: white;
text-align: center;
display: block;
} </style> <head> <meta charset="utf-8"
<meta name="viewport" content="width=device-width, initial-scale=1"> <script src="[jquery-3.2.1.min.js](view-source:http://120.24.86.145:9001/test/jquery-3.2.1.min.js)"></script> <title>点击一百万次</title> </head> <body> <h1 id="goal">Goal: <span id="clickcount">0</span>/1000000</h1> <img id="cookie" src="[cookie.png](view-source:http://120.24.86.145:9001/test/cookie.png)"> <span id="flag"></span> </body> <script> var clicks=0
$(function() {
$("#cookie")
.mousedown(function() {
$(this).width('350px').height('350px');
})
.mouseup(function() {
$(this).width('375px').height('375px');
clicks++;
$("#clickcount").text(clicks);
if(clicks>= 1000000){
var form = $('<form action="" method="post">' +
'<input type="text" name="clicks" value="' + clicks + '" hidden/>' +
'</form>');
$('body').append(form);
form.submit();
}
});
}); </script> </html> </pre>
二,分析
- 1,分析可知当点击超过1000000次,post提交clicks=XX(大于1000000的数)
- 2,不可能手动点击1000000次,构造post请求提交即可得到flag
三,知识点