酷壳的谜题

2014年8月11日 | 分类: 编程技术, 读书笔记 | 标签:

前一段时间酷壳举办了一个破解活动,还是比较有意思的。

第零题:http://fun.coolshell.cn/first.html

My brain has been fucked特指bf语言,可以编译获得下一关的页面:

echo '++++++++[>+>++>+++>++++>+++++>++++++>+++++++>++++++++>+++++++++>++++++++++>+++++++++++>++++++++++++>+++++++++++++>++++++++++++++>+++++++++++++++>++++++++++++++++<<<<<<<<<<<<<<<<-]>>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<>>>>>>>>>>>>+++.---<<<<<<<<<<<<>>>>>>>>>>>>>>-.+<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<>>>>>>--.++<<<<<<>>>>>>>>>>>>>.<<<<<<<<<<<<<>>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<<>>>>>>>>>>>>>>---.+++<<<<<<<<<<<<<<>>>>>>>>>>>>>>----.++++<<<<<<<<<<<<<<.'|sed '
s/\([-+]\)/\1\1*p;/g
s/</p--;/g
s/>/p++;/g
s/\./putchar(*p);/g
s/\[/while(*p){/g
s/\]/}/g
1s/^/main(){char*p=calloc(1,6);/
$s/$/}/
/./!d'|gcc -xc - 2>/dev/null&&./a.out

welcome.html

第一题:http://fun.coolshell.cn/welcome.html

2, 3, 6, 18, 108, ?

What is the meaning of life, the universe and everything?

第一个很容易得到是1944

第二个搜索得到是42,可以参见为什么是42:

http://wiki.answers.com/Q/Why_is_42_the_answer_to_life_the_universe_and_everything

http://fun.coolshell.cn/1944.html

http://fun.coolshell.cn/42.html

因此第3个题目是:

1944*42=81648.html

第二题:http://fun.coolshell.cn/81648.html

这个键盘有一个链接,http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard是介绍键盘布局的,通过键盘布局的映射,可以得到新的一串字符串:

这是给出的Dvorak下面的字符串:
macb() ? lpcbyu(&gbcq/_\021%ocq\012\0_=w(gbcq)/_dak._=}_ugb_[0q60)s+
这是QWERTY布局下的字符串:
main() { printf(&unix[“\021%six\012\0″],(unix)[“have”]+”fun”-0x60);}

编译执行之后是unix

第三题:http://fun.coolshell.cn/unix.html

扫描二维码之后,是一个编码规则[abcdefghijklmnopqrstuvwxyz] <=> [pvwdgazxubqfsnrhocitlkeymj],按照改规则翻译给定的字符串,得到的是:

Where there is a shell, there is a way. I expect you use the shell command to solve this problem, now, please try using the rot13 of “shell” to enter next level.根据提示下一关应该是shell的rot13的编码:

所谓的rot13就是将一个字符加13之后得到的新字符:

echo 'shell'|tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
furry

第四题:http://fun.coolshell.cn/furyy.html

这个题目从给定的几个字符串找到规律,发现是回文字符串,根据提示lost的信息被隐藏在html的源码里面了,打开源码发现有注视掉的一堆字符串:

对这些字符串进行过滤,找到符合回文的字符串:

E1v1E

4FaF4

9XrX9

O3i3O

0MaM0

4GbG4

M5l5M

0WeW0

Y0s0Y

第五题:http://fun.coolshell.cn/variables.html

提示一直前进,你就能找到目标,第一个链接图片的地址是:http://fun.coolshell.cn/n/2014,访问得到一个数字,根据这个数字继续访问,直到得到结果:Cool the next level is “tree”

第六题: http://fun.coolshell.cn/tree.html

 

根据题目是提供一个中序遍历和后续遍历,然后找出最长路径:z, W, p, 8, L, G, n, 0, 1, w, x, J, 7

把这个代入到echo U2FsdGVkX1+gxunKbemS2193vhGGQ1Y8pc5gPegMAcg=|openssl enc -aes-128-cbc -a -d -pass pass:zWp8LGn01wxJ7中,得到了下一关的地址。

第七题:http://fun.coolshell.cn/nqueens.html

题目中给出一个八皇后的解,并且得到了一个code,希望根据九皇后的所有解,找到一个符合条件的解:

sha1( $passwd + $code + “\n” ) = e48d316ed573d3273931e19f9ac9f9e6039a4242,遍历之后得到了:

953172864这个能够使得等式成立。

第八题:http://fun.coolshell.cn/953172864.html

根据题目,看到是一个26进制:

想找到这个COOLSHELL / SHELL = ???对应的26进制的解:

先把COOLSHELL和SHELL分别转成10进制,然后相除得到10进制的解,再把这个解转化成26进制:DUYO

第九题:http://fun.coolshell.cn/DUYO.html

通过图片,看到这是一个猪圈和Fraternal Organisation的标识,搜索之后得到一个猪圈密码的密码表:

http://en.wikipedia.org/wiki/Fraternity

http://en.wikipedia.org/wiki/Freemason%27s_cipher

对照给出的图片,很快就可以翻译出密码明文为helloworld

因此最后的结果就是:

http://fun.coolshell.cn/helloworld.html

the end

挺有意思的一个活动,能够了解到很多不熟悉的东西。

本文的评论功能被关闭了.