Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [netcat]

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.

1
vote
0answers
27 views

UDP with netcat on Mac OS

I try to connect to a Tello drone from my Mac by opening an UDP connection to 192.168.10.1 via port 8889 to send commands and receive ack's from the device. When using "Packet Sender" it works, but ...
0
votes
3answers
25 views

listening port with netcat not working

I am trying to listen to port 8080 using netcat. It was working fine, suddenly I an getting this. Any idea? root@kali:~# nc -vv -l -p 8080 retrying local 0.0.0.0:8080 : Address already in use ...
0
votes
0answers
19 views

why would a LAN transfer go slower when router is connected to network

Before I ask, I realize the different hardware might be at play but I did some other tests that make me think its not the hardware and I wanted to ask to see if maybe there is something else going on. ...
0
votes
3answers
932 views

Use netcat to tell a remote Mac to run/open a file

I have very limited (almost no) knowledge of how netcat works other than I've managed to get one Mac mini to listen on port 13370 [using nc -l 13370] (for TCP commands?) and I have a MacBook that has ...
0
votes
1answer
31 views

Apply jumphost's .bashrc to server during ssh from client?

With the following topology: +----------+ ssh -J +--------+ +--------------+ |clienthost| =========> |jumphost| ====> |restrictedhost| +----------+ +--------+ ...
0
votes
1answer
170 views

Corrupt .zip file after being downloaded by Netcat

I create a .zip file with WinRAR on my Windows, it can be opened and extracted on Linux as well as Windows if I transfer it via mail or any other common way. But when I transfer it via Netcat, the ...
0
votes
2answers
83 views

Receiving multiple files at once in Netcat without overwriting last file

1 machine listens(linux), while multiple clients(windows) send files to it on one and the same listening port. Netcat receives the files serially with the -k tag. Listening machine: nc -lp PORT -k ...
0
votes
0answers
73 views

Why is my TCP connection attempt via PHP acting weird?

I'm not sure if this is better here or on SO but since the issue isn't in the programming I figured it applies here (or on U&L or on serverfault, but I guess/hope I'm fine on here). I want to ...
2
votes
1answer
40 views

Shell pipes - the order of things

Because netcat on my box doesn't support -e, The netcat man page gives me this workaround: $ rm -f /tmp/f; mkfifo /tmp/f $ cat /tmp/f | /bin/sh -i 2>&1 | nc -l 127.0.0.1 1234 > /tmp/f I ...
2
votes
1answer
142 views

can't reach nginx port with netcat

I have this simple nginx config file: server { listen 4000; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html =404; } } nginx ...
0
votes
1answer
330 views

Use rsync with nc as transport layer

By default, rsync uses ssh as a transport layer. Unfortunately with fast local network, ssh is very slow. Is it possible use rsync with netcat / nc ? I have make some experiments, but it does not ...
0
votes
0answers
230 views

How to enable inbound connection on Windows 7 firewall for a program?

I have two computers on my network: one Linux machine and one Windows 7 machine. I run a nc -l 8888 on the Windows 7 machine and I run a nc -nv 8888 on my Linux machine to connect to my ...
0
votes
1answer
386 views

check multiple ports using netcat nc

I'm using the follow to wait till a port opens. while ! nc -z 127.0.0.1 8080; do sleep 0.1; done how can the above be modified to check multiple ports. So the script should stop only when all ports ...
0
votes
2answers
278 views

How to use nc to listen on a TCP port indefinitely?

I want to read the data arriving on a specific TCP port indefinitely and dump the data into a file. I have tried many different variations of nc but it is not working out for me. For the most part I ...
1
vote
1answer
473 views

Create HTTP proxy using netcat?

Is it possible to use nc as an HTTP proxy? I'm hoping to use nc on a VPS as an HTTP proxy and configure my browser to use the netcat server. Is this possible? A few results for googleing "netcat http ...
1
vote
1answer
778 views

How to make `nc` listen on a port without setting `SO_REUSEPORT`

I want to have a nc command listen on a TCP port so I did: nc -lv 8888 Then in another console I checked if another program trying to listen on the same port would get an Address already in use type ...
1
vote
0answers
190 views

unable to start a bind shell with ssl on ncat

Ncat: Version 7.10 i tried this with other version as well no luck. this is the cmd i gave to start listener. If I don't start the bind shell then this listener works without any issues and if i don'...
2
votes
4answers
3k views

How to send binary data in netcat to an already established connection?

I can do the following to send binary data in netcat: echo -e '\x80' | nc host port But I don't want to do it like this, what I want is to connect to a server: nc 192.168.1.115 12345 And then send ...
0
votes
1answer
3k views

Connection timed out for netcat after opening port in router

So, my situation is that I have one Windows PC and one PC with Kali Linux. On Windows PC I've opened a netcat listener on port 4444. Then on my router I've opened port 4444. Finally when I go on kali ...
0
votes
1answer
271 views

Get Netcat Output, Process and Input All In One Connection

Say I do nc example.com 1234 and it returns two numbers split by a newline, which I must add together and input back in to it. The numbers change if I close the connection, so how would I get the ...
0
votes
1answer
67 views

Unable to reach computer in same network

Assume two machines that connect to a wireless router (Archer C7 v2) and are part of the same LAN. Pinging machine A from machine B works, but ssh, telnet, netcat fail. Why? Details Machine A (...
0
votes
0answers
473 views

cygwin nc (netcat) scan ip range

I've seen several examples of scanning a IP range in Linux with netcat... I can not replicate any of this formats in Cygwin... nc -z 192.168.0.1/24 139 nc -z 192.168.0.1-254 139 nc -z 192.168.0.1-...
1
vote
2answers
33 views

Cannot make a TCP connection on private network

I am testing the local connection between two OS X computers using netcat. They are both connected to the same router (through wifi) and have the same public IP, so I believe they have access to the ...
0
votes
0answers
491 views

Use netcat to Convert UDP DNS Queries to TCP DNS Queries

I'm running Debian 9 on an isolated network and need DNS services to resolve external hostnames. (I'm sure some will wonder why I need to be able to resolve external hostnames if I'm on an insolated ...
1
vote
1answer
729 views

Reverse shell using netcat on windows (no -e option)

Is there any way to get a reverse shell in Windows using netcat without using -e option since it triggers UAC? I made it work from Linux to Linux by using a named pipe. I wanted to achieve something ...
0
votes
1answer
221 views

Linux netcat listener (nc -l) hung

On my Raspberry Pi 3 Terminal (Linux) I typed the following and hit Enter: printf 'HTTP/1.1 302 Moved\r\nLocation: https://www.eff.org/' | nc -l 2345 The Raspberry Pi 3 is part of my home network ...
0
votes
0answers
162 views

Are the GNU and netcat-traditional versions of netcat the same thing?

I have read that there are two versions of netcat: netcat-openbsd and netcat-traditional. I have also read that there is a version of netcat called GNU, but I think that the GNU version and the ...
0
votes
0answers
1k views

sending input to program using netcat on Windows in cmd

I have ncat on Windows, and typing the command ncat pwnable.kr 9000 in the command prompt results in an error libnsock select_loop(): nsock_loop error 10038: An operation was attempted on something ...
1
vote
0answers
4k views

What is the Windows equivalent of the command “nc [server_name] [port]”?

On linux, one can connect to a server by typing nc pwnable.kr 9000 on a terminal. On windows, this does not work in Powershell nor cmd, and also Putty when using Telnet looks at first like it ...
2
votes
2answers
2k views

Trouble with netcat over UDP

While troubleshooting the problem described here, I tried something really basic: I tried setting up a very basic netcat connection over UDP, and I noticed it's not working as I expect. As with the ...
1
vote
0answers
92 views

How to overwrite the destination file with netcat as opposed to appending?

I have two ubuntu servers and will be using a script (although I have not written it yet) on the sending server to send file abcd.txt whenever it changes using: nc 10.10.10.4 3333 < abcd.txt ...
0
votes
1answer
162 views

Why does piping commands into telnet result in intermittent connection failures?

As a cheap hack workaround on a number of servers that don't have the mail command, a script was written that echoes SMTP commands into a telnet session. The relevant part of the script looks like ...
3
votes
1answer
379 views

Port is locally opened but not detected by internet port checkers, something is wrong with port forwarding?

I have a Mac OS Sierra. I checked if the port is open locally using nmap -p 4444 localhost While listening to the same port using nc -l 4444 The result by nmap is that the port is open. I have ...
1
vote
1answer
89 views

Netcat receives only part of the file

I send the file with cat file1 | nc ip-address port and receive it with nc -l port > file2 and get the file cut. The size of the received file is 28467200 bytes (approx. 28M) out of approx. 150M. ...
2
votes
0answers
289 views

How to close netcat server after some data has arrived?

I am sending UDP data over the WLAN medium and using IPv6 Multicast. I am timing the sending using: time yes|cat /tmp/hello.txt | nc -6 -u -q 1 ff02::1%wlan1 30002 the client closes after a second ...
0
votes
0answers
25 views

While piping a command's output to other command, what if the other command exits?

nc -q -1 -lk -p 8080 < pipe | nc example.com 8080 > pipe This is the command I'm working on. It mostly works fine, but sometimes connection to example.com is reset due to lower signal etc. and ...
1
vote
0answers
125 views

Piping netcat multiple IP's

Is it possible to pipe Netcat with multiple IP's with a file that contains more than 1 IP address? Or the only way is to make a script that parses the file?
1
vote
0answers
97 views

image from androidphone via insecure adb to ubuntu pc fails via netcat (permission issue + broken pipe) - what is the reason?

I am using following tutorial to get an backup-image from my android phone (to recover lost pictures via photorec on ubuntu): https://www.packtpub.com/books/content/extracting-data-physically-dd I am ...
1
vote
1answer
86 views

Listening to all packets on a specific port

I'm using netcat -l 555 option to communicate between two computers on port 555, is there any way I can eavesdrop to whats going on in that conversation from a 3rd computer connected to the same WLAN ...
0
votes
0answers
232 views

Fastest method to automatically transfer large encrypted files over 40Gbit LAN?

Building on a couple of threads like this or this I am looking for the fastest way to regularly copy files in an encrypted fashion between two Linux computers. This has some special limitations which ...
1
vote
0answers
46 views

ncat only achieving 36kB/s

I'm experimenting with nmap's ncat on windows. I'm using on Host A: ncat.exe -v -l 9991 < my_big_test_file and on Host B: ncat.exe -v [HOST-A-IP] 9991 > test_dump where on Host A there is a ...
1
vote
0answers
138 views

Issues with ncat options -g -G -s --sctp

I am new to ncat and am having issues with few options: -g -G -s --sctp -g option ncat -g proxy-source-IP -v remote-IP 31337 From the source-IP to remote-IP it returns source-IP, and not proxy-...
4
votes
1answer
565 views

How to get an ssh socks proxy on demand?

I know ssh provides a SOCKS proxy with -D. I wonder if it's possible to start such a proxy on demand, the moment a connection is made to a specified port (using the likes of socat and nc under the ...
0
votes
1answer
974 views

Piping commands into a NetCat shell on a Windows machine from Linux?

I'm working on a research project, which involves remoting into a Windows machine from Linux via NetCat. The command to open up a listener is nc.exe -Ldp PORT -e cmd.exe And the command to connect ...
2
votes
2answers
3k views

Piping commands into nc

I've seemingly searched many very similar questions but never quite found something to work. I'm trying to use a raspberry pi (2nd gen) to communicate with a Wifi OBDII sensor. I'm able to use the ...
0
votes
0answers
495 views

How to compile netcat-openbsd for debian etch?

I tried: apt-get install netcat-openbsd apt-get source netcat-openbsd It complains: E: Couldn't find package netcat-openbsd E: Unable to find a source package for netcat-openbsd Then, I tried: ...
1
vote
0answers
976 views

FFMPEG receive stream from pipe via netcat fails

I am trying to receive a stream via netcat and pipe it to FFMPEG and then output to a file, but I am getting an error. The most basic command I tried was: $ nc -l -p 1935 | ffmpeg -v debug -y -f ...
1
vote
2answers
699 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 ...
0
votes
1answer
598 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
1answer
310 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 ...