{"id":1217,"date":"2019-09-07T22:38:43","date_gmt":"2019-09-07T14:38:43","guid":{"rendered":"http:\/\/van-yzt.com\/?p=1217"},"modified":"2019-09-07T22:38:43","modified_gmt":"2019-09-07T14:38:43","slug":"bandit-level-12-%e2%86%92-level-13","status":"publish","type":"post","link":"https:\/\/huzi-baozi.com\/?p=1217","title":{"rendered":"Bandit Level 12 \u2192 Level 13"},"content":{"rendered":"<p>The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under \/tmp in which you can work using mkdir. For example: mkdir \/tmp\/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!)<\/p>\n<h2>\n\u89e3\u5bc6<\/h2>\n<pre><code class=\"language-shell\">bandit12@bandit:~$ mktemp -d\n\/tmp\/tmp.NXvJ0vbt5I\nbandit12@bandit:~$ cp data.txt \/tmp\/tmp.NXvJ0vbt5I\/\nbandit12@bandit:~$ cd \/tmp\/tmp.NXvJ0vbt5I\/\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data.txt\ndata.txt: ASCII text\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ xxd -r data.txt &gt; data1\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data1\ndata1: gzip compressed data, was &quot;data2.bin&quot;, last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ xxd -r data.txt &gt; data1.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ gzip -d data1.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data1\ndata1: bzip2 compressed data, block size = 900k\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ bzip2 -d data1\nbzip2: Can't guess original name for data1 -- using data1.out\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data1.out\ndata1.out: gzip compressed data, was &quot;data4.bin&quot;, last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ mv data1.out data1.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ gzip -d data1.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data1\ndata1: POSIX tar archive (GNU)\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ tar -xf data1\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data5.bin  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data5.bin\ndata5.bin: POSIX tar archive (GNU)\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ tar -xf data5.bin\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data5.bin  data6.bin  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data6.bin\ndata6.bin: bzip2 compressed data, block size = 900k\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ bzip2 -d data6.bin\nbzip2: Can't guess original name for data6.bin -- using data6.bin.out\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data5.bin  data6.bin.out  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data6.bin.out\ndata6.bin.out: POSIX tar archive (GNU)\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ tar -xf data6.bin.out\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data5.bin  data6.bin.out  data8.bin  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data8.bin\ndata8.bin: gzip compressed data, was &quot;data9.bin&quot;, last modified: Tue Oct 16 12:00:23 2018, max compression, from Unix\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ mv data8.bin data8.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ gzip -d data8.gz\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ ls\ndata1  data5.bin  data6.bin.out  data8  data.txt\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ file data8\ndata8: ASCII text\nbandit12@bandit:\/tmp\/tmp.NXvJ0vbt5I$ cat data8\nThe password is 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL\n<\/code><\/pre>\n<h2>\n\u77e5\u8bc6\u70b9<\/h2>\n<ol>\n<li>\n<code>mktemp -d<\/code>\u5728<code>\/tmp\/<\/code>\u4e0b\u521b\u5efa\u968f\u673a\u540d\u79f0\u76ee\u5f55\uff1b<\/li>\n<li>\n<code>xxd -r<\/code>\u9006\u5411\u6587\u4ef6\uff0c\u4ece\u5341\u516d\u8fdb\u5236\u6587\u4ef6\u9006\u5411\u56de\u4e4b\u524d\u7684\u6587\u4ef6\uff1b<\/li>\n<li>\n<code>gzip -d<\/code>\u89e3\u538bgz\u538b\u7f29\u6587\u4ef6\uff1b<\/li>\n<li>\n<code>bzip2<\/code>\u89e3\u538bbzip2\u538b\u7f29\u6587\u4ef6\uff1b<\/li>\n<li>\n<code>tar -xf<\/code>\u89e3\u5305tar\u6253\u5305\u6587\u4ef6\uff1b<\/li>\n<li>\nIMPORTANT: PATIENCE<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The password for the next level is stored in the file data.txt, which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under \/tmp in which you can work using mkdir. For example: mkdir \/tmp\/myname123. Then copy the datafile using cp, and &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/huzi-baozi.com\/?p=1217\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Bandit Level 12 \u2192 Level 13&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1217","post","type-post","status-publish","format-standard","hentry","category-bandit"],"_links":{"self":[{"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/posts\/1217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1217"}],"version-history":[{"count":1,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/posts\/1217\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=\/wp\/v2\/posts\/1217\/revisions\/1218"}],"wp:attachment":[{"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/huzi-baozi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}