Questions tagged [netcat]

netcat is a command for performing read/write operations on TCP or UDP network connections.

From the official GNU netcat project page:

It is designed to be a reliable "back-end" tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.

It provides access to the following main features:

  • Outbound and inbound connections, TCP or UDP, to or from any ports.
  • Featured tunneling mode which allows also special tunneling such as UDP to TCP, with the possibility of specifying all network parameters (source port/interface, listening port/interface, and the remote host allowed to connect to the tunnel.
  • Built-in port-scanning capabilities, with randomizer.
  • Advanced usage options, such as buffered send-mode (one line every N seconds), and hexdump (to stderr or to a specified file) of trasmitted and received data.
  • Optional RFC854 telnet codes parser and responder.

SANS has produced a netcat cheat sheet (PDF) with various tips on usage.

911 questions
-1
votes
1 answer

Is possible with nc or telnet affect a socket

I have a conceptual question. If I have a Java socket (this socket stablish a TCP connection by a channel) If I run a nc command, the nc command open a tcp connection, then the nc can affect my socket The same question with telnet, is possible that…
user2291499
  • 21
  • 1
  • 5
-1
votes
1 answer

Send command to "plink.exe" without using input file

I have the following command line that I use in a batch file: C:\my_folder\plink.exe 192.168.0.112 -P 6950 -raw -batch < C:\my_folder\string.txt > C:\my_folder\output.txt string.txt contains the string: GET VALUE The command line…
GavinD
  • 25
  • 8
-1
votes
1 answer

Can I have 3 GBit/s between computers through a cheap router?

I made tests with iperf, iperf3, ssh + pv + /dev/zero, copying files, and netcat (nc). Most of the tests are showing 940 Mbit/s, like expected, including netcat. But when I saw that actually for some of these tools, the cpu was a bottleneck, I moved…
NicuMarasoiu
  • 776
  • 9
  • 25
-1
votes
1 answer

error response for the PUT request in android app

I'm developing an Android app that supposed to send PUT request to local server and when I try the same request using curl, I get success response, but from the Android app I get error with PUT request, here is the request for both from mobile app…
-1
votes
1 answer

unable to connect to windows netcat listener

I set a netcat listener on my windows 7 machine nc -nvlp 4444 Then I try to connect to it via kali linux: nc -nv 4444 I get a connection refused. However, if I connect locally from the windows machine to the port I get a…
NoAitch
  • 21
  • 1
  • 2
-1
votes
2 answers

How do I change a listening rule with netcat?

I have a server that has a rule like so when I check netstat -tulpn: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN …
neogeek23
  • 813
  • 1
  • 12
  • 23
-1
votes
1 answer

Can't get message sent by a client over TCP

I wrote a client in C\C++ and sent a message to my local machine which is listening using nc -l -p 6666. After sending the message, nothing was caught with nc on my local host. I suppose the problem is in my code but I am not sure what line. …
E235
  • 11,560
  • 24
  • 91
  • 141
-1
votes
1 answer

How to make netcat receive packet many times?

On netcat server nc -lu 80 >> test.out On netcat client, send UDP packet echo -n foo | nc -u -w 1 {server_IP} 80 Repeat step 2 again, but I see netcat client cli hangs there... Without closing netcat server, I expect it can receive 5 UDP packets…
Abby Wu
  • 51
  • 7
-1
votes
1 answer

SSH to remote server using identity key in another

I am in server A.I want to ssh to server C via B. I have access to 1.ssh directly to B using identity keys. 2.B needs to generate a key using which it can access C. I need a command to login to C from A , to include the key generation in B and using…
-1
votes
2 answers

Netstat in Fedora doesn't list simple netcat server, Ubuntu does

I'm opening a simple TCP server with netcat: $ netcat -l -p 1234 Then I want to check if it's listed among the listening tcp connections by netstat: $ netstat -lt If I issue the previous commands on an Ubuntu system $ uname -v #65~14.04.1-Ubuntu…
swahnee
  • 2,661
  • 2
  • 24
  • 34
-1
votes
1 answer

Sending a string to an IP in Python

What's the equivalent, in Python of: echo 'blah' | netcat 123.123.123.123 6666 I found this answer but I can imagine there is a simpler way, isn't there one?
Basj
  • 41,386
  • 99
  • 383
  • 673
-1
votes
2 answers

How do I check if a program is running in bash?

I have made a chat-script in bash and I want to check whether or not netcat is running. I've tried pgrep but and it's working but it prints out an error in the terminal but it still keeps going like normal. This is a part of that script: function…
NanoCoder
  • 35
  • 1
  • 6
-1
votes
1 answer

HTML formatted email using netcat bash shell script

how to send html format with color text emil with netcat i don't need send mail method just want to using netcat and how to add the head properly i create a script to send mail with color text ,this script send only the email with html tags not with…
-1
votes
1 answer

Perl script making call to itself (through nc -e) is failing. Claiming no such file/dir

We have been asked to set up a backdoor in a victim machine for a homework assignment. I've gained access to the machine and I want to have the following script run on a cron, but it's throwing an error. I've verified that the @ARGV test works…
Dan
  • 3,246
  • 1
  • 32
  • 52
-1
votes
1 answer

Find C++ small netcat

I need some stand-alone implementation of netcat.. the problem is netcat needs to add 1000 libs.. i need one small netcat in a single file to change and implement new things.. Someone know a simple-netcat?
Lefsler
  • 1,738
  • 6
  • 26
  • 46
1 2 3
60
61