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

0
votes
1answer
63 views

Netcat error: Can't grab 0.0.0.0:80 with bind

When I tried to listen on port 80 in Windows 7 with netcat, I get this error: C:\Users\sashoalm>echo "hello, world" | netcat.exe -l -p 80 Can't grab 0.0.0.0:80 with bind On the other hand, ...
-3
votes
1answer
31 views

Quickest way to upload to a server?

I am looking for a way to upload a large file (1gb) to a server. So far I have used scp, nc and sftp. Initially I start with a nice upload speed of around 2 mbps, but this quickly slows down to around ...
0
votes
0answers
38 views

Netcat server output with multiple greps

I'm trying to send some data from my web browser to a txt file on another computer by visiting http://myserver.mydomain.tld:8080/?data=some_data_I_want_to_save. This works fine as a server: echo ...
0
votes
1answer
49 views

How to send message both to netcat and other script?

I'm trying to make some client-server interface. Think of it as one-on-one chat. What I want to achieve are two horizontal views. Bottom for my (server) input, top for client output and my input. ...
2
votes
0answers
35 views

DNS tunneling through an SSH connection looses connectivity

In the article 'UDP traffic through SSH tunnel', it is described how to tunnel DNS trough a SSH tunnel: client# ssh -N -L 6667:localhost:6667 user@server server# mkfifo /tmp/fifo server# nc -k -l ...
0
votes
1answer
203 views

Unable to transmit stream through OpenVPN tunnel

We are trying to transmit a video-stream via netcat from a OpenVPN server to a client. The server is a Raspberry Pi with Pidora running on it. The client is a Notebook with Ubuntu 12.04 and has a ...
1
vote
3answers
102 views

Quick way to scan for opened ports on local network according to a list

How can I quickly find out whether port 80 is open/listening on a server via a bash script? Normally on all workstations the daemon is running, but sometimes it fails. I use the following command to ...
1
vote
1answer
316 views

Listen to port continuously and dump data to file

I use this command to listen to port and dump data to file: while : ; do nc -l 0.0.0.0 10000 > log.txt & done First request works perfect, it's dumped in log.txt but after first request, ...
1
vote
1answer
116 views

Saving Live Video received through Netcat

I'm using the following command to stream a video which I receive through Netcat. nc -l -p 5001 | mplayer -fps 31 -cache 1024 - (On Windows CMD) This command opens the MPlayer and plays the live ...
13
votes
6answers
598 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
1answer
261 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
1answer
109 views

Why is Udcast is many times faster than Netcat?

I use Netcat once in a while to copy files or disk images over the network. While it does the job I always felt like it was always on the slow sluggy side regardless of using ssh, no ssh, compression ...
0
votes
2answers
280 views

Why is the '-e' option missing from netcat-openbsd?

Why is the -e option missing from the netcat-openbsd package? There is a netcat-traditional package but it has many features from the OpenBSD package missing. I am running Linux Mint 16. Does anyone ...
1
vote
0answers
63 views

Create duplex TCP tunnel in Windows with netcat

I need to create a TCP tunnel in Windows, I tried by chaining netcat: ncat -l 3333 | ncat 192.168.0.110 4015 This creates a single direction tunnel, though, as only the first netcat's STDOUT ...
0
votes
1answer
118 views

Netcat: Should I use Ctrl+C to close the connection?

I've opened netcat, and I'm entering things from the keyboard. When I've finished and I want to close the connection, should I just hit "Ctrl+C"? I want the connection to be closed "normally", but I ...
0
votes
0answers
124 views

pipe a serial port to a command that blocks? </dev/ttyACM0 nc -l 1234

For practical purposes I have only one shot at testing this, so I wonder how will </dev/ttyACM0 nc -k -l 1234 work when no client is connected. Will the kernel buffer all the serial data, will the ...
0
votes
0answers
96 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 > ...
0
votes
1answer
48 views

Is it possible to set up my own DNS for my computer?

I don't know if I ask the right question but I hope this situation would give you the whole picture. I have my PC which located at my apartment. As usual, I get access to Internet using service ...
1
vote
0answers
84 views

nc connection refused even on loopback

I'm working on an embedded linux system, which appears to be networked correctly and is running ssh (dropbear) and rpcbind. I'm setting up a server application on it, and every single thing I try ...
0
votes
1answer
130 views

Keep Process Running after Quitting NetCat

I am using NetCat on Windows 7 Professional to connect to my linux machine at home. I need to run a process and make it keep running after I close NetCat (Cmd Console). However when I close and then ...
0
votes
0answers
171 views

Netcat one-time message

I'm trying to use Netcat to debug a UDP listen server that I'm writing, and I'm surprised by the behaviour: $ echo -n Hello World | nc -v -u -6 localhost 12201 - Connection to localhost 12201 port ...
1
vote
1answer
210 views

X11Forwarding using SSH and Netcat

From my machine, I must connect through nodes A, B, and C, to reach target: localhost -> A -> B -> C -> target Machine A is configured to refuse X11 Forwarding, so I guess I shouldn't ...
1
vote
2answers
355 views

Why can't nc / netcat sniff http port traffic easily?

I'm NOT looking for advice such as "try wireshark." I'm trying to understand what netcat is and isn't. When I try to listen (-l) to port 80, it says "address already in use." Can netcat not listen to ...
1
vote
1answer
64 views

DDNS and NetCat

I'm messing around with netcat(windows) and i'm trying to configure netcat listening to external connections.My ISP provides me dynamic IP so i gotta find a way to have netcat connecting back to me no ...
1
vote
1answer
130 views

Netcat connection over dynamic IP

I was playing around with netcat on my lan , had PC1 configured as a netcat client and PC2 configured as a netcat server into a reverse netcat TCP connection.This whole reverse TCP connection works ...
1
vote
1answer
3k views

Can I pipe/redirect a console application through netcat so it can be used remotely?

Is it possible to 'pipe' an instance of a console application through netcat, so netcat is listening for a new connection and redirects the stdin and stdout over the network connection.
0
votes
2answers
539 views

How to send a binary message in TCP and store the response

I have to develop a client for a proprietary protocol and it would be very useful to be able to understand the behaviour of the existing server by sending it custom messages and look at the answer. ...
1
vote
2answers
276 views

netcat output into separate files using string delimiters

I want netcat to pipe the output of a tcp/ip connection to commands that examine the output and split it into distinct files separated by the strings "msg" and "/msg" from the output, something like ...
2
votes
3answers
175 views

Use xargs to send requests to the same server in parallel with netcat

I am trying to devise a one-liner to send text to a simple echo server - but multiple connections in parallel. This is what I'm trying: echo -e A,B,C,D | xargs -d, -i -P 4 echo {} | nc localhost ...
1
vote
1answer
132 views

Netcat stops when in a detached session

I want to use netcat to dump a number of blocks of strings to a file. I've been running this in my linux terminal and everything works very well until I try to detach my command line. If I run my ...
2
votes
1answer
147 views

ncat only works in certain scenarios

I tried using ncat (a “much-improved reimplementation of netcat”) to chat with a friend (and ultimately want to send a large file, but I know I can get that working once I get chat to work). We both ...
0
votes
2answers
187 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
2answers
367 views

List incoming connections on nc (netcat)

I set up nc on some computers in my office. They're connecting to our server like so: nc 192.168.1.2 3291 -e cmd Does anyone know how to list incoming connection attempts rather than accept one? ...
0
votes
0answers
737 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
2answers
430 views

ssh -R then expose the local port over HTTP?

Here's my scenario, I have two machines, A and B. A is behind a VPN, so B can't get to A. I have a web server: machine_a$ curl localhost:8088 "hello from machine_a" I have executed a remote SSH ...
1
vote
0answers
1k views

how to bypass this error : “port range not valid”?

I have a port number that I want to connect to it via net-cat. previously I was working with windows and it was working perfect; but now in Ubuntu when I want to run the Net-Cat it's show me this ...
0
votes
3answers
643 views

How to make netcat support ssl by combining openssl?

Original netcat doesn't support ssl. ncat from nmap project does. In linux, we can connect multiple commands with pipeline. Is it possible to combine netcat and openssl to create a ncat?
1
vote
2answers
909 views

How to download a URL from internet by netcat?

I can use netcat to transfer files between two computers. # Server nc -l -p 8080 < file # client nc 192.168.1.101 8080 > file Can I use netcat to download a URL from Internet like wget?
1
vote
1answer
71 views

Two hop SSH with multiple user names

I am trying to set up an ssh proxycommand, where the user name at the final host is different from the user name at the original host. I am logged in on firstHost as username and want to effectively ...
2
votes
1answer
2k views

Sending text file contents to server using netcat?

There is a daemon process listening on port 5144, which I cannot to modify. I want to use netcat to send the contents of a text file to the server, but this causes netcat to hang the terminal until I ...
1
vote
1answer
593 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
106 views

Knock on a port to get service and version

I'm having difficulty remmebering a certain command I would use in bash that would give information about a port it would 'knock' on. I've used ssh backdoors before so that I can access my home ...
1
vote
2answers
280 views

Nested Redirection in BASH

I have a scenario where I want to filter log files. To do this I am wanting to follow the last 10 lines or so of a log file and as new lines are read in, pipe them through an awk program and then ...
-2
votes
2answers
453 views

Meaning of “netcat can be used as a backdoor” [closed]

I recently read about netcat and it is often mentioned that it could be used as a "backdoor". What exactly is meant by backdoor? Could some one give an example of such usage of netcat.
2
votes
1answer
438 views

How to pipe the output of a linux command back into the predecesssing command

The linux command nc -l 8090 | (read METHOD URI PROTOCOL ; echo "method: $METHOD" ; echo "path: $URI" ; echo "prot: $PROTOCOL") listens to port 8090 and when I type something like ...
2
votes
2answers
915 views

Use netcat as a proxy to log traffic

I want to use netcat as a proxy to log http requests and responses to files, then tail these to inspect traffic. Think wireshark. Tried the following where 'fifo' is a named pipe, 'in' and 'out' are ...
2
votes
1answer
615 views

Unix bidirectional pipe on commandline

I've been able to use this linux command to connect Netcat to a serial port: nc -l 80 <> /dev/ttyS0 I would like to be able to log this transaction. My backup plan is to use Wireshark to ...
0
votes
1answer
430 views

TCP connection to my host's public IP address using Linux netcat

I need to make a TCP connection to my machine through an application that needs only the public IP address and port to connect. I have been able to do it in Windows, but I need to do it in Linux ...
4
votes
1answer
3k 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 ...
0
votes
2answers
605 views

How do I send and receive simultaneously with netcat?

I need to test a TCP server by connecting with netcat as a client sending a stream from /dev/random and at the same time pipe the output to /dev/null. Receiving: nc 127.0.0.1 3000 > /dev/null ...