Netcat is a computer networking service for reading from and writing network connections using TCP or UDP

learn more… | top users | synonyms

0
votes
2answers
2k views

How can I use netcat (nc) for chat client server model?

I am trying to write a daemon using bash. I will enter my partner's IP address and the connection will start using nc partner_ip 2015, likewise on the server I will start the connection using nc -l -p ...
2
votes
1answer
37 views

tunnel netcat video streams to mplayer

I am sending a video stream over my network and I want to encrypt it with ssh. This solution below works: on machine 1 I run ./capture | nc 192.168.1.65 5001 on machine 2 I run netcat -l -p 5001 ...
1
vote
1answer
372 views

Need help using Netcat

I have a file on my server that has HL7 messages spread out by a space. Example below. I am wanting to send one of these messages at a time in a continual loop until stopping the script with ctrl+c. I ...
0
votes
1answer
38 views

Convert line of ASCII file to binary packet for NetCat

I have an ASCII file, which looks like this: 36,36,0,1 36,36,0,2 ... What I want to do is to send every row of it as one binary TCP segment's payload with NetCat. To convert the number from file ...
3
votes
0answers
274 views

Remote Mouse netcat (/dev/input/mice)

I was playing around with nc and I'm discovering how powerful and versatile this tool is. I was wondering how the file /dev/input/mice works because when I do cat /dev/input/mice you see the output, ...
2
votes
0answers
187 views

named pipe proxy over SSH

I am used to forwarding a remote service port on localhost using ssh like: ssh -L 2181:localhost:2182 user@server (forward remote host port 2182 to local port 2181) now, from the machine I ssh to, I ...
2
votes
0answers
49 views

How to make netcat print colourful text?

on my Mac I have an peripheral that sends text data to localhost:2332. Some of them are coloured, like this: "\e[1;31mRed text here\e[m normal text here", I use nc loacal host to monitor the data ...
1
vote
0answers
34 views

How can I temporarily map a remote host and port to a local port?

Say I have a machine A acting as a router with two NICs and the following IP addresses: eth0: 192.168.1.1 (LAN) eth1: 10.0.0.1 (WAN) And I have another machine B on IP address 10.0.0.2 that I want ...
1
vote
0answers
140 views

Half-close netcat connection

How can I have a netcat connection terminate the sending half of a TCP connection if its input reaches EOF? I have a (non-standard) TCP service which reads all its input (i.e. until the client sends ...
1
vote
0answers
56 views

Netcat server/client for a social thread

I have been learning nc for a while now, and I decided to make a social thread server for it in bash. Surprisingly, I got it working, but I have a couple problems with it. My main problem I want to ...
1
vote
0answers
102 views

Pipe Text Into and Out of Netcat Server Using mkfifo

I wanted to make two pipes for a netcat server that inputs text into the server, and one that outputs text from the server. I have the server running in a seperate script with the input and output ...
1
vote
0answers
30 views

What command line tools can be used to manually perform each step of an entire network “conversation”?

I know, I know; the phrase "network conversation" is imprecise almost to the point of meaninglessness. Let's take this specific scenario: I plug in a computer to a DHCP enabled router, open a browser ...
1
vote
0answers
258 views

netcat doesn't terminate when stdin closes

I'm trying to send a message through netcat. After sending the message, netcat must terminate. I've tried the following: cat tsmmessage.bin | nc -u localhost 4300 nc -u localhost 4300 < ...
1
vote
0answers
193 views

'nc' using ~100% CPU when transferring a FIFO file

On the server which is always connected I’m using this in a crontab: @reboot nc -k -l 1337 < /tmp/fifo.fifo On the client which is not always on the network or switched on I’m using this ...
1
vote
0answers
152 views

Pipe a device via USB or wlan

I have an Android phone and I want to use some of its onboard device from PC. To be more clear, there is a node in /dev/ and I want to have on PC a file (or named pipe which is accessable as a file) ...
0
votes
0answers
31 views

netcat output does not write to array if launched from cron

I am able to run this script as a user or root with bash or sh. Doing so gives me the output that I expect (arrayFWS is written to file, then emailed). However, when I run it with crontab with user or ...
0
votes
0answers
47 views

Testing Remote SMTP Server Port

I am currently working in a lab environment to test a script for my production environment. My environment has several remote firewalls, all of which have an external mail Virtual IP (VIP). Our ...
0
votes
0answers
62 views

How to Copy Files through Socks 5 Proxy?

I'm trying to copy files from ubuntu server A to debian server B. Accessing both of them via SSH on win7 laptop C. Because of slow transfers the company running A provided a Socks5 proxy. Now when ...
0
votes
0answers
35 views

Netcat missing -z flag

I have a script that checks if a server can connect to another one over port 443, I use the following command in the script: [user@centos6 ~]$ nc -v -w 2 -z 10.3.22.2 443 Connection to 10.3.22.2 443 ...