How can I emulate netcat -e
with a version of netcat that does not have the -e
option ?
I need to trigger a command remotely. I can do it with netcat - without -e
:
#!/bin/bash
netcat -l 8080 ; myCommand.sh
That would do the trick, but I would like to reply to the client depending on the success or failure of the command (to have a kind of REST - like interface).
How could I do that ?
Thanks!
Probably the most malicious use of netcat-- and the most effective for the hacker --is the ability to use netcat for remote administration. We can use netcat's ability to execute commands to give the remote connection a shell on the listening system.
By configuring jobs, you can effectively monitor your Windows-based infrastructure using Netdata, despite our lack of native Windows support. Use real-time visualizations to troubleshoot anomalies, or claim the node(s) you use to monitor Windows to your Space in Netdata Cloud for Windows infrastructure monitoring.
What are nmap and netcat? Nmap is a free and open-source network scanner used to discover hosts and services on a computer network by sending packets and analyzing the responses. Netcat is a general-purpose command-line tool often referred to as the Swiss Army knife for networking.
In this tutorial, you will learn how to download and install Netcat on Windows 11/10 /Server. Netcat is a network security tool that administrators can use for a variety of network operations, such as checking open ports, transferring data over a network connection, and security assessments.
mkfifo foo
nc -lk 2600 0<foo | /bin/bash 1>foo
Then just nc servername 2600 and ./script.sh
kill the client with ctrl+c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With