This is a Python-based implementation of a Netcat-like tool for networking tasks. It supports server-client communication, file uploads, command execution, and an interactive shell. This project is a good starting point to understand socket programming, threading, and basic command-line networking tools.
- Server Mode: Listen on a specified port for incoming connections.
- Client Mode: Connect to a server and send data or commands.
- Command Execution: Execute system commands on the server and return the output to the client.
- Interactive Shell: Provides a command shell for remote interaction.
- File Upload: Upload files from the client to the server.
Run the script with the -l flag to start the server. The server will listen on the specified host and port for incoming connections.
Example:
python Netcat.py -t 0.0.0.0 -p 5556 -l -cRun the script without the -l flag to connect to a server. You can send commands or files depending on the mode.
Example:
python Netcat.py -t 127.0.0.1 -p 5556python Netcat.py -t target_host -p port [options]
Options:
-l, --listen Listen on [host]:[port] for incoming connections
-e, --execute=file_to_run Execute the given file upon receiving a connection
-c, --command Initialize a command shell
-u, --upload=destination Upload a file to [destination] upon receiving a connection-
Start a server with a command shell:
python Netcat.py -t 0.0.0.0 -p 5556 -l -c
-
Upload a file to the server:
python Netcat.py -t 0.0.0.0 -p 5556 -l -u=/path/to/destination
-
Execute a command on the server:
python Netcat.py -t 0.0.0.0 -p 5556 -l -e="ls" -
Connect to a server as a client:
python Netcat.py -t 127.0.0.1 -p 5556
- Python 3.x
-
Clone the repository:
git clone https://github.com/NovichronasJr/Netcat-Clone cd Netcat-Clone -
Run the script using Python:
python Netcat.py [options]
- Requires a valid server-client setup for testing.
- Support for UDP protocol.
- Build a GUI for easier usage.
This project is open-source and available under the MIT License.
