2022 Developer Survey is open! Take survey.

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.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
23 views

netcat listener is not working

I have been using netcat on my kali and the listener is not working. I tested from another machine in the same network. I can do outbound connection from kali through netcat and it's working but ...
user avatar
  • 1
0 votes
0 answers
21 views

Protocol Mismatch ngrok & netcat

When I create a tcp tunnel with ngrok and I try to communicate with nc I receive a message saying "Protocol Mismatch" Explain Better: I use macOS 12.3. I launch ngrok tcp 9999 on a terminal ...
user avatar
1 vote
1 answer
137 views

Sending PJlink commands with netcat

I have a projector that I want to control over TCP using a protocol called "PJlink", but I can't manage to get it working. I'm currently trying to do this through Windows Terminal in WSL ...
user avatar
  • 13
1 vote
1 answer
86 views

Use netcat to send UDP packets out 1 ethernet port and into another on the same server

I am trying to sanity check a network device and want to use netcat to send upd traffic out a specific ethernet port (eth0 for example) and receive that packet on a different port on the same system (...
user avatar
  • 21
0 votes
0 answers
165 views

When sending email to Gmail address from netcat or openssl s_client, why do I get "Username and Password not accepted", despite correct credentials

My goal was to send an email to a gmail address, like beta@gmail.com from a commandline tool such as netcat or telnet etc. WHAT I TRIED: I first tried netcat. nc -C smtp.gmail.com 587 220 smtp.gmail....
user avatar
  • 163
0 votes
0 answers
31 views

Pipe input into a process running on a port

I startet a process with socat: socat tcp-listen:port,reuseaddr,fork, exec:"./program" Now I can connect to the program with netcat: nc ip port. It will start the program and expects the ...
user avatar
  • 1
0 votes
0 answers
27 views

Cannot Connect to Raspberry Pi Netcat Listener With Public IP

So I have my Raspberry Pi running a netcat listener but I can't connect to it with other pc running netcat with the pi's Public IP. I want to connect to it from any pc but it refuses to connect. I've ...
user avatar
-1 votes
1 answer
103 views

Is it possible to make Netcat behave exactly like Telnet?

Is it possible to make Netcat behave exactly like Telnet? The "-t" option doesn't seem to quite do it.
user avatar
  • 111
1 vote
0 answers
109 views

Simulate "Enter" keypress after successfully making connection using Netcat on Raspberry Pi

I have an issue with using Netcat on Raspberry Pi terminal to output data after making a connection. The issue is that when I run this command, after it is succeeded, 5 seconds pass, and the ...
user avatar
  • 11
0 votes
1 answer
43 views

Trying to start nc listener via torify?

Trying to start nc listener via torify: torify nc -lvnp 4444 get response: local listen fuxored: Operation not permitted I then tried to add: -q -1 and got same response?
user avatar
0 votes
1 answer
74 views

nc Won't Listen on a Port on CentOs6

I'm playing with nc for the file transfer function. On a CentOS6 machine, If I put nc on the listening mode, it returns a help message instead. It seems nc with older visions needs different ...
user avatar
  • 125
1 vote
0 answers
43 views

how to do netcat in a terminal

i have a program that is like a terminal that i want always on, how do i put it in a port through netcat so when i connect to that port i can write in the terminal and when i exit, the program doesn't ...
user avatar
  • 11
0 votes
0 answers
69 views

Netcat or similar: Dockerized general purpose TCP/IP port proxy/gateway (for any service: mysql, ssh, dns, etc)

Context We manage a radio station with 35+ workplaces for journalists. All them using a desktop application, connecting to a MySQL exposing 3306 at some internal IP address. There are also other ...
user avatar
0 votes
1 answer
355 views

difference between nc and telnet using smtp service as an example

I can use both nc and telnet to connect to port 25. $ nc 192.168.1.120 25 220 localhost ESMTP Exim 4.68 Tue, 29 Dec 2020 06:07:27 +0000 $ telnet 192.168.1.120 25 Trying 192.168.1.120... Connected to ...
user avatar
0 votes
1 answer
313 views

Redirect arecord output and send it with netcat

I am trying to redirect sound from a microphone from one computer to another in my local network. I did following to achieve that In one terminal: arecord -t raw -c 2 -f S16_LE -r 48000 | nc -u #...
user avatar
  • 205
0 votes
1 answer
191 views

How to netcat to multiple ports

I'am using a raspberry and i need 2 local streams. This is what i've tried: Attempt raspivid <some options> -o - | tee nc localhost 5100 | nc localhost 5000 Question I can receive the output on ...
user avatar
  • 103
0 votes
1 answer
119 views

monitor PID and respawn processes in bash script (simulatord, nc, ping)

For a student environment, I have a simple bash script that runs upon boot up on Ubuntu 18.04 (@reboot in crontab -e). It runs ok (java file starts, netcat starts, pings, and all PIDs are viewable via ...
user avatar
  • 141
1 vote
1 answer
93 views

Connection refused, but port is open

My Idea was to make netcat-Connection between two devices in different LAN; Now I looked in settings of WiFi-Router and created a port forwarding; port 4004 of router should now be able to connect me ...
user avatar
  • 21
0 votes
1 answer
938 views

Bypass Linux password login with netcat or ssh or telnet

How can you bypass a password login with nc or ssh? I type 'nc IP-address 13880' and it gives me the login form I need to bypass. Can anyone give me any tips?
user avatar
  • 123
0 votes
1 answer
3k views

Use netcat to listen on a port and send output from a command when a client connects

I have a Raspberry Pi (Debian Linux) connected to my LAN that can read data from some connected devices and output it to STDOUT. Let's say the program is run on "Server" and I want to serve the ...
user avatar
2 votes
0 answers
216 views

How to transfer files between two hosts through a bastion using netcat and pigz

I have to regularly transfer the contents of folders containing a lot of small files with a volume of around 10GB from one server to another. Before I used the command bellow which did the job very ...
user avatar
  • 21
0 votes
2 answers
612 views

Scan open port with netcat

I'm just wrapping my head around the utility netcat. So for test purpose I install Apache on my Linux OS and verified Apache runs by accessing the localhost url in my browser. I want to test if the ...
user avatar
  • 101
0 votes
1 answer
1k views

linux nc (netcat) UDP Connection refused

I faced with some strange nc behavior. It works well with TCP when on one host I do: nc -tlp 31337 and on the other one: nc 14.0.0.1 31337 So there can be some data exchange. But when I do: nc -...
user avatar
  • 127
0 votes
1 answer
58 views

Netcat listening on Debian Security advice please nc -(dknl)

I would be very grateful for some help: This is with regards to a Netcat based script running on a Debian based distribution, specifically the Proxmox hypervisor (see here if unknown https://en....
user avatar
1 vote
1 answer
380 views

SSH'ing through a proxy with CentOS 8

I'm using CentOS 8, and I'm trying to SSH from behind a firewall through a (HTTP but also somehow SOCKS) proxy. I've read this answer, which suggests using nc -X - but my nc doesn't support that. I'...
user avatar
  • 7,312
3 votes
1 answer
659 views

Install both gnu-netcat and openbsd-netcat simultaneously on Arch Linux

They are in conflict when I try to install them conveniently. How can I have both of them at the same time?
user avatar
  • 134
0 votes
1 answer
172 views

Receive UDP packets from multiple broadcast servers

I have two sensors which broadcast their data using UDP. I configured them to use different ports. If I connect only one sensor, I receive the packets using nc -ul port without any trouble. If I ...
user avatar
3 votes
1 answer
704 views

What's the alternative to "nc -l" for HTTPS?

You can run netcat in the "listen" mode: nc -l 8080 This will listen on localhost:8080, dump everything that comes in to stdout and reply with data from netcat's stdin. This is useful for a quick ...
user avatar
  • 462
0 votes
0 answers
486 views

Netcat/nc messages not send/received on either computer

I have two computers (both running Ubuntu) in the same network. They are able to ping each other successfully. Their IPs are: Computer 1: 172.16.10.59 Computer 2: 172.16.10.72 The following works: ...
user avatar
  • 1
26 votes
1 answer
23k views

What is the difference between telnet and netcat?

I am looking for an explanation where I can find the difference between telnet and netcat. In which cases should I use telnet and netcat? What a telnet can do that netcat can not do and vice versa? I ...
user avatar
  • 361
0 votes
2 answers
1k views

Scanning streamed data with clamav

I am trying to come up with a command with which I can scan a file by streaming it via network interface. I have tried the following: telnet clamd.server.com 3310 STREAM PORT <some random ...
user avatar
  • 153
2 votes
2 answers
2k views

Is NetCat command dangerous?

I'm s server-side developer and used to invoke the nc command to check whether a remote port is open. Suddenly, the security guy prohibited the command and as soon as I use the nc command my ...
user avatar
  • 316
0 votes
1 answer
531 views

Netcat as a inetd service on port 1815 and redirect incomming to /dev/ttyS2

I'm trying to let my Debian 7 system to listen on port 1815 with netcat and redirect the incoming traffic to a VacuumFluorecentDisplay. Iptables are open and I'm using inetd instead of xinetd(came ...
user avatar
  • 1
1 vote
0 answers
1k views

Why does this netcat pipeline work in macOS but not Linux?

I set up the following pipeline. This allows me to see the raw HTTP requests and responses that pass through the pipeline. Note: I use BSD nc below (this is what comes with macOS and AmazonLinux), ...
user avatar
0 votes
0 answers
165 views

Pipe netcat response to php post form

I'm trying to get a one-line command that pipes all messages on a port to a php script. I can't use a netcat proxy, as the receiving end is webserver-only. Basically, I have the idea of doing ...
user avatar
0 votes
0 answers
242 views

My Raspberry Pi can’t detect or connect to open ports made by Netcat with my Debian virtual machine

I want to establish a connection over a network protocol like TCP/UDP using Netcat with my Debian virtual machine (using VirtualBox) as the host while my Raspberry Pi connects to the virtual machine. ...
user avatar
1 vote
0 answers
416 views

How do I stream UDP raspivid over ipv6 from raspberry pi to my debian virtual machine mplayer

I can stream UDP raspivid to my host machine fine using ipv4 but my project needs to be able to stream over ipv6. I tested my ipv6 connection via netcat-openbsd and I've confirmed my debian host ...
user avatar
2 votes
1 answer
3k 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 ...
user avatar
0 votes
3 answers
6k 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 ...
user avatar
  • 103
0 votes
0 answers
70 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. ...
user avatar
0 votes
3 answers
5k 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 ...
user avatar
0 votes
1 answer
322 views

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

With the following topology: +----------+ ssh -J +--------+ +--------------+ |clienthost| =========> |jumphost| ====> |restrictedhost| +----------+ +--------+ ...
user avatar
0 votes
1 answer
1k 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 zip ...
user avatar
  • 227
0 votes
2 answers
2k 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 ...
user avatar
  • 227
0 votes
0 answers
219 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 ...
user avatar
  • 2,267
2 votes
1 answer
159 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 ...
user avatar
1 vote
1 answer
712 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 ...
user avatar
4 votes
2 answers
3k 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 ...
user avatar
  • 339
0 votes
0 answers
911 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 ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar