Score:0

How can I print the payload received with ncat?

cn flag
Dan

I'm creating an UDP server with the following command:

ncat -ulk -p 3333 -c "echo asd" -vv

It does receive connections and answers to them correctly, but it doesn't print the UDP payload that comes in the client's message.

The client I'm using is an OpenBSD netcat:

$nc -h
OpenBSD netcat (Debian patchlevel 1.206-1ubuntu1)
$echo qwe | nc -u 10.42.0.1 3333 -v

Being 10.42.0.1 the IP address of my laptop's wireless interface.

How can I print it?

Zareh Kasparian avatar
us flag
would you let me know the client you are using to connect to the UDP port 3333?
pt flag
If you use `socat` instead of `ncat` (`socat -v udp6-listen:3333,fork exec:"echo asd"`), you will see the UDP payload printed to the console.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.