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
2answers
26 views

Tracking Bandwidth & Latency in Linux [on hold]

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 ...
1
vote
1answer
18 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 ...
1
vote
1answer
21 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
80 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
18 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
28 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
28 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
1answer
24 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
135 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
29 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
13 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
24 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 ...
0
votes
1answer
104 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 ...
0
votes
1answer
280 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
337 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
63 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
47 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
86 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
138 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 ...
0
votes
1answer
65 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
61 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 ...
1
vote
2answers
144 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
1answer
238 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
110 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 ...
0
votes
0answers
110 views

Creating a proxy with netcat

I'm trying to setup a permanent proxy server for one of my servers to reroute connections having issues. The proxy server is running Centos 7 x86 User -UDP or TCP-> Proxy -> Server I am am ...
0
votes
1answer
175 views

automatically start netcat on localhost and remote-host and keep it active

I found this answer by @jeremytrimble on Stack Overflow which explains how you can read a FIFO file over network. I wonder if it’s possible to start these netcat commands automatically, e.g. in a ...
0
votes
1answer
114 views

Bash - Parsing XML output of nmap

I am trying to write a bash script that will take port id I retrieve from an nmap command, and then use those ports to send a file using netcat. So I got some basic knowledge using this link, How can ...
0
votes
0answers
72 views

Give a command HTTP proxy auth access

I'd like to let a command (wsimport) access a URL through an HTTP proxy with authentication. It can be configured to use a proxy, but not with auth. I was wondering if a tool such as netcat, or any ...
0
votes
0answers
75 views

How to connect two debian VMs using vmware workstation so that one acts as a web server and the other as web client

I want to connect two virtual machines running using VMWare workstations - Debian Linux and I have setup private DNS server on one VM named "Server" and other VM is named "client". I am trying to ...
0
votes
1answer
25 views

OS X LoginHook - nc exits prematurely for no apparent reason

I'm trying to use loginhook to download large amounts of data and I've been having problems which I've nailed down to nc exiting prematurely for no apparent reason. This is a simplified test script: ...
0
votes
0answers
119 views

SImple server to run program and return result

I am attempting to create a minimal local listen server that takes an input request, pipes the input to a program and then returns the result of the command. What I have at the moment is the program ...
1
vote
1answer
52 views

Using netcat to connect to znc

I'm trying to send status updates to my IRC channel on irc.foo.com My limitations are.. The msg has to be sent to irc.foo.com from my ZNC account on znc.bar.com (znc is connected to irc.foo.com) ...
2
votes
0answers
20 views

Using DJB's tcpclient or tcpcat bidirectionally

Can someone post an example on how to use DJB's tcpclient bidirectionally? We need to read from Tor's ControlPort as well as write to Tor's ControlPort. A "file" that is open for both, reading and ...
7
votes
1answer
422 views

Multiple unix pipes not working

This first pipeline works fine (printing "c"): echo "a" | sed 's/a/b/' | sed 's/b/c/' This one does not do what I expect (nothing gets printed when I feed an "a" into my fifo ): mkfifo fifo; cat ...
0
votes
1answer
3k 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
67 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
1answer
457 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. ...
4
votes
0answers
116 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
853 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
330 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 ...
2
votes
1answer
6k 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, ...
2
votes
1answer
656 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 ...
18
votes
7answers
5k 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
1k 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
508 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
3k 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
189 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
420 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
1answer
347 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
58 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 ...