Questions tagged [netcat]

Netcat is a featured networking utility which reads and writes data across network connections, using the TCP/IP protocol.

features:

  • Outbound and inbound connections, TCP or UDP, to or from any ports.
  • Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel.
  • Built-in port-scanning capabilities, with randomizer.
  • Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data.
  • Optional RFC854 telnet codes parser and responder.
186 questions
2
votes
2 answers

Pipe directly to Logstash?

I would like my log data for servers such as Nginx to go directly to Logstash over a network. Logstash has TCP and UDP socket handlers built-in that would be perfect for receiving the data, but sending it is a problem. I know that there is the…
Brad
  • 1,419
  • 22
  • 43
2
votes
1 answer

netcat closes established connection between docker containers

I am on coreos and have started three containers. docker run --rm -ti -p 80 --name one ubuntu /bin/bash docker run --rm --link one:one -p $HOST_IP::80 -ti --name two ubuntu /bin/bash docker run --rm -ti -p 80 --name three ubuntu /bin/bash $ docker…
xh3b4sd
  • 348
  • 4
  • 10
2
votes
3 answers

Can't pipe echo to netcat?

I have the following command: echo 'HTTP/1.1 200 OK\r\n' | nc -l -p 8000 -c and when I curl localhost:8000 I am not seeing HTTP/1.1 200 .. being printed. I am on mac os x with netcat 0.7.1 Any ideas? #!/bin/bash trap 'my_exit; exit' SIGINT…
Tinker
  • 171
  • 1
  • 1
  • 5
2
votes
2 answers

How to execute a reverse "Powershell shell" using ncat or netcat?

I am using ncat to execute a reverse "cmd" shell from one machine to another and without any issues using the commands: In my machine: ncat -l 443 In the remote machine: ncat 443 -e cmd And all works flawlessly, however, I would…
samsam
  • 29
  • 1
  • 1
  • 3
2
votes
0 answers

Postfix mailbox_command + netcat + nodejs

I use Node.js script to process incoming emails and pipe them from Postfix via netcat in mailbox_command (namely: nc 127.0.0.1 3002). Node is listening on port 3002 and calls socket.destroy() once email is processed. However, it seems that postfix…
2
votes
1 answer

Resend the same file simultaneously with netcat in listening mode

I want to set up netcat in listening mode so that many clients can connect and they all receive the same file. The clients should be able to connect simultaneously... Is this possible?
Zabuzzman
  • 733
  • 10
  • 25
2
votes
1 answer

How do telnet-based programs report their terminal type to a socket server?

I've written a script called by tcpserver that heavily utilizes tput and similar commands. These commands need to know how to correctly write to the terminal and rely on the TERM variable to obtain this information. Right now the TERM variable is…
2
votes
2 answers

Using nc.exe (NetCat) to send emails to secured SMTP server (TLS)

I used to send emails to unsecured SMTP servers using nc.exe utility (Windows port of NetCat) and now I need to send the same emails to a secured SMTP server (TLS). What additional parameters do I need to specify in nc.exe or body of the email…
kirill_l
  • 237
  • 3
  • 11
2
votes
1 answer

Netconsole not working

I've gotten netconsole setup on a server that's been having a variety of kernel panics lately and I'm trying to log kernel messages to another server. I've tested netconsole after setting it up on the host server by start a netcat session and typing…
Striketh
  • 21
  • 1
  • 3
2
votes
3 answers

What is Juniper's equivalent to netcat/nc command?

On Linux there is a nice tool for testing connections, bandwidth, opening temp. connections etc: nc What is equivalent on Juniper firewalls?
Alex
  • 1,828
  • 4
  • 31
  • 52
2
votes
1 answer

quick check of open port

The following is working as expected. (do not want to use nmap) I need to use nc (or any other built-in centOS) command in shell script to check the port 6379 of a remote server. I want the script to exit quickly if no response received in less than…
shantanuo
  • 3,579
  • 8
  • 49
  • 66
2
votes
2 answers

Netcat, Syslog, UDP, and <134>

Listening with netcat on UDP 514 to syslog data I see that each sent log message is separated by <134>. Does anyone note what <134> is?
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
2
votes
1 answer

Netcat / nc on ec2... public/private address?

I'm trying to use nc to debug some network issues (but am sort of ending up debugging nc itself). I have the relevant port open (to the world) in the ec2 security group. When I run either of these commands on my ec2 server: nc -n -v -v -l
denishaskin
  • 273
  • 2
  • 10
2
votes
1 answer

Can I use netcat as a lightweight web-server that will save post data as a file?

I know that netcat can be used as a lightweight web-server to host a file, but I want to also have any post data saved to a separate file. Is this possible with netcat? What's the lightest way I can do something like this, preferably in os x. Thanks
Steven Noble
  • 383
  • 1
  • 2
  • 12
2
votes
2 answers

Measuring network throughput with netcat vs. CIFS/SMB transfer rates

I have been attempting to measure and benchmark our LAN's throughput as part of a larger project. Our LAN is constructed using cat5e and HP ProCurve 1800-24G switches which support 10/100/1000 Mbps auto-sensing. The physical topology is rather…
user62491