Page 1 of 1

Netcat-based LAN file transfer utility (tiny)

Posted: Fri 22 Jan 2010, 13:27
by vovchik
Dear puppians,

I notice there is some useful work going on regarding file sharing using Samba. In my view, Samba is a big, fat pig and, because I really have no reason to boot windows, I cobbled together a little script that uses a patched Debian netcat to transfer files within a LAN environment. It is not perfect, but does the job of transferring individual files. Next I will try to include directories, which netcat can do. I have attached the script and the Debian netcat (because it has the -q option). Please have a look. Perhaps somebody may want to give this script a gtkdialog front end.

With kind regards,
vovchik

PS. Unpack the archive and read readme.txt for setup instructions.

Posted: Sat 23 Jan 2010, 00:38
by trapster
Can you give an example of how to use?
When I send a file from my laptop to my server, I get a response that the file is available thru my browser or wget.

What do I need to do on my server to automatically receive the file?

Code: Select all

******************** FILESEND STARTED ********************

The file you are trying to send ("avatar_sm.jpg") is available via http at
the following local address (this computer):

            http://192.168.1.101:8099/avatar_sm.jpg

You can retrieve it on another LAN machine by typing the URL above
into your browser or by running

            wget http://192.168.1.101:8099/avatar_sm.jpg

in a terminal.

This program will close automatically once the file has been retrieved.
If you have second thoughts about sending/receiving the file, simply
exit this script by typing ctrl-c.

********************      WAITING      ********************

Posted: Sat 23 Jan 2010, 08:00
by vovchik
Dear trapster,

You started the script OK and that means the server is waiting to send the file. On the remote machine, either type that URL into a browser or run wget in a terminal using that same URL. I think what you really want is for that file to be placed on your remote machine automatically - without further intervention. At present, filesend doesn't do that. For that to work, there would have to be a daemon running on the receiving machine and filesend would have to be modified to send to a specific IP. I will look into that... It is possible to do that with netcat. My next mod will be adding the option to send complete directories.

With kind regards,
vovchik

Posted: Sat 23 Jan 2010, 13:25
by sc0ttman
vovchik wrote:My next mod will be adding the option to send complete directories.

With kind regards,
vovchik
I like the look of this - gets the job done simply.. I look forward to seeing how it may be improved...