web4

开卷看题

这么明显的让看源码,那就看看喽

看源码

这是什么乱七八糟的……还好我们有浏览器这一神器,看我秀一波操作

Note:为什么最后一行没有连带执行eval而仅仅着重参数?因为eval是把数据当做代码执行,所以我们只需要关心执行的代码是什么就可以了

人类可读代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<title>BKCTF-WEB4</title>

<body>
<div style="display:none;"></div>
<form action="index.php" method="post">
看看源代码?<br>
<br>
<script>
function checkSubmit() {
var a = document.getElementById("password");
if ("undefined" != typeof a) {
if ("67d709b2b54aa2aa648cf6e87a7114f1" == a.value)
return !0;
alert("Error");
a.focus();
return !1
}
}
document.getElementById("levelQuest").onsubmit = checkSubmit;
</script>

<input type="input" name="flag" id="flag" />
<input type="submit" name="submit" value="Submit" />
</form>
</body>

</html>

翻译成人话:当password等于67d709b2b54aa2aa648cf6e87a7114f1时通过验证

知道了密码直接输入即可得到想要的答案

得到flag

后记

善用工具可以大幅提高效率

  • 本文作者: Snow-NSAH
  • 本文链接: https://blog.nsah.top/2020/09/06/CTF/WEB/Bugku(旧版)/web4/
  • 反馈建议: 限于作者水平, 博文肯定有不足甚至错误之处, 欢迎发送邮件提供您的宝贵建议
  • 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!