{"id":4176,"date":"2014-03-31T11:32:03","date_gmt":"2014-03-31T08:32:03","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=4176"},"modified":"2014-04-25T11:34:56","modified_gmt":"2014-04-25T08:34:56","slug":"%d0%b1%d1%8b%d1%81%d1%82%d1%80%d0%be-%d0%bf%d0%be%d0%b4%d0%bd%d0%b8%d0%bc%d0%b0%d0%b5%d0%bc-webserver","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=4176","title":{"rendered":"\u0411\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c webserver"},"content":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c <strong>webserver<\/strong> \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u041f\u041e, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u041d\u0438\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<p><strong><span style=\"color: #ff0000;\">1) python<\/span><\/strong><\/p>\n<p><code>$python -m SimpleHTTPServer<br \/>\nServing HTTP on 0.0.0.0 port 8000 ...<\/code><\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f <strong>web<\/strong>-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <strong>8000<\/strong>.<\/p>\n<p><strong><span style=\"color: #ff0000;\">2) netcat<\/span><\/strong><\/p>\n<p><code>$while true ; do nc -l 80 &lt; index.html ; done<\/code><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0434\u0451\u0442 \u0436\u0451\u0441\u0442\u043a\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043a\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e <strong>http<\/strong>.<\/p>\n<p><!--more--><\/p>\n<p><strong><span style=\"color: #ff0000;\">3) perl<\/span><\/strong><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c 1 \u043d\u044e\u0430\u043d\u0441: \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435, \u0447\u0435\u043c \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e <strong>webserver<\/strong>:<\/p>\n<p><code>$ perl -MIO::All -e 'io(\":8080\")-&gt;fork-&gt;accept-&gt;(sub { $_[0] &lt; io(-x $1 ? \".\/$1 |\" : $1) if \/^GET \\\/(.*) \/ })'<\/code><\/p>\n<p><code>$ perl -MHTTP::Server::Brick -e '$s=HTTP::Server::Brick-&gt;new(port=&gt;8080); $s-&gt;mount(\"\/\"=&gt;{path=&gt;\"\/tmp\"}); $s-&gt;start'<\/code><\/p>\n<p><strong><span style=\"color: #ff0000;\">4) php<\/span><\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u043e\u0438\u0442 <strong>php<\/strong>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u044c <strong>apache\/nginx<\/strong>, \u0430 \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p><code>$ php -S localhost:8080<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c webserver \u0431\u0435\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u041f\u041e, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u041d\u0438\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. 1) python $python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 &#8230; \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f web-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 8000. 2) netcat $while true ; do nc -l 80 &lt; index.html ; done \u0417\u0434\u0435\u0441\u044c \u0438\u0434\u0451\u0442 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-4176","post","type-post","status-publish","format-standard","hentry","category-www"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4176"}],"version-history":[{"count":3,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4176\/revisions"}],"predecessor-version":[{"id":4227,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4176\/revisions\/4227"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}