Imagine you just want to send a file over the network, but your counterpart, does not understand how to use netcat. Sendhttp is the solution for this problem. There is only a small command necessary on your machine to send anybody in you local network your favorite file:
$ sendhttp yourfavoritefile.rb
Your counterpart now points his browser to http://you.rip.add.res:12345/yourfavoritefile.rb , and she will immediately have your file (time may depend on your network connection and the size of the file). If the amount of typing is bothering her, you can even turn on sendhttp’s directory listing feature, so she can just click on the file.
Sendhttp is a small httpserver. It’s intention is to to deliver any file to anybody in the local network on the fly. It’s intention is not to host websites or anything else permanently. Most of it is written in ruby, some parts are written in C. It can utilize a complete gigabit ethernet connection with big files. It requires at least ruby1.8. I am anxiously waiting for ruby1.9/2.0, as it contains some highly useful features like the sendfile systemcall. Until it becomes stable, I have to keep my own C wrapper for sendfile.
You can get the newest version with:
$ git clone git://johannes.krude.de/sendhttp
Sendhttp is licensed under the
AGPLv3, this license has
some special features. If you are testing your modified version of
sendhttp at home, and your mum accidentally connect’s with netcat to
it. You have to hand her over your modified sourcecode if she
requests it. Otherwise you would be in violation with the license. To
ease this problems, sendhttp always delivers it’s own sourcecode to
anyone requesting it. If you create some useful changes to sendhttp,
please send me a git commit or just a patch, so everybody
benefit’s from your work.
Sendhttp’s Rakefile is ready to build gentoo ebuilds, so you can use portage to install it.
Except where otherwise noted, content on this page is licensed under a Creative Commons Attribution-Share alike 3.0 Germany License.