细节决定成败!
在正式进入黑客闯关界面之前我们可以看到一个tips:
The password is hidden in an unknown file, and Sam has set up a script to display a calendar. Requirements: Basic UNIX command knowledge.
说明这一关需要用过日历脚本执行unix命令找到隐藏的密码文件。
This time Network Security sam has saved the unencrypted level7 password in an obscurely named file saved in this very directory.
In other unrelated news, Sam has set up a script that returns the output from the UNIX cal command. Here is the script:
Enter the year you wish to view and hit 'view'.
说明密码文件就在本目录下,但是取了很复杂的名字。
本来是想用管道来搞定了,但是实验后发现不行。
后来直接用分好把两个命令分割开就OK了。
执行 ;ls
结果如下:
January 2014 Mon Tue Wed Thu Fri Sat Sun 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 29 30 31 . .. cal.pl index.php k1kh31b1n55h.php level7.php直接访问: https://www.hackthissite.org/missions/basic/7/k1kh31b1n55h.php就能看到密码了。