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.

learn more… | top users | synonyms

0
votes
3answers
846 views

How to make netcat support ssl by combining openssl?

Original netcat doesn't support ssl. ncat from nmap project does. In linux, we can connect multiple commands with pipeline. Is it possible to combine netcat and openssl to create a ncat?
1
vote
2answers
1k views

How to download a URL from internet by netcat?

I can use netcat to transfer files between two computers. # Server nc -l -p 8080 < file # client nc 192.168.1.101 8080 > file Can I use netcat to download a URL from Internet like wget?
1
vote
1answer
101 views

Two hop SSH with multiple user names

I am trying to set up an ssh proxycommand, where the user name at the final host is different from the user name at the original host. I am logged in on firstHost as username and want to effectively ...
1
vote
1answer
792 views

Cygwin netcat nc doesn't resolve hosts through /etc/hosts

I'm trying to use ssh to log into remote servers, and I have a ProxyCommand setup in ~/.ssh/config to use a proxy (setup through PuTTY to connect to a VPN). The ProxyCommand uses nc to connect ...
1
vote
1answer
817 views

Bash RTSP client with netcat - keep connection open while parsing sent data with sed?

I am trying to make a RTSP client in bash. Problem is that I must make only one connection to the server through which it will send video frames. I can keep it on one connection up to the point at ...
0
votes
1answer
115 views

Knock on a port to get service and version

I'm having difficulty remmebering a certain command I would use in bash that would give information about a port it would 'knock' on. I've used ssh backdoors before so that I can access my home ...
1
vote
2answers
355 views

Nested Redirection in BASH

I have a scenario where I want to filter log files. To do this I am wanting to follow the last 10 lines or so of a log file and as new lines are read in, pipe them through an awk program and then ...
-2
votes
2answers
524 views

Meaning of “netcat can be used as a backdoor” [closed]

I recently read about netcat and it is often mentioned that it could be used as a "backdoor". What exactly is meant by backdoor? Could some one give an example of such usage of netcat.
2
votes
1answer
560 views

How to pipe the output of a linux command back into the predecesssing command

The linux command nc -l 8090 | (read METHOD URI PROTOCOL ; echo "method: $METHOD" ; echo "path: $URI" ; echo "prot: $PROTOCOL") listens to port 8090 and when I type something like ...
2
votes
1answer
722 views

Unix bidirectional pipe on commandline

I've been able to use this linux command to connect Netcat to a serial port: nc -l 80 <> /dev/ttyS0 I would like to be able to log this transaction. My backup plan is to use Wireshark to ...
0
votes
3answers
1k views

Using nc (netcat) to emulate NTP server response

I want to test some security on an NTP client developed in-house and would like to use netcat to do it. I have packets captured with Wireshark from previous NTP exchanges that I tried to feed to the ...
0
votes
3answers
1k views

How do I make netcat receive UDP packets from any host?

Is there a way to make netcat receive UDP packets from any ip:port? I don't want it to bind to a specific host as the first packet comes. I can consider alternatives, but they have to be bash ...
0
votes
1answer
508 views

TCP connection to my host's public IP address using Linux netcat

I need to make a TCP connection to my machine through an application that needs only the public IP address and port to connect. I have been able to do it in Windows, but I need to do it in Linux ...
0
votes
2answers
784 views

How do I send and receive simultaneously with netcat?

I need to test a TCP server by connecting with netcat as a client sending a stream from /dev/random and at the same time pipe the output to /dev/null. Receiving: nc 127.0.0.1 3000 > /dev/null ...
0
votes
1answer
1k views

netcat and tee redirection via a bash script

Quick question that has been haunting me all day.. I have a bash script that includes this line: nc -l 8044 | tee nc-output & The output from netcat is never being written to nc-output. If I ...
8
votes
1answer
3k views

How can I force netcat to send my input immediately, not just on newlines?

How can I force netcat to send my input immediately, not just on newlines? I want to test an HTTP parser manually and check how it behaves when header lines are spread across multiple packets.
2
votes
1answer
3k views

How to get the WAN IP from a router using UPnP/SSDP

I'm trying to find a way to get my router to report back my WAN IP using UPnP/SSDP, but so far I have been unable to even get a list of UPnP supporting internet access devices on my network. Here's ...
0
votes
0answers
1k views

Port forwarding on D-link DIR-615 router

I'm attempting to configure my router to forward a port to my Linux machine. The Linux computer has a static IP (192.168.0.185) Right now I'm just experimenting to make sure I can forward a port, so ...
0
votes
1answer
864 views

Can I use nc and/or stunnel to make a transparent SSL proxy such that I can specify the outgoing source port?

I've been playing around a bit with different variations and can't seem to find something that quite works. I want to be able to 'bridge' an SSL connection across a particular gateway node in the ...
1
vote
2answers
448 views

How to set up a secure chat using netcat

I use netcat to chat in LAN. PC1 listen port 8080 $ nc -l -p 8080 PC2 connect to PC1:8080 $ nc 192.168.10.1 8080 Unfortunately, this is not secure. Anyone sniffing packets can intercept my ...
2
votes
1answer
2k views

bidirectional socat functionality with nc

This is question is somehow related to How is it called when listening(connecting) two sockets and exchanging data between them? In the test setup I have three terminal windows open I run in Term1: ...
6
votes
1answer
2k views

versions of netcat

I've tried the two main versions of netcat : GNU and BSD. (mine is BSD Version). On GNU version, the command $ nc -l -p 12345 works fine but with BSD, option -l (listen) can't be used in conjonction ...
1
vote
1answer
235 views

Can I use dd to clone two drives from two machines simultaneously?

To clarify, I have two machines: Machine1 and Machine2. Each machine has 2 disks (Machine1 has Disk1-1 and Disk1-2; simiarly, Machine2 has Disk2-1 and Disk2-2). Can I use 'dd' to clone Disk1-1 to ...
2
votes
2answers
7k views

Netcat/socat behavior with piping and UDP?

I guess this is close to linux - Netcat stops listening for UDP traffic - Super User, but I thought I'd better ask anyways As far as versions of netcat I'm using Ubuntu 11.04 and the default netcat ...
0
votes
1answer
274 views

cat file that contains escaped characters to netcat

I'm trying to test a webserver with some HTTP request written in a file. GET / HTTP/1.1\r\n\r\n Right now I'm feeding that file to netcat like this: cat files | nc localhost 80 However, the \r\n ...
2
votes
1answer
191 views

Monitoring incoming requests on a web hosting server

I have a web hosting account with GoDaddy (its a Linux based hosting). Can I install applications like netcat to monitor all incoming requests to my website on a certain port? If not, is there any ...
2
votes
1answer
6k views

Linux built-in or open source program to join multicast group?

I'm using tcpdump to capture multicast packets and had to code up a custom program to join multicast feeds so tcpdump will "see" the packets. Just wondering if netcat or any other applications can ...
0
votes
2answers
1k views

nc or socat: How to read data from remote:/dev/ttyACM0?

I have a device running at a remote computer on /dev/ttyACM0 Now I want to read that data on my computer. I can connect to it over ssh. Unfortunately I am a nc/socat rookie and no howto covered this. ...
0
votes
1answer
571 views

How to purge connections left open by SSH ProxyCommand?

I have a webserver WWW1 and a front-facing proxy PRX. I use SSH ProxyCommand to connect to WWW1's internal IP (private IP) via PRX (private+public IP). For some connections (not all) I see a network ...
2
votes
1answer
4k views

Terminal command to send data (plain text string) to a port at a remote computer

I am trying to send data (plain text string) to a port at a remote computer using terminal utility. The string would be used to trigger something on the remote computer running a program that would ...
1
vote
1answer
485 views

Simple secured SFTP tunnel?

I'd like to setup an sftp tunnel so that I can connect to an IP-secured SFTP server through a gateway computer from anywhere, and download the files to anywhere. I was thinking of using a combination ...
1
vote
1answer
1k views

Netcat file transfer problem

I have two custom scripts I just wrote to facilitate transferring files between my VPS and my home server. They are both written in bash (short & sweet): To send: #!/bin/bash SENDFILE=$1 PORT=$2 ...
7
votes
1answer
19k views

Netcat on Mac OS X

Is anybody else not able to get nc -lp 8888 working on Mac OS X? Is there another way to get this to work?