光棍节游戏
前面几关就不提了
第八关开始,可以用firedebug来直接修改 或则将源码修改成这样
<form method="post" action="http://segmentfault.com/game/?k=638dd2a4096b4285ae9a3289513cc59c"> <input type="text" name="k" value="0741976f032afa8fb3a5209d4260a0eb" /> <input type="submit" name="k" value="0741976f032afa8fb3a5209d4260a0eb" /> </form>
这个是最通俗的做法
进入第九关,方法也是别样
既有用python来实现的也有用其他脚本实现的
这里我用java来实现下
将浏览器中的文字保存成文本,_替换成1保存成nine.txt
1 String filepath=CharIoTest.class.getResource("").getFile()+ 2 "/nine.txt"; 3 FileInputStream in=new FileInputStream(new File(filepath)); 4 byte b[]=new byte[1024]; 5 int i=0; 6 while((i=in.read(b))!=-1){ 7 //String s=new String(b,0,i,"gbk"); 8 ss.append(b); 9 } 10 String str=ss.toString(); 11 byte temp[]=str.getBytes(); 12 BASE64Encoder base64Encoder =new BASE64Encoder(); 13 String bb=base64Encoder.encode(temp); 14 System.out.println(bb);
打印出来的结果
W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JA
YzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3
MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0
W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JA
YzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3
MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0
W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JA
YzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3
MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0
W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JA
YzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3
MTY0W0JAYzE3MTY0W0JAYzE3MTY0W0JAYzE3MTY0
这时候已经是base64的
接下来就是将这段字符写入到tar包中,然后解压文件就可以看到Key了
但是java没有提供操作tar的API,需要ant.jar来支持,先吃饭
后续有时候完善代码
关于tar.gz的http://blog.csdn.net/wslovess/article/details/5092898