Sending files using netcat
There are plenty of articles about this already, but I couldn't find anyone who wrote a script to automate this simple task of transferring files using just netcat.
Run it and it will give you a command to run/copy-paste on the remote side/pass to the person who wants the file. It uses pv as a nice progress indicator, and the script assumes pv is available on both sending and receiving ends. But that's good, everyone should have pv installed on his/her machine.
I'd just include the code in this little article, but Serendipity would screw up the layout completely, so instead you can download it here.
CODE:
wilmer@ruby:~/src/bitlbee/devel$ ncsend.sh /audio/03\ Tree\ of\ Life.mp3
nc 87.198.255.202 6886 | pv > 03\ Tree\ of\ Life.mp3
nc 87.198.255.202 6886 | pv > 03\ Tree\ of\ Life.mp3
Run it and it will give you a command to run/copy-paste on the remote side/pass to the person who wants the file. It uses pv as a nice progress indicator, and the script assumes pv is available on both sending and receiving ends. But that's good, everyone should have pv installed on his/her machine.
I'd just include the code in this little article, but Serendipity would screw up the layout completely, so instead you can download it here.
Comments
Display comments as Linear | Threaded