Questions tagged [nc]

`nc` is the "network `cat`" program, connecting Unix pipe I/O to TCP and UDP sockets.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
649 views

Is there any way to send request via authenticated proxy in OpenBSD netcat (nc)?

I am using following command using the nc to connect to my server via proxy (localhost:8080). But this proxy is authenticated. I am not sure how to pass the auth details. Pls. note this is older ...
Simplecode's user avatar
2 votes
2 answers
3k views

How do I write a simple request/response tcp server using `nc`?

I’m trying to write a request/response TCP server to handle a small number of very simple commands. I'm using a shell script to be as portable as possible, avoiding compilation or requiring specific ...
Robert Elliot's user avatar
2 votes
0 answers
1k views

netcat -s switch does not work or do anything at all

I have a computer with a NIC with two ports and a switch between them, and I'm trying to send data from one port to the other using netcat. I thought I could simply specify the source address (i.e. ...
jangxx's user avatar
  • 129
2 votes
1 answer
2k views

How to decrypt Cryptcat (twofish) data?

I have some packets that are encrypted with Cryptcat tool and I want to decrypt them. I have the encryption password. I tried to use netcat with cryptcat, but every time I'm connecting from netcat to ...
Eslam Medhat Ezzat's user avatar
1 vote
0 answers
601 views

Basic webserver supporting post+get (using curl and netcat)

Sorry if the question's title isn't clear about the objective of this question. I was able to make a respond-only webserver using Bash only; when it gets a curl post request, it returns results no ...
Daniella Mesquita's user avatar
1 vote
0 answers
1k views

nc -lvnp (port) Non-responsive w/ PHP Reverse Shell til closed

I am currently working on Machine's on HackTheBox. I've used nc -lvnp (port) quite a bit and i've never ran into this issue: $nc -lvnp 4444 listening on [any] 4444 .... connect to [my IP] from (...
Adam Carson's user avatar
1 vote
0 answers
687 views

How to `nc -l 1234 | bash` but send response back to connecter

I have a basic netcat listener on my network that uses this command: nc -l 1234 | bash. This command runs everything it receives in nc into BASh. It works, however, only the listener can see the ...
anonymous's user avatar
  • 253
0 votes
1 answer
50 views

Redirect command options to a file

From the following nc command,i would like to redirect source-server.fqdn name to the output file. By default nc command is not returning the source-server.fqdn in the output. nc -zv -s source-server....
u512201's user avatar
0 votes
0 answers
32 views

Why do udp requests fail temporarily

I've a UDP web server, which bound to the port 10000. I just deployed it on the server 172.20.0.10. Then I tried to scan the port nc -v -z -w2 -u 172.20.0.10 10000, it seems that everyting is OK. The ...
Yves's user avatar
  • 3,301
0 votes
0 answers
77 views

finger daemon / nc fowarding error

For an assignment I'm trying to properly send a buffer overflow exploit with ncat in order gain root access on a vulnerable machine set up by the professor. I feel I created my egg right but I keep ...
Jacob ricondo's user avatar
0 votes
1 answer
73 views

Weird behaviour of bash in Kali Terminal (Qt I think) - piping to nc ends with awaiting input forever

I've been trying to pipe bytecode to netcat (nc) like this: python3 -c "import sys;bof='a'*16;bof2='a'*8;sys.stdout.buffer.write(bof.encode('ascii')+b'\xef\xbe\xad\xde'+bof2.encode('ascii')+b'\...
Sir Muffington's user avatar
0 votes
2 answers
792 views

netcat in systemd service resets

I am using netcat to connect to a server over TCP and continuously pipe the data received to file. nc 10.0.2.2 3456 > file.data When running this from terminal or a script it stays connected I want ...
abnsosl's user avatar
0 votes
0 answers
117 views

Userspace solution to use store data and create a UDP server

I'm trying to come up with a good way manage an intermittently connected device that I'm using for a research project. It's a sensor that goes in and out of the water. While under water, of course, ...
b degnan's user avatar
  • 111
0 votes
1 answer
120 views

Add reponse to the Listening port created with nc -l localhost <some port>

How can I setup a functionality to a listening port created using the nc -l command. I want my server to respond with a pass after connection
Arshpreet Singh's user avatar
0 votes
1 answer
1k views

netcat / nc / telnet perform math on received data then output

I am not an expert on bash so sorry in advance. For my high school CTF competition, I have to read in 3 numbers, perform some arithmetic on them, then output the value back to the server. In ...
Peter Stenger's user avatar
0 votes
1 answer
451 views

nc: run command upon connection

When doing CTFs, I often run nc -lnvp $PORT and do something else while waiting for a connection. I want to be alerted when said connection is established and I get a shell. Since nc is not terminated ...
ChocolateOverflow's user avatar
0 votes
1 answer
336 views

Can't ncat some ports after opening them in the router and with firewall-cmd

I want to open some ports, both UDP and TCP, on a Fedora 32 server. First, I've opened them on the router and then restarted the router: Then, I've opened them in firewalld: sudo firewall-cmd --...
tsorn's user avatar
  • 119
0 votes
0 answers
1k views

netcat is timing out before timeout has reached

I am trying to test a port on a remote machine. The connection is over satellite, so latency is quite high. I am testing with NC with the -w option to set the timeout. Ex: nc -w 300 address port ...
Dick's user avatar
  • 3
0 votes
1 answer
347 views

VPN Clients only can connect to other machines after ping

I have a weird problem. I have an OpenVPN server up and running. When my VPN clients (10.0.0.x) try to connect to another machines (192.168.0.x), they fail (I tried netcat, telnet and SIP). If I ...
doublezero's user avatar
0 votes
1 answer
734 views

How can a client talk to another client using unix domain sockets?

Using bash we might have something like this with netcat: nc -lk -U /my/fifo | while read line; do # line => {"client_id":123} done; clients send data like this: echo '{"client_id":123,"data":...
Alexander Mills's user avatar
-1 votes
1 answer
2k views

How to make nc listen for remote connections

I'm trying to listen for a remote connection but nc keeps giving me this error: Error: Couldn't setup listening socket (err=-3) This is the command I used: nc -lvnp port_number -s my_public_ip
Gamer Spirit's user avatar