Skip to main content

Questions tagged [netcat]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
61 views

I want to send a file to a TCP server, keep the TCP connection open, wait (couple of seconds) for the response, and send the response to stdout. I don't want the connection to be (half) closed ...
filo's user avatar
  • 205
0 votes
3 answers
273 views

I have tried the following to no avail, the script just stops after the first input. filename="..." while IFS="" read -r line; do echo "$line" | nc <target> <...
Jarrett GXZ's user avatar
0 votes
1 answer
728 views

I'm trying to learn how to interact with message buses under Linux, and doing so with shell commands that doesn't involve utilities packaged under dbus-*. For this instance, I want to understand how ...
PatXio's user avatar
  • 1
0 votes
1 answer
108 views

We routinely use netcat (nc) to read data from UDP ports. For example: user@host ~$ nc -luv 57303 Listening on [0.0.0.0] (family 0, port 57303) NAV 2024/12/05 12:09:56.326365 DPS112 $GPZDA,121003.35,...
PAUL MENA's user avatar
2 votes
1 answer
759 views

I'm using a fresh minimal Ubuntu server 24.04.1 LTS install. I run these commands as root to set up networking and do some experiments: If you have seen this post, it's the same setup but with the ip ...
Adrian's user avatar
  • 261
3 votes
2 answers
324 views

I'm using a fresh minimal Ubuntu server 24.04.1 LTS install. I run these commands as root to set up networking and do some experiments: apt install netcat-traditional ip netns add ns1 ip netns add ...
Adrian's user avatar
  • 261
1 vote
1 answer
128 views

On a Ubuntu system I have the netcat(-openbsd) package installed, the one that, when run with no parameters, prints: This is nc from the netcat-openbsd package. An alternative nc is available in the ...
AndreKR's user avatar
  • 1,238
0 votes
3 answers
143 views

I use an embedded computer to send data to a Linux serial port for transfer to a remote server. The terminal mode is "none". After my embedded system logs in, it sends data for example, ...
Ed309's user avatar
  • 1
0 votes
0 answers
118 views

How to check if a port is blocked with socat? How to check with IPv6? I heard a saying that machines behind NAT can still be directly connected via IPv6, is that true? Anyway, say I have a machine ...
xpt's user avatar
  • 1,924
3 votes
1 answer
668 views

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 ...
zahntheo's user avatar
0 votes
1 answer
243 views

I have this nginx custom configuration: server { listen 8080; server_name subdomain.domain.my.id; location /vless-ws { # Consistent with the path of V2Ray configuration if ($...
isysrg's user avatar
  • 3
-1 votes
2 answers
188 views

In a docker image I want to avoid installing netcat in order to ping for db connectivity at my entrypoint script: /bin/sh MOODLE_DB_HOST="xxxx" MOODLE_DB_PORT=80 function pingdb { OK=0 ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
230 views

I'm using netcat and stty to get terminal (tty) access, but I'm not able to do so as the CTRL+Z action on the netcat session is giving me suspended session instead of stopped and then I'm not able to ...
asadz's user avatar
  • 243
0 votes
0 answers
46 views

I have this exact code: #!/bin/bash gtimeout(){ if type -f gtimeout &> /dev/null; then command gtimeout "$@" else timeout "$@" fi } export -f gtimeout; ...
Alexander Mills's user avatar
0 votes
1 answer
546 views

BusyBox v1.36.1 (2023-07-17 18:29:09 UTC) multi-call binary. I run minimal nc server like: nc -lkp 12345 I can connect to it once nc localhost 12345. After ctr-C, the next attempt will fail. however ...
Wang's user avatar
  • 1,435
1 vote
1 answer
284 views

Both client and server are Debian 11 On Server as root: nc -ulp 1194 On Client as root: nc -u serverip 1194 When I type something on client, in theory it should appear on the server right if no ...
rocky_alpine's user avatar
1 vote
2 answers
450 views

I am using netcat to get a series of points which I would like to plot with gnuplot. However, I am having trouble passing the data to gnuplot without writing it to a file first. In the simplest case, ...
Sebastian's user avatar
  • 111
0 votes
0 answers
122 views

I am working on a script to parse a file containing a list of IP addresses and ports then do a bunch of test on the ports with netcat. The port argument can be a single port, a list of ports, or a ...
math's user avatar
  • 119
0 votes
0 answers
174 views

I used dd to create a sample empty file with 1MB, edited the sample file, created a MD5 hash of the file, started a listener on the examiner machine, piped the output off to nc and compared the hashes....
kappa's user avatar
  • 1
0 votes
1 answer
487 views

I have a PHP-based website, and I'm trying to integrate it with another system. This system sends XML data to a specific port (let's say port 9999). I am able to capture the incoming data and save it ...
brayne's user avatar
  • 1
1 vote
1 answer
1k views

This to my understanding records mono in wav format for 300 seconds to a named pipe called "mic_rec" rec arecord -D hw:4,0 -d 300 -f cd -t wav -c 1 mic_rec And this sends whatever it finds ...
Daniel's user avatar
  • 163
10 votes
1 answer
5k views

In debian:bullseye oot@4770c7ba00ac:/# apt install -y netcat Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be ...
pkaramol's user avatar
  • 3,109
0 votes
0 answers
52 views

I'm working through an introductory cybersec challenge that requires me to upload a word and brute force a 4 digit code to a port. I put the combinations in a file, and tried to use netcat to upload ...
Noah Massey's user avatar
1 vote
1 answer
277 views

How can I run a program that expects to be executing in a terminal in such a way that it's STDIO can be arbitrarily connected-to remotely? Specifically, I want to be able to launch gdb on one host and ...
Billy's user avatar
  • 111
2 votes
1 answer
2k views

Context : I want to test UDP port with nc command What happens : nc command return nothing on output and 0 when i put echo $? Which command : nc -vzu <ip> <port> echo $? What is the ...
adhara's user avatar
  • 23
2 votes
1 answer
1k views

So far I use multicast with ipv4 and it works; all involved computers run linux. I listen on two machines and send on one of those two (in a separate terminal). In the below example 'Hello 1' is ...
Al_'s user avatar
  • 23
2 votes
1 answer
2k views

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 &...
ka3ak's user avatar
  • 1,277
0 votes
1 answer
617 views

I am listening on a port for logs coming from a device, then I used netcat to redirect those logs to a text file whenever a log is available on the device and all this to happen in the background ...
joseph's user avatar
  • 1
3 votes
1 answer
209 views

nc -l -u 6666 on the receiving machine gets no messages from netconsole. tested by doing "echo test > /dev/kmsg" i am able to connect with netcat by doing "nc -u 10.0.0.192 6666"...
Gooberpatrol66's user avatar
0 votes
0 answers
119 views

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
0 answers
298 views

Currently, I am working on a project where I use telnet to netcat to send an email message within my university. I am trying to make the process automated but my script can't seem to enter in any ...
Mitchell Zhou's user avatar
0 votes
1 answer
2k views

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 ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
73 views

I am using netcat to run a file over a network like so nc -lvnp 1111 -e file on the client machine, the connection is empty and I only get an output after I enter an input. How to show the output of ...
sam's user avatar
  • 1
1 vote
1 answer
549 views

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&...
Ben Holness's user avatar
0 votes
1 answer
104 views

I have 2 Ubuntu boxes one of them acting as an Attack platform (we will call it AP), the other as an already compromised server (we will call it S1). I have this rule sudo iptables -t nat -I ...
noah allen's user avatar
1 vote
1 answer
629 views

If you had two computers, wanting to control one from another using only ncat, without using telnet, ssh or other networking tools and only two shells, how could i go about that? I have successfully ...
Tada Fireworks's user avatar
0 votes
1 answer
8k views

I'm trying to send a binary packet to a local process, via netcat (nc), like this: nc -w 1 -u localhost 10000 < my_binary_packet.bin The output is: read(net): Connection refused Anyone know what'...
Gabriel Staples's user avatar
1 vote
0 answers
4k views

Any idea why nc command is not working and telnet is working. Ideally nc will also work. I am trying to use nc in script but getting error however telnet is working. Ideally nc command is working for ...
rizwan's user avatar
  • 111
1 vote
0 answers
484 views

I have this script on a Linux machine that loops through a .txt file to see if connection is successful or not. When I give the IP directly is works. However, when I pass the variable it says: nc: ...
Shwan's user avatar
  • 11
0 votes
0 answers
286 views

I have a Python script accessible with netcat: nc 'serverIP' port. The Python script awaits an input from the user. If the input is expected, the script keeps running. If the input is unexpect (e.g. ...
McBonobo's user avatar
2 votes
1 answer
2k views

I am trying to use netcat to echo some data to a custom board I have. The board is connected using a 10G Ethernet connection. I can see that the link is up but when I try using netcat I am not getting ...
jon's user avatar
  • 21
0 votes
1 answer
763 views

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
1k views

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
2k views

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
0 votes
1 answer
3k views

I have a situation where we are trying to get data from one network to another - specifically access to a private maven repo on a different network. Network 1 contains a maven repo. And network is ...
Jeef's user avatar
  • 157
4 votes
1 answer
1k views

I'm having a bit of trouble utilising netcat on Arch, specifically, the GNU version of it. My situation: I basically made a simple server in Python that can accept multiple clients and send responses. ...
cpolish's user avatar
  • 41
1 vote
1 answer
620 views

I have access to just *nix systems. Either NetBSD and/or bare Linux-based OS. So my question comes from the fact that ADB is not widely available on all platforms, if so is very hard to install or ...
abacox's user avatar
  • 143
4 votes
1 answer
6k views

Ι am nc-listening on localhost:2500 ▶ nc -l 2500 _ On another terminal I am trying to connect to this listening end ▶ nc -zv localhost 2500 nc: connectx to localhost port 2500 (tcp) failed: ...
pkaramol's user avatar
  • 3,109
1 vote
1 answer
3k views

I'm using macOS with gnu netcat. I want to understand how can I broadcast message using netcat. I have a netcat listening on 4555 netcat -l -p 4555 192.168.0.101 but as I attempt to send a broadcast ...
Noobie's user avatar
  • 115
0 votes
1 answer
1k views

I'm trying to do a simple exercise, where I need to set up a "server" hosting a bind shell, using netcat. On my localhost. I'm running ubuntu 20.04 I'm following this tutorial, that has this ...
NotQuiteSo1337's user avatar

1
2 3 4 5
7