Monday 23 June 2014

Copying a file when theres no means to do so on *nix

On the server...

perl -MIO::Socket::INET -ne 'BEGIN{$l=IO::Socket::INET->new(LocalPort=>1234,Proto=>"tcp",Listen=>5,ReuseAddr=>1);$l=$l->accept}print $l $_' < /etc/hosts

On the client...
cat < /dev/tcp/10.239.235.232/1234

No comments: