<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Web server oneliner with bash</title>
	<atom:link href="http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/</link>
	<description></description>
	<lastBuildDate>Thu, 11 Mar 2010 22:53:28 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: TheWorm</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-47853</link>
		<dc:creator>TheWorm</dc:creator>
		<pubDate>Wed, 04 Nov 2009 23:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-47853</guid>
		<description>Good work Erdem Güven! But you didn&#039;t add just the directory browse support, now you can see every file you have on you computer, not just the ones you put in the same folder where the script is.
Try looking at http://localhost:8080///etc/passwd
This should give you an idea about what I&#039;m trying to explain...</description>
		<content:encoded><![CDATA[<p>Good work Erdem Güven! But you didn&#8217;t add just the directory browse support, now you can see every file you have on you computer, not just the ones you put in the same folder where the script is.<br />
Try looking at <a href="http://localhost:8080///etc/passwd" rel="nofollow">http://localhost:8080///etc/passwd</a><br />
This should give you an idea about what I&#8217;m trying to explain&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: troppo caffe` poco cervello</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-44284</link>
		<dc:creator>troppo caffe` poco cervello</dc:creator>
		<pubDate>Sun, 04 Oct 2009 01:31:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-44284</guid>
		<description>WEBSERVER MORELINER WITH BASH


while [ $? -eq 0 ];do 
  nc -vlp 8080 -c &#039;(
    r=read
    e=echo
    $r a b c
    z=$r
    while [ ${#z} -gt 2 ]
    do 
      $r z
    done
    f=`$e $b&#124;sed &#039;s/[^a-z0-9_.-]//gi&#039;`
    h=&quot;HTTP/1.0&quot;
    o=&quot;$h 200 OK\r\n&quot;
    c=&quot;Content&quot;
    if [ -z $f ];then 
      ($e $o
       ls&#124;(
         while $r n
         do 
           if [ -f &quot;$n&quot; ]; then 
             $e &quot;&lt;a href=&quot;/$n&quot; rel=&quot;nofollow&quot;&gt;`ls -gh $n`&lt;/a&gt;&quot;
           fi
         done
       )
      )
    elif [ -f $f ];then 
      $e &quot;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&quot;
      $e
      cat $f
    else 
      $e -e &quot;$h 404 Not Found\n\n404\n&quot;
    fi
  )&#039;
done</description>
		<content:encoded><![CDATA[<p>WEBSERVER MORELINER WITH BASH</p>
<p>while [ $? -eq 0 ];do<br />
  nc -vlp 8080 -c &#8216;(<br />
    r=read<br />
    e=echo<br />
    $r a b c<br />
    z=$r<br />
    while [ ${#z} -gt 2 ]<br />
    do<br />
      $r z<br />
    done<br />
    f=`$e $b|sed &#8217;s/[^a-z0-9_.-]//gi&#8217;`<br />
    h=&#8221;HTTP/1.0&#8243;<br />
    o=&#8221;$h 200 OK\r\n&#8221;<br />
    c=&#8221;Content&#8221;<br />
    if [ -z $f ];then<br />
      ($e $o<br />
       ls|(<br />
         while $r n<br />
         do<br />
           if [ -f "$n" ]; then<br />
             $e &#8220;<a href="/$n" rel="nofollow">`ls -gh $n`</a>&#8221;<br />
           fi<br />
         done<br />
       )<br />
      )<br />
    elif [ -f $f ];then<br />
      $e &#8220;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&#8221;<br />
      $e<br />
      cat $f<br />
    else<br />
      $e -e &#8220;$h 404 Not Found\n\n404\n&#8221;<br />
    fi<br />
  )&#8217;<br />
done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ann</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-32506</link>
		<dc:creator>ann</dc:creator>
		<pubDate>Tue, 26 May 2009 18:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-32506</guid>
		<description>it doesnt work to me ,it load and when i conect with firefox only appears a  white screen :(

Also the erdem code,but it shows this:
syntax error near unexpected token `(&#039;

my system :debian etch.
some help?
thanks</description>
		<content:encoded><![CDATA[<p>it doesnt work to me ,it load and when i conect with firefox only appears a  white screen <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Also the erdem code,but it shows this:<br />
syntax error near unexpected token `(&#8216;</p>
<p>my system :debian etch.<br />
some help?<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-32289</link>
		<dc:creator>Victor</dc:creator>
		<pubDate>Sun, 24 May 2009 21:19:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-32289</guid>
		<description>Hi Erdem. Can you post the code to pastebin, please? :)</description>
		<content:encoded><![CDATA[<p>Hi Erdem. Can you post the code to pastebin, please? <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dani</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-32216</link>
		<dc:creator>dani</dc:creator>
		<pubDate>Sun, 24 May 2009 11:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-32216</guid>
		<description>hello,i am trying the version with directories,but it doesnt work
thanks</description>
		<content:encoded><![CDATA[<p>hello,i am trying the version with directories,but it doesnt work<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: artiomix</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-24315</link>
		<dc:creator>artiomix</dc:creator>
		<pubDate>Fri, 30 Jan 2009 12:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-24315</guid>
		<description>Hi, Erdem, you are welcome to send the code to me (artiomixATgmailDOTcom) and I will publish it here :)</description>
		<content:encoded><![CDATA[<p>Hi, Erdem, you are welcome to send the code to me (artiomixATgmailDOTcom) and I will publish it here <img src='http://www.linuxscrew.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erdem Güven</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-24314</link>
		<dc:creator>Erdem Güven</dc:creator>
		<pubDate>Fri, 30 Jan 2009 11:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-24314</guid>
		<description>I&#039;m sorry for repeat comments. This must be displayed correctly:
:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#039;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b&#124;sed &quot;s#^/##g;s#/$&quot;&quot;##g&quot;`;h=&quot;HTTP/1.0&quot;;o=&quot;$h 200 OK\r\n&quot;;c=&quot;Content&quot;;if [ -z &quot;$f&quot; -o -d &quot;$f&quot; ];then($e $o;$e &quot;&lt;a href=\&quot;/`dirname &quot;$f&quot;`\&quot;&gt;Parent Directory&lt;/a&gt;&lt;br&gt;&quot;;if [ $f ];then f=$f/;fi;cd &quot;$f&quot;;ls&#124;(while $r n;do if [ -e &quot;$n&quot; ]; then $e &quot;&lt;a href=\&quot;/$f$n\&quot;&gt;`ls -ghd $n`&lt;/a&gt;&lt;br&gt;&quot;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &quot;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&quot;;$e;cat $f;else $e -e &quot;$h 404 Not Found\n\n404 $f\n&quot;;fi)&#039;;done</description>
		<content:encoded><![CDATA[<p>I&#8217;m sorry for repeat comments. This must be displayed correctly:<br />
:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#8217;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed &quot;s#^/##g;s#/$&quot;&quot;##g&quot;`;h=&quot;HTTP/1.0&quot;;o=&quot;$h 200 OK\r\n&quot;;c=&quot;Content&quot;;if [ -z &quot;$f&quot; -o -d &quot;$f&quot; ];then($e $o;$e &quot;&lt;a href=\&quot;/`dirname &quot;$f&quot;`\&quot;&gt;Parent Directory&lt;/a&gt;&lt;br&gt;&quot;;if [ $f ];then f=$f/;fi;cd &quot;$f&quot;;ls|(while $r n;do if [ -e &quot;$n&quot; ]; then $e &quot;&lt;a href=\&quot;/$f$n\&quot;&gt;`ls -ghd $n`&lt;/a&gt;&lt;br&gt;&quot;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &quot;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&quot;;$e;cat $f;else $e -e &quot;$h 404 Not Found\n\n404 $f\n&quot;;fi)&#8217;;done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erdem Güven</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-24301</link>
		<dc:creator>Erdem Güven</dc:creator>
		<pubDate>Thu, 29 Jan 2009 19:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-24301</guid>
		<description>Ooops, system removed all tags in the code. Here is another try:

:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#039;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b&#124;sed &quot;s#^/##g;s#/$&quot;&quot;##g&quot;`;h=&quot;HTTP/1.0&quot;;o=&quot;$h 200 OK\r\n&quot;;c=&quot;Content&quot;;if [ -z &quot;$f&quot; -o -d &quot;$f&quot; ];then($e $o;$e &quot;&lt;a&gt;Parent Directory&lt;/a&gt;&quot;;if [ $f ];then f=$f/;fi;cd &quot;$f&quot;;ls&#124;(while $r n;do if [ -e &quot;$n&quot; ]; then $e &quot;&lt;a&gt;`ls -ghd $n`&lt;/a&gt;&quot;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &quot;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&quot;;$e;cat $f;else $e -e &quot;$h 404 Not Found\n\n404 $f\n&quot;;fi)&#039;;done
</description>
		<content:encoded><![CDATA[<p>Ooops, system removed all tags in the code. Here is another try:</p>
<p>:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#8217;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed &#8220;s#^/##g;s#/$&#8221;"##g&#8221;`;h=&#8221;HTTP/1.0&#8243;;o=&#8221;$h 200 OK\r\n&#8221;;c=&#8221;Content&#8221;;if [ -z "$f" -o -d "$f" ];then($e $o;$e &#8220;<a>Parent Directory</a>&#8220;;if [ $f ];then f=$f/;fi;cd &#8220;$f&#8221;;ls|(while $r n;do if [ -e "$n" ]; then $e &#8220;<a>`ls -ghd $n`</a>&#8220;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &#8220;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&#8221;;$e;cat $f;else $e -e &#8220;$h 404 Not Found\n\n404 $f\n&#8221;;fi)&#8217;;done</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erdem Güven</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-24300</link>
		<dc:creator>Erdem Güven</dc:creator>
		<pubDate>Thu, 29 Jan 2009 19:24:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-24300</guid>
		<description>I had added directory browse support:

:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#039;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b&#124;sed &quot;s#^/##g;s#/$&quot;&quot;##g&quot;`;h=&quot;HTTP/1.0&quot;;o=&quot;$h 200 OK\r\n&quot;;c=&quot;Content&quot;;if [ -z &quot;$f&quot; -o -d &quot;$f&quot; ];then($e $o;$e &quot;&lt;a&gt;Parent Directory&lt;/a&gt;&quot;;if [ $f ];then f=$f/;fi;cd &quot;$f&quot;;ls&#124;(while $r n;do if [ -e &quot;$n&quot; ]; then $e &quot;&lt;a&gt;`ls -ghd $n`&lt;/a&gt;&quot;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &quot;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&quot;;$e;cat $f;else $e -e &quot;$h 404 Not Found\n\n404 $f\n&quot;;fi)&#039;;done

Tested on Ubuntu 8.04.</description>
		<content:encoded><![CDATA[<p>I had added directory browse support:</p>
<p>:;while [ $? -eq 0 ];do nc -vlp 8080 -c&#8217;(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed &#8220;s#^/##g;s#/$&#8221;"##g&#8221;`;h=&#8221;HTTP/1.0&#8243;;o=&#8221;$h 200 OK\r\n&#8221;;c=&#8221;Content&#8221;;if [ -z "$f" -o -d "$f" ];then($e $o;$e &#8220;<a>Parent Directory</a>&#8220;;if [ $f ];then f=$f/;fi;cd &#8220;$f&#8221;;ls|(while $r n;do if [ -e "$n" ]; then $e &#8220;<a>`ls -ghd $n`</a>&#8220;;fi;done););cd -&gt;/dev/null;elif [ -f $f ];then $e &#8220;$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`&#8221;;$e;cat $f;else $e -e &#8220;$h 404 Not Found\n\n404 $f\n&#8221;;fi)&#8217;;done</p>
<p>Tested on Ubuntu 8.04.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simple way to transmit files over network (nc utility) &#124; Linux Screw</title>
		<link>http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/comment-page-1/#comment-51</link>
		<dc:creator>Simple way to transmit files over network (nc utility) &#124; Linux Screw</dc:creator>
		<pubDate>Tue, 11 Sep 2007 21:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.linuxscrew.com/2007/09/06/web-server-on-bash-in-one-line/#comment-51</guid>
		<description>[...] might also be interested in: Web server on bash (in one line!) Popularity: [...]</description>
		<content:encoded><![CDATA[<p>[...] might also be interested in: Web server on bash (in one line!) Popularity: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
