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
2answers
1k 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? ...
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
254 views

Can I use dd to clone two drives from two machines simultaneously?

To clarify, I have two machines: Machine1 and Machine2. Each machine has 2 disks (Machine1 has Disk1-1 and Disk1-2; simiarly, Machine2 has Disk2-1 and Disk2-2). Can I use 'dd' to clone Disk1-1 to ...
1
vote
1answer
1k views

Netcat file transfer problem

I have two custom scripts I just wrote to facilitate transferring files between my VPS and my home server. They are both written in bash (short & sweet): To send: #!/bin/bash SENDFILE=$1 PORT=$2 ...
1
vote
0answers
112 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 ...
1
vote
1answer
147 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 ...
1
vote
1answer
57 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) ...
1
vote
0answers
211 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 ...
1
vote
0answers
320 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 ...
1
vote
1answer
191 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
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 ...
1
vote
0answers
4k 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 ...
1
vote
1answer
305 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 ...
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 ...
1
vote
1answer
864 views

Can I stop a netcat tar pipe and continue later without overriding existing files?

I'm trying to copy a lot of files from my NAS to my server, about 2TB. I found that using a netcat tar pipe to copy the directories goes pretty fast, about 40mb/s. It seems to work faster than rsync ...
1
vote
1answer
145 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?
1
vote
1answer
507 views

Simple secured SFTP tunnel?

I'd like to setup an sftp tunnel so that I can connect to an IP-secured SFTP server through a gateway computer from anywhere, and download the files to anywhere. I was thinking of using a combination ...
1
vote
1answer
1k views

Bash RTSP client with netcat - keep connection open while parsing sent data with sed?

I am trying to make a RTSP client in bash. Problem is that I must make only one connection to the server through which it will send video frames. I can keep it on one connection up to the point at ...
1
vote
2answers
211 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 ...
0
votes
1answer
113 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
2answers
4k 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 ...
0
votes
1answer
238 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
51 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
1answer
28 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
1answer
37 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 ...
0
votes
1answer
38 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 ...
0
votes
1answer
402 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
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, ...
0
votes
1answer
989 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 ...
0
votes
1answer
62 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 ...
0
votes
2answers
2k 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. "...
0
votes
2answers
332 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
146 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 ...
0
votes
2answers
2k 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 ...
0
votes
1answer
1k views

Can I use nc and/or stunnel to make a transparent SSL proxy such that I can specify the outgoing source port?

I've been playing around a bit with different variations and can't seem to find something that quite works. I want to be able to 'bridge' an SSL connection across a particular gateway node in the ...
0
votes
3answers
1k views

Using nc (netcat) to emulate NTP server response

I want to test some security on an NTP client developed in-house and would like to use netcat to do it. I have packets captured with Wireshark from previous NTP exchanges that I tried to feed to the ...
0
votes
1answer
672 views

How to purge connections left open by SSH ProxyCommand?

I have a webserver WWW1 and a front-facing proxy PRX. I use SSH ProxyCommand to connect to WWW1's internal IP (private IP) via PRX (private+public IP). For some connections (not all) I see a network ...
0
votes
2answers
2k views

nc or socat: How to read data from remote:/dev/ttyACM0?

I have a device running at a remote computer on /dev/ttyACM0 Now I want to read that data on my computer. I can connect to it over ssh. Unfortunately I am a nc/socat rookie and no howto covered this. ...
0
votes
1answer
11 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 ...
0
votes
0answers
19 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
28 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
26 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 ...
0
votes
2answers
74 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 ...
0
votes
0answers
43 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 ...
0
votes
1answer
52 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
35 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
174 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
638 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 ...