<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mwh.geek.nz &#187; osws</title>
	<atom:link href="http://mwh.geek.nz/category/osws/feed/" rel="self" type="application/rss+xml" />
	<link>http://mwh.geek.nz</link>
	<description></description>
	<lastBuildDate>Sun, 27 Nov 2011 03:40:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>osws, the one-shot web server</title>
		<link>http://mwh.geek.nz/2009/03/02/osws-the-one-shot-web-server/</link>
		<comments>http://mwh.geek.nz/2009/03/02/osws-the-one-shot-web-server/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 09:44:39 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[osws]]></category>
		<category><![CDATA[netcat]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://mwh.geek.nz/?p=71</guid>
		<description><![CDATA[Something I had on my mind for a while and now got around to while I was setting up a new system &#8211; a way of serving a file over HTTP without having to set up a proper server, with some nicer traits than a straight `netcat -lc -p 8080 &#60; file` does. This is [...]]]></description>
			<content:encoded><![CDATA[<p>Something I had on my mind for a while and now got around to while I was setting up a new system &#8211; a way of serving a file over HTTP without having to set up a proper server, with some nicer traits than a straight `netcat -lc -p 8080 &lt; file` does. This is the one-shot web server: run <strong>osws file.tar.bz2</strong> and it immediately starts a server on port 8080 (by default, can be changed) that will redirect a request for / to /file.tar.bz2 (so it saves with the right name from wget, or shows up nicely elsewhere) and will serve out the content of the file for any other request, then terminate.</p>
<p>That means <strong>wget http://10.1.1.5:8080</strong> will save file.tar.bz2 on the remote client. Accessing from a web browser or other tools will work as well. osws can also serve on port 80, either when run as root or by using its fwd_osws tool, which is intended to be installed setuid and forwards the port locally to the real server. More details are in the README file; osws depends on netcat and the usual array of standard utilities, and a C compiler with root access for fwd_osws.</p>
<p><a href="http://mwh.geek.nz/files/osws/osws-0.1.tar.lzma">osws 0.1 tarball</a></p>
<p>make &amp;&amp; make install will install to ~/.local by default; specify PREFIX to change that. make install-setuid will build and install osws-fwd: that needs to be run  as root to make it setuid. That part is optional, the only missing feature will be the use of ports below 1024.</p>
]]></content:encoded>
			<wfw:commentRss>http://mwh.geek.nz/2009/03/02/osws-the-one-shot-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

