Now this is just the bees knees. C was trying to figure out how to transfer files between a read-only web server, and a router with no ftp, scp, &c. Turns out, what it does have is netcat. This nifty little munster will gobble up a file that’s been piped to it (cat filename | netcat -l -pport), and just hold on to the data until a remote connection asks for it.
On your remote system, just run netcat again, having this instance catch whatever the first netcat sends, and redirect it to a new file (netcat destination port > filename).
Send STDIN. Receive through STDOUT. Keep it up until there’s nothing left to send. No EOF required, just silence from the network side.
It can tunnel. UDP if you like. It has built in port scanning. You can encrypt using Cryptcat. &c. &c.