nice bash trick - how to send data over the net only with bash interna
Quite some time ago I found a real cool bash trick in a forum, that I didn't know. And when it's written here, it will help you and it will help me to find it again (if I forget it
).
You can easily make a network connection and send data through it with this:
This will send data to thie ip 192.168.xxx.xxx to the port 1337 with tcp. I tested it with netcat and it works fine. Until I have seen this, I usually worked with netcat. But with this little trick, I don't need netcat on every machine I use to send data.

You can easily make a network connection and send data through it with this:
cat file.txt > /dev/tcp/192.168.xxx.xxx/1337
This will send data to thie ip 192.168.xxx.xxx to the port 1337 with tcp. I tested it with netcat and it works fine. Until I have seen this, I usually worked with netcat. But with this little trick, I don't need netcat on every machine I use to send data.
Trackbacks
The author does not allow comments to this entry
Comments
Display comments as Linear | Threaded