For a quick overview of what the tool does, how it works, and why it exists, see this blog post.
- π Search and filter hundreds of shell payloads by OS, type, protocol, and language
- π Generate ready-to-use payloads and listeners for your target
- π Show detailed info for each shell
- π¨οΈ Colorful output (with
--no-coloroption for scripts) - π·οΈ Offline: No internet required
- π οΈ Easy to extend with your own payloads (just add TOML files!)
- π Open Source and hackable
./oh-my-shell <command> [OPTIONS]list(alias:l) - List payloads with optional filterssearch <term>(alias:sr) - Search for payloadsshow <shell_id>(alias:sh) - Show details about a specific payloadgenerate <shell_id>(alias:g) - Generate a payload
-i, --id <shell_id>Shell identifier-s, --search <term>Search term-H, --lhost <host>Local host for payload generation-P, --lport <port>Local port (default: 4444)-S, --shell <shell>Shell to use for payloads-e, --encoding <type>Output encoding (url, base64, etc.)-l, --listenerOutput only the recommended listener-p, --payloadOutput only the generated payload--no-colorDisable ANSI color output--versionShow version information-h, --helpShow help message
--os <os>Filter by OS (bsd, linux, osx, unix, windows)--type <type>Filter by type (reverse, bind)--proto <proto>Filter by protocol (tcp, udp, http)--lang <lang>Filter by language (ruby, go, python, etc.)
./oh-my-shell list --os linux --type reverse
./oh-my-shell l --os linux --type reverse # Using alias
./oh-my-shell search "netcat"
./oh-my-shell sr "netcat" # Using alias
./oh-my-shell show bash_read_line
./oh-my-shell sh bash_read_line # Using alias
./oh-my-shell generate bash_i -H 192.168.1.100 -P 4444
./oh-my-shell g bash_i -H 192.168.1.100 -P 4444 # Using alias
./oh-my-shell --versionJust drop a new .toml file in the appropriate shells/ subdirectory. The tool will pick it up automatically!
Requires: make and any C compiler (e.g. gcc, clang, cc, ...).
makeJust run the following command, note you need to have make and a C compiler installed:
curl -fsSL https://raw.githubusercontent.com/ordinary-hacker/oh-my-shells/trunk/scripts/install.sh | sudo bashOr, otherwise you can use one of the precompiled binaries available at release/builds/ and in the latest release.
Just make sure you have both the binary and the shells/ directory in the same folder. The latest release also contains a .zip and .tar.gz of the shells/ directory for easier install.
Afterwards, no matter the method of installation, you can just run the tool as:
oh-my-shells -hThe project includes a full suite of unit, integration, and black-box tests.
This comprehensive amount of tests is available in tests/, all of them using the Unity Test Framework at lib/unity/.
Here's a look at the structure of tests:
- White Box Tests (Unit Tests)
test_cli.c: Tests CLI arguments parsing and command structure initializationtest_module_loader.c: Tests module loading, registry management, and TOML parsing
- Integration Tests
test_integration.c: Tests complete workflows and component interactions
- Black Box Tests
test_blackbox.c: Tests the binary as an external user would, testing all commands and edge cases
Running all tests:
make testRunning individual test suites:
make run-test-cli
make run-test-module-loader
make run-test-integration
make run-test-blackboxBuilding tests without running them:
make build-testsThe whole test suite covers:
- CLI argument parsing and validation
- Module registry initialization and management
- TOML file loading and parsing
- Shell module search and filtering
- Payload generation functionality
- All command-line commands (list, search, show, generate)
- Error handling and edge cases
- Command aliases and flag combinations
- Integration between components
These tests should always pass with 0 failures. In total the test suite includes:
- 8 CLI tests
- 5 Module loader tests
- 6 Integration tests
- 13 Black box tests
Giving us a total of 32 tests.
Author and maintainer: ordinary-hacker
This tool depends on and includes a vendored version of tomlc17 by cktan.
There's also a vendored version of the Unity Test Framework by ThrowTheSwitch used for testing.
MIT License. See LICENSE for details.
Made with β€οΈ by hackers, for hackers.