Netcat is a simple but powerful utility program that reads and writes data across network connections, using TCP or UDP protocol, IPv4 or IPv6, with a variety of functions.

learn more… | top users | synonyms

1
vote
1answer
28 views

Using netcat to log traffic to a file

I currently have a Windows 10 laptop connected to a Ubuntu 12.04 Laptop via Ethernet. All of the traffic from the windows system has been routed to go through the Linux laptop and out the Linux ...
8
votes
1answer
10k views

Why is “nc -l xxxx” not opening a port?

I'm trying to get netcat to listen on port 4444, but it doesn't seem to be working. I am checking to see if the port is open using nmap, but it doesn't pick it up and I can't figure out why. I have ...
3
votes
3answers
12k views

Netcat/socat behavior with piping and UDP?

I guess this is close to linux - Netcat stops listening for UDP traffic - Super User, but I thought I'd better ask anyways As far as versions of netcat I'm using Ubuntu 11.04 and the default netcat ...
0
votes
0answers
68 views

Listen to TCP port but only accept connections from a specified IP in netcat

I can use the following command in netcat to listen to a TCP port: nc -l -p 12345 But any IP can connect to this port: Is there a way to only accept connections from a specified IP? Note that I ...
3
votes
1answer
3k views

Differences in nc (netcat) options on Ubuntu vs RedHat

nc -q -1 local host ${PORT} ${CMD} In Ubuntu, nc may be used as above, with the -q option. See manpage. -q after EOF on stdin, wait the specified number of seconds and then quit. If seconds is ...
0
votes
1answer
24 views

Use netcat to bridge thru firewall?

I have a machine behind a firewall. It's my machine, I have set up ssh, but it's completely firewalled. My solution has been to use a reverse shell set up on a cron basis to reconnect if it fails ...
15
votes
6answers
36k views

How can I pipe commands to a netcat that will stay alive?

echo command | netcat host port This results in the command being sent to the remote host and some data being read back. But after a few seconds, the connection closes. The -w parameter did not ...
0
votes
1answer
57 views

Setting up a SSL server that disconnects connections and executes commands

I am looking for suggestions on how to setup a simple SSL server that listens on a port and when a device connects, tell the device to disconnect, and then executes a command Context: The device is ...
0
votes
0answers
25 views

How to connect a vm to pc wth nc

I'm using a PC with Ubuntu Desktop and a VM (Virtual Box) with Ubuntu Server. I would connect my ubuntu desktop to VM with NC. How to I've setup my VM? My setting network of VM has bridge and with ...
0
votes
1answer
5 views

How would I do a GET and parameters requests in ncat using udp?

I'm trying to learn the difference between http and udp. So how would I request via udp: udp://server/path_name?param1=value1&param2=value2 Theoretically is that kind of thing possible or am I ...
0
votes
0answers
35 views

Port forwarding check on Comcast Router with netcat not working

I am very new to networking stuff, and I can't figure out why my port forwarding setup on my router is not working. Here is what I am using: Router: Standard provided by Comcast (I think it's Xfinity ...
0
votes
1answer
31 views

Save HTTP body with netcat

I can save the whole HTTP response from a server using netcat > output.txt, however this saves the HTTP response headers as well, if the body is text this isn't a problem as I can just ignore the ...
1
vote
1answer
2k views

netcat and tee redirection via a bash script

Quick question that has been haunting me all day.. I have a bash script that includes this line: nc -l 8044 | tee nc-output & The output from netcat is never being written to nc-output. If I ...
1
vote
1answer
2k views

Server: Microsoft-HTTPAPI/2.0 running on port 10234 on my Windows 7 pc?

I've recently set up a home server and spent some time working on the security. One of the tools I've been using nmap which I pointed at my Windows 7 desktop. It showed an unknown service on port ...
0
votes
1answer
31 views

netcat, nc, listen to several requests

I am trying to debug a network client. I just need to see several HTTP requests made in sequence. my first idea was o run nc -l 80, but it will keep open the socket after the first connection. Is ...
0
votes
2answers
91 views

Tracking Bandwidth & Latency in Linux [closed]

I'm trying to write a simple script that can detect dips in network traffic (both bandwidth and latency in both directions) between 2 arbitrary hosts in my network over time. Is there a tool to do ...
29
votes
3answers
24k views

Can the telnet or netcat clients communicate over SSL?

I would like to test client connections with IMAP over SSL, HTTPS, and other secure text-based Internet protocols over SSL/TLS, the same way I would using telnet or netcat if they were not tunneled ...
0
votes
1answer
42 views

netcat shell bind with mac (command -e not found)

I can successfuly use the command nc 192.168.. 5442 to connect to a listening device. The device listen using the: nc -lvp 5442. Everything works, I can send messages and receive some. I wanted to ...
2
votes
3answers
5k views

How to get the WAN IP from a router using UPnP/SSDP

I'm trying to find a way to get my router to report back my WAN IP using UPnP/SSDP, but so far I have been unable to even get a list of UPnP supporting internet access devices on my network. Here's ...
1
vote
1answer
74 views

Using netcat for a Minecraft server

I have started learning the cmd code. While I was learning I have discovered netcat and that with it, you can make servers. I tried making a server for Minecraft likes this but it didn't work. Here ...
1
vote
1answer
458 views

netcat - keep listening for connection in Debian

There's -k option in OS X (BSD) version of netcat to keep listening after current connection is completed. However in Debian (GNU?) version this option is missing. There's -q -1 option to listen ...
0
votes
1answer
42 views

Reboot Linux via netcat?

Put aside the security risks, I need a temporary way to reboot over a network without relying on SSH. My SSH server has some other issues that I need more time to resolve those so need a way to bypass ...
1
vote
2answers
36 views

How can I make a one-shot sshd process?

I'm trying to find some invocation of sshd (OpenSSH on Ubuntu) that accepts only one connection, and then terminates the sshd process when that one connection closes. I see nothing in the sshd docs ...
0
votes
0answers
47 views

How can I process traffic between 2 instances of NetCat?

I have an utility that make some data transformation between stdin and stdout in both directions (encode / decode), and I want to make a some kind of bi-directional proxy using two nc instances and ...
1
vote
2answers
2k views

How to wait for a response on the inbound side of the socket using NC command under BusyBox?

I am having problems using the Netcat that comes with BusyBox 1.1.3 to make an HTTP request and then receive the response. The NC command seems to quit out as soon as it reaches the end of the request ...
0
votes
2answers
336 views

Is it possible to push video out and usb over TCP/IP

I have a security camera system that is running Linux and is placed near the cameras (not in an office). It has a VGA out and uses a USB mouse. I'd love to redirect the VGA and USB to another ...
0
votes
1answer
415 views

netcat command is not working in bidirectional mode

I am using netcat in Linux to send and receive data (using udp protocol) from a serial port to another device through the network. The command is : nc -u 192.168.10.12 < /dev/ttyUSB0 > /dev/...
1
vote
1answer
28 views

Does NetCat Read all Incoming Connections?

Imagine I have a server. If I set up a JavaScript to use the HTTP POST, would I receive that data using a NetCat command listening on port 8000 (the default POST port, I think)? Or does NetCat only ...
2
votes
1answer
259 views

Network transfer speed very slow using nc (netcat) over Wi-fi LAN

Anybody could have a hint why my home Wi-fi transfer using nc is so slow? What I've got: 1) Xubuntu machine with Atheros: $ lspci | grep -i wireless 03:00.0 Network controller: Qualcomm Atheros ...
0
votes
1answer
58 views

writing the response of netcat to the text file

I have a script file which sends soap request to the remote server and it gives the response in the terminal . However I want this response from terminal to the text file so I can use it later. I ...
0
votes
0answers
14 views

how to redirect incomming connections in one interface to another?

trying to do a quick test of one service that is listening on one interface, let's say 10.0.0.1:123 and i want a device that can only reach that host on another interface, let's say 192.168.1.1, to ...
0
votes
1answer
36 views

Tried to NAT hole punch the router in a loop, why didn't it work?

Comments on this answer indicate, that the NAT is not consulted if the destination is in the same network. But what if the destination is the public IP of the router, not 192.168.x.x or similar? I ...
1
vote
1answer
146 views

How to upload a file to Windows through a netcat session?

I have a netcat session and I want to upload a binary to the target Windows machine. How can I do so? Is there a native wget in Windows?
4
votes
2answers
13k views

Linux built-in or open source program to join multicast group?

I'm using tcpdump to capture multicast packets and had to code up a custom program to join multicast feeds so tcpdump will "see" the packets. Just wondering if netcat or any other applications can ...
0
votes
1answer
192 views

How netcat can`t receive UDP packets?

I have a simple UDP device (ENC28J60 ) connected to my computer with a direct cable. The device configured to send UDP packet to 192.168.133.1 IP, 6661 port. The computer ,Fedora 22 OS, interface ...
13
votes
2answers
33k views

Netcat on Mac OS X

Is anybody else not able to get nc -lp 8888 working on Mac OS X? Is there another way to get this to work?
0
votes
1answer
427 views

Installing nmap and keeping it undetectable

I have a administrative computer fully equipped with antivirus (avg,norton,malbytes. etc) that I want to install ncat(nmap) on and keep it as close to undetectable as possible. How would I do this?
0
votes
1answer
702 views

Netcat connection closes after connecting through python

So I have installed Netcat on my raspberry pi and my mac and I can get them to connect really easily. Problem is that if I want a python script on my mac to establish the connection when the raspberry ...
1
vote
2answers
108 views

How do I interactively type \r\n-terminated query in netcat?

$ nc example.com 80 GET / HTTP/1.1 Host: example.com HTTP/1.1 200 OK ... It works, line separator is just 0A here instead of required 0D0A. How do I type a 0D0A-separated query in netcat? It is ...
0
votes
1answer
62 views

How to store data from different netcat connections in separate files?

I need a server that should receive data streams, store them in files and send further. Each connection should create a file with corresponding timestamp in file name, then write to it. My solution: ...
1
vote
0answers
117 views

nc and named pipes for port forwarding

I have my environment setup to listen to jetty on port 8888. However, for a limited time, I will have to also listen on 8889. I though of using named pipes and nc for that: mkinfo pipe1 /bin/nc -l ...
0
votes
1answer
265 views

How do I make netcat timeout nonsilently?

I'm trying to send some data to a server with a command like nc -w 3 IP_ADDRESS PORT < data where nc is the netcat from FreeBSD 5.4. When the server doesn't respond within 3 seconds I get no ...
1
vote
2answers
1k views

Cygwin netcat nc doesn't resolve hosts through /etc/hosts

I'm trying to use ssh to log into remote servers, and I have a ProxyCommand setup in ~/.ssh/config to use a proxy (setup through PuTTY to connect to a VPN). The ProxyCommand uses nc to connect ...
0
votes
1answer
128 views

How to netcat all the files in my directory?

I have a directory of files I'd like to netcat to another machine. For one, I use nc <ip> <port> < sample.fls But if I have a directory of sample1.fls sample2.fls sample3.fls ...
0
votes
0answers
73 views

netcat between mac and linux only working in one direction

I have two machines on the same local network. One is a Mac (192.168.42.74) and one is a Dell (192.168.42.75) running Kubuntu Linux. If I issue 'nc -l 12345' on the Mac and issue 'echo "blah" | nc ...
19
votes
7answers
8k views

How can I verify that a 1TB file transferred correctly?

I frequently transfer VM images from hypervisors to an archive server for long term storage. I transfer using netcat since it is faster than scp, rsync, ect.. hypervisor$ cat foo.box | nc <...
1
vote
2answers
228 views

How to keep the reverse shell open in Netcat?

As soon as the command prompt is closed on the target machine the reverse shell is closed on the client machine. Is there any way to keep the port open and Netcat working after the target machine ...
1
vote
2answers
778 views

How to set up a secure chat using netcat

I use netcat to chat in LAN. PC1 listen port 8080 $ nc -l -p 8080 PC2 connect to PC1:8080 $ nc 192.168.10.1 8080 Unfortunately, this is not secure. Anyone sniffing packets can intercept my ...
1
vote
1answer
346 views

how to make a batch file close automatically

I have a .bat file which its content is like this: @echo off nc x.x.x.x 23 < commands.txt exit in which nc is a .exe file in the same directory nc.exe known as NetCat. The commands.txt file ...
2
votes
1answer
138 views

Probing a port for RDP

I use an ssh tunnel to RDP into my home computer ("home"). Occasionally, the tunneling software running on home crashes and the RDP port stops getting tunneled. I've attempted to resolve this by ...