Tagged Questions
4
votes
2answers
1k 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 ...
2
votes
1answer
1k views
netcat in shell script giving invalid connection
I have a shell script that uses netcat to listen to localhost on port 1111 for web requests. Every time I try accessing localhost:1111/index.html for example I get:
invalid connection to [127.0.0.1] ...
4
votes
2answers
220 views
Why does this shell snippet to check if hosts are up using netcat stop prematurely?
Q: Why does the second iteration exits after 10.175.192.16? Can someone explain that? Or I just found a "while/netcat" bug?
a.txt's content:
$ cat a.txt
10.175.192.14
10.175.192.16
10.175.192.17
$
...
5
votes
2answers
1k views
Howto create a permanent client connection with netcat?
I'm writing a bash script that constantly read a folder in a loop to send data to a server at a defined time interval. I'm using netcat as the tool to connect to the server and send the data. My ...