Linux/netcat: Difference between revisions

From Wiki
No edit summary
No edit summary
Line 16: Line 16:
</pre>
</pre>


== proxy ==
<pre>
nc -l 7496 0<pipe | nc 192.168.111.20 7496 1>pipe
tcpflow -p -i eth0 -c port 7496
nc -l 7496 < pipe | tee outgoing.log | nc 192.168.111.20 7496 | tee pipe incoming.log
</pre>


== clone hdd ==
== clone hdd ==

Revision as of 13:57, 14 November 2012


chat

nc <ip> <port>
netcat -l -p <port>

serve file

netcat -l -p <port> < file

proxy

nc -l 7496 0<pipe | nc 192.168.111.20 7496 1>pipe
tcpflow -p -i eth0 -c port 7496

nc -l 7496 < pipe | tee outgoing.log | nc 192.168.111.20 7496 | tee pipe incoming.log

clone hdd

netcat -l -p <port> | dd of=/dev/sdb
dd if=/dev/sdb | nc <ip> <port>