2
votes
1answer
135 views

cat file to udp, pt 2: send 1 udp packet per ^C-delimited line

Yesterday I asked a question about catting a file over a UDP socket in bash. The solution we came up was netcat -c -w 1 -v -u -s 127.0.0.1 239.255.0.1 30001 < test.txt. This worked in the sense ...
1
vote
1answer
1k views

How to put value of echo pipe netcat commands into variable [duplicate]

I have this command succession: echo -ne "/dev/shm/test.sh" | netcat 89.196.167.2 4567 and let's say it return a string like, for example "Hello...bla". (on the 89.196.167.2 i have made a server ...
2
votes
1answer
109 views

Log from TCP Port breaking messages on characters other than newline

I'm working on a set of scripts to monitor some external services that log to a TCP port. function handleMessage { while read message do # Handle $message done } nc -d $ipadd $port | ...
6
votes
2answers
4k views

/dev/tcp listen instead of nc listen

With a netcat listener like: nc -l <port> < ~/.bashrc I can grab my .bashrc on a new machine (doesn't have nc or LDAP) with: cat < /dev/tcp/<ip>/<port> > ~/.bashrc My ...
7
votes
3answers
3k views

Using in/out named pipes for a TCP connection

I've been fiddling with getting this to work for a while now, so I suspect some sort of fundamental misunderstanding about how pipes work is the root cause of my troubles. My goal is to initiate a ...
4
votes
2answers
316 views

is it possible to send the remote connector ip via netcat?

Actually I want to make something like ifconfig.me functionality but only for my internal network. I see it the way smth on server listens some port and send ip of connected remote machine. Seems nc ...