Skip to content

NovichronasJr/Netcat-Clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Netcat Replacement

Netcat Logo

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.

Features

  • 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.

How It Works

Server Mode

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 -c

Client Mode

Run 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 5556

Usage

python 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

Examples

  1. Start a server with a command shell:

    python Netcat.py -t 0.0.0.0 -p 5556 -l -c
  2. Upload a file to the server:

    python Netcat.py -t 0.0.0.0 -p 5556 -l -u=/path/to/destination
  3. Execute a command on the server:

    python Netcat.py -t 0.0.0.0 -p 5556 -l -e="ls"
  4. Connect to a server as a client:

    python Netcat.py -t 127.0.0.1 -p 5556

Requirements

  • Python 3.x

Setup

  1. Clone the repository:

    git clone https://github.com/NovichronasJr/Netcat-Clone
    cd Netcat-Clone
    
  2. Run the script using Python:

    python Netcat.py [options]

Known Issues

  • Requires a valid server-client setup for testing.

Future Enhancements

  • Support for UDP protocol.
  • Build a GUI for easier usage.

License

This project is open-source and available under the MIT License.

About

creating a clone of Netcat tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages