Welcome to the Network Programming Toolkit, a hacker-terminal-inspired collection of essential networking tools and educational projects built using pure Python. This repo is a one-stop practical guide to help you understand and implement core networking concepts like TCP/UDP communication, netcat-like functionality, socket proxying, and even SSH tunneling with Paramiko.
⚠️ All tools are built to work in restricted or hardened environments — where tools likenetcat
,wireshark
, or compilers are unavailable — but Python is present.
.
├── SSH with Paramiko/
│ ├── sshrcmd.py # Reverse SSH client
│ └── sshserver.py # SSH server using Paramiko
├── Understanding of TCP UDP/
│ ├── tcpClient.py # Basic TCP client
│ ├── tcpServer.py # Basic TCP server (multi-threaded)
│ └── udpClient.py # Basic UDP client
├── netcat.py # Python replacement for netcat with shell, upload, execute
├── proxy.py # TCP proxy with hexdump and packet interception
├── sshcmd.py # Paramiko-based SSH command executor
- Learn raw socket programming using Python’s
socket
module. - Build your own TCP/UDP clients and servers.
- Multi-threaded TCP server capable of handling multiple clients concurrently.
- Upload files, spawn remote command shells, or execute specific commands — just like netcat.
- Works in both client and server mode.
- Can be used to tunnel basic shell access over TCP using only Python.
- Intercept, inspect (via hexdump), and optionally modify traffic between two endpoints.
- Great for debugging, fuzzing, or analyzing unknown protocols.
- Customize requests and responses via intercept handlers.
sshcmd.py
: Execute commands remotely over SSH (similar tossh user@host 'command'
).sshrcmd.py
: Reverse SSH shell — client connects to your Python SSH server and receives commands.sshserver.py
: Minimal custom SSH server (useful on Windows clients without SSH services).
- Tunnels internal network traffic to external systems via SSH reverse port forwarding.
- Ideal for situations where direct access is blocked but SSH is allowed.
- Python 3.6+
- Paramiko (for SSH tools)
pip install paramiko
python Understanding\ of\ TCP\ UDP/tcpClient.py
python Understanding\ of\ TCP\ UDP/tcpServer.py
python Understanding\ of\ TCP\ UDP/udpClient.py
# Command shell listener
python netcat.py -t 0.0.0.0 -p 5555 -l -c
# Client shell access
python netcat.py -t 127.0.0.1 -p 5555
# Example: Forward local port 9000 to 10.0.0.1:80
python proxy.py 127.0.0.1 9000 10.0.0.1 80 False
python sshcmd.py
# Enter host, port, credentials, and the command to execute
- First, run the server:
python sshserver.py
- Then, on the client machine:
python sshrcmd.py
When you're dropped into a hardened environment with no dev tools, no netcat
, and limited access — but Python is available — this toolkit becomes your Swiss Army Knife. It's also a fantastic way to:
- Learn socket programming
- Understand TCP/UDP fundamentals
- Simulate reverse shells and SSH tunneling
- Debug live traffic using your own proxy
This repository is strictly for educational purposes and ethical cybersecurity training. Any misuse of the content for malicious purposes is against the intent of this project.
Tanishq Arun Ingole 🎓 BTech CSE @ IIIT Pune | 💻 Ethical Hacker | 🎮 Game Developer 🔗 LinkedIn | 🌐 GitHub