A simple Python TCP client that connects to a remote host, sends a command, and prints the server’s response. For educational purposes only — do not run on unauthorized machines.
- Connects to a remote host via TCP
- Sends a single command provided as a command-line argument
- Receives and prints output from the server
- Make sure a TCP server is running on the target host and port.
- Run the client script with the command to execute:
python code.py <command>
# Example:
python code.py "whoami"- The server’s response will be printed in the console.
- Only one command is sent per execution.
- Do not use this against unauthorized machines — it may be illegal.