{"id":4854,"date":"2023-11-22T20:03:43","date_gmt":"2023-11-22T11:03:43","guid":{"rendered":"https:\/\/www.photoguraphy.com\/?p=4854"},"modified":"2023-11-22T20:40:36","modified_gmt":"2023-11-22T11:40:36","slug":"picoctf-nice-netcat-%ed%92%80%ec%9d%b4","status":"publish","type":"post","link":"https:\/\/www.photoguraphy.com\/?p=4854","title":{"rendered":"[picoCTF] Nice netcat... \ud480\uc774"},"content":{"rendered":"<p>\uc870\ud68c\uc218: 6<\/p><h2>\ubb38\uc81c<\/h2>\n<p><code>There is a nice program that you can talk to by using this command in a shell: $ nc mercury.picoctf.net 43239, but it doesn't speak English...<\/code><\/p>\n<hr \/>\n<p>\ub137\ucf13\uc73c\ub85c \uc811\uc18d\ud558\uba74 \uc22b\uc790\ub9cc \ucb48\ub8e8\ub8e9 \ub098\uc628\ub2e4.<\/p>\n<pre><code class=\"language-bash line-numbers\">\u276f nc mercury.picoctf.net 43239\n112 \n105 \n99 \n111 \n67 \n84 \n70 \n123 \n103 \n48 \n48 \n100 \n95 \n107 \n49 \n116 \n116 \n121 \n33 \n95 \n110 \n49 \n99 \n51 \n95 \n107 \n49 \n116 \n116 \n121 \n33 \n95 \n55 \n99 \n48 \n56 \n50 \n49 \n102 \n53 \n125 \n10 \n<\/code><\/pre>\n<p>\uc0dd\uae34\uac8c 100% \uc544\uc2a4\ud0a4\ub2e4\u314b\u314b<\/p>\n<p>\ud558\ub098\uc529 \ucc3e\uae30 \ud798\ub4dc\ub2c8 \uac04\ub2e8\ud558\uac8c \ubcc0\ud658 \ucf54\ub4dc \ud558\ub098\ub9cc \ub9cc\ub4e4\uc790.<\/p>\n<pre><code class=\"language-ruby line-numbers\">res = `nc mercury.picoctf.net 43239`\nflag = res.split.map { |num| num.to_i.chr }.join\n\nputs flag\n<\/code><\/pre>\n<hr \/>\n<h3>\ucf54\ub4dc \uc124\uba85<\/h3>\n<pre><code class=\"language-ruby line-numbers\">res = `nc mercury.picoctf.net 43239`\n<\/code><\/pre>\n<p>nc mercury.picoctf.net 43239\ub97c \uc2e4\ud589\ud558\uace0 \ucd9c\ub825\ub418\ub294 \uac12\uc744 res\uc5d0 \uc800\uc7a5\ud558\uace0<\/p>\n<pre><code class=\"language-ruby line-numbers\">flag = res.split.map { |num| num.to_i.chr }.join \n<\/code><\/pre>\n<p>res \uac12\uc744 \ubd84\ud560(split)\ud55c \ub2e4\uc74c \ud558\ub098\uc529 \ubd88\ub7ec\uc628\ub2e4(map). \uadf8\ub9ac\uace0 \uadf8 \ubd88\ub7ec\uc628 \uac12\uc744 num\uc5d0\uac8c \ub123\uace0(|num|) \uc774 \uac12\uc744 \uc815\uc218\ub85c \ubcc0\uacbd\ud55c\ub2e4(.to_i). \uadf8\ub9ac\uace0 \uc774 \uc815\uc218\ub97c \ud574\ub2f9\ud558\ub294 \ubb38\uc790\ub85c \ubcc0\uacbd\ud558\uace0(.chr) \ud558\ub098\uc758 \ubb38\uc790\uc5f4\ub85c \ud569\uce5c\ub2e4(.join). \ub9c8\uc9c0\ub9c9\uc73c\ub85c \uc774 \uac12\uc744 flag\uc5d0 \uc800\uc7a5\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-ruby line-numbers\">puts flag \n<\/code><\/pre>\n<p>flag\uc5d0 \uc800\uc7a5\ub41c \uac12\uc744 \ucd9c\ub825\ud55c\ub2e4.<\/p>\n<hr \/>\n<p>\uc774\uc81c \ub9cc\ub4e4\uc5b4\uc9c4 \ub8e8\ube44 \ucf54\ub4dc\ub97c \uc2e4\ud589\ud558\uc790.<\/p>\n<pre><code class=\"language-bash line-numbers\">\u276f ruby run.rb\n<\/code><\/pre>\n<p>\ub05d.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc870\ud68c\uc218: 6\ubb38\uc81c There is a nice program that you can talk to by using this command in a shell: $ nc mercury.picoctf.net 43239, but it doesn't speak English... \ub137\ucf13\uc73c\ub85c \uc811\uc18d\ud558\uba74 \uc22b\uc790\ub9cc \ucb48\ub8e8\ub8e9 \ub098\uc628\ub2e4. \u276f nc mercury.picoctf.net 43239 112 105 99 111 67 84 70 123 103 48 48 100 95 107 49 116 116 121&hellip;<a href=\"https:\/\/www.photoguraphy.com\/?p=4854\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">[picoCTF] Nice netcat... \ud480\uc774<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[54,53],"class_list":["post-4854","post","type-post","status-publish","format-standard","hentry","category-computer","tag-ctf","tag-picoctf"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/posts\/4854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4854"}],"version-history":[{"count":2,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/posts\/4854\/revisions"}],"predecessor-version":[{"id":4860,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=\/wp\/v2\/posts\/4854\/revisions\/4860"}],"wp:attachment":[{"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.photoguraphy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}