Remote command execution with netcat on Windows
A tiny script which listens for commands over the network and executes them.
Run ncRemRun.cmd
on the target PC(s).
Make sure the PC has netcat (nc.exe
) in the same directory or %PATH%
.
You can configure the port in the script.
Run client_ui.cmd
. It's an interactive script which will ask for the hostname and commands. Requires powershell.
Run client_cli.cmd "<hostname>" "<command>"
. Requires powershell.
Send a GET request (with wget or PowerShell or cURL or whatever):
hostname/<command-goes-here>
open http://<hostname>/<command>
curl <hostname>/<command>
wget --timeout=1 --tries=1 -qO- "<hostname>/<command>"
powershell -c iwr "\"<hostame>/<command>\"" -UseB >nul
- No auth or encryption. This was made to be used with a renderfarm in a safe and trusted environment on a secured network.
- The script will ignore duplicate commands. If you want to run the same command multiple times, send the command "
null
" between each iteration. - ¯\_(ツ)_/¯