Pages

Saturday, July 19, 2014

tiny proxy in shell to receive on port and write on unix socket

$ mknod replypipe p; nc -k -lp 1234 < replypipe| nc -U /var/run/mysocket.sock > replypipe

* Make a FIFO file named replypipe


* listen on 1234


* pass the request to unix socket


* unix socket will reply to replypipe


* replypipe will write reply to the client




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/WrrIIU

No comments:

Post a Comment