CLI
WayHack CLI Guide
A comprehensive guide to using the WayHack CLI tool for bug bounty automation and reconnaissance.
Table of Contents
Introduction
WayHack CLI v2.0.0 is a powerful command-line tool for bug bounty automation that provides:
-
Direct tool execution with output tracking
-
URL discovery and OSINT reconnaissance
-
AI-powered command generation
-
Remote command execution capabilities
-
Comprehensive scan result management
Note: A premium subscription is required to use the WayHack CLI.
Installation
Download Pre-built Binaries
Download the appropriate binary for your platform from GitHub releases:
-
Windows:
wayhack-windows-amd64.exe
-
Linux:
wayhack-linux-amd64
-
macOS Intel:
wayhack-darwin-amd64
-
macOS Apple Silicon:
wayhack-darwin-arm64
Linux/macOS Installation
# Download and install
wget https://github.com/ethicalhackingplayground/wayhack-cli/releases/latest/download/wayhack-linux-amd64
chmod +x wayhack-linux-amd64
sudo mv wayhack-linux-amd64 /usr/local/bin/wayhack
Windows Installation
# Download the Windows binary
Invoke-WebRequest -Uri "https://github.com/ethicalhackingplayground/wayhack-cli/releases/latest/download/wayhack-windows-amd64.exe" -OutFile "wayhack.exe"
# Move to a directory in your PATH
Build from Source
git clone https://github.com/ethicalhackingplayground/wayhack-cli.git
cd wayhack-cli
go mod download
go build -o wayhack main.go
Initial Setup
Configure API Credentials
After installation, configure your API credentials:
wayhack setup
This will prompt you for:
-
API URL:
https://wayhack.sh
(default) -
API Key: Your WayHack API key (starts with
wh_
)
To get your API key:
-
Go to your WayHack settings page
-
Navigate to the 'CLI API Keys' section
-
Click 'Create API Key' and copy the generated key
Verify Installation
# Check version
wayhack version
# Output: wayhack version 2.0.0
# Check tool installations
wayhack check
# List enabled tools
wayhack list
Core Commands
wayhack setup
Configures the CLI with your API credentials.
wayhack setup
wayhack check
Checks which security tools are installed on your system.
wayhack check
Checks for common tools like:
-
ffuf
-
dirsearch
-
nuclei
-
gobuster
-
httpx
wayhack list
Shows tools enabled for your account and their installation status.
wayhack list
wayhack version
Displays version information.
wayhack version
URL Discovery & Search
Basic Search
Perform OSINT reconnaissance and URL discovery:
# Basic domain search
wayhack search --domain example.com
# Search with specific sources
wayhack search --domain example.com --sources wayback,crtsh
# Include subdomains
wayhack search --domain example.com --include-subdomains
# Search for specific file extensions
wayhack search --domain example.com --extensions pdf,doc,xls
# Search for specific paths
wayhack search --domain example.com --path "/admin"
Search Options
The search command supports various flags for filtering and customization:
-
--domain
: Target domain to search -
--sources
: Specify data sources (wayback, crtsh, etc.) -
--include-subdomains
: Include subdomain results -
--extensions
: Filter by file extensions -
--path
: Search for specific URL paths
Tool Execution
Direct Tool Execution
Run security tools directly with automatic output tracking:
# Basic tool execution
wayhack run ffuf -u http://example.com/FUZZ -w wordlist.txt
# Nuclei vulnerability scanning
wayhack run nuclei -u http://example.com -t templates/
# Directory bruteforcing with gobuster
wayhack run gobuster dir -u http://example.com -w /usr/share/wordlists/dirb/common.txt
Complex Commands
Handle commands with quotes and special characters:
# Commands with headers and quotes
wayhack run ffuf -u "http://example.com/FUZZ" -w wordlist.txt -H "User-Agent: Mozilla/5.0"
# API requests with authentication
wayhack run curl -H "Authorization: Bearer token" "http://api.example.com/data"
# Nuclei with severity filtering
wayhack run nuclei -u http://example.com -severity critical,high -o results.txt
Output Tracking
All tool executions are automatically tracked:
-
Outputs saved to
~/.wayhack-outputs/
(Linux/macOS) or%USERPROFILE%\.wayhack-outputs\
(Windows) -
Each scan gets a unique ID
-
Metadata includes tool, command, target, timestamp, and status
Command Generation
AI-Powered Command Suggestions
Generate optimized commands for specific tools and targets:
# Generate commands for a tool and URL
wayhack generate ffuf http://example.com
# Generate with category filtering
wayhack generate nuclei http://example.com -c "Web Application"
# Interactive mode for command selection
wayhack generate dirsearch http://example.com --interactive
Interactive Mode
Use the
--interactive
flag to:
-
View generated command options
-
Select a command to execute
-
Run the selected command immediately
Command Categories
Filter generated commands by category using the
-c
flag:
-
Web Application
-
Directory Enumeration
-
Vulnerability Scanning
-
And more...
Viewing Results
Scan Management
View and manage your scan results:
# List all scans
wayhack view
# View specific scan output
wayhack view scan_1234567890
# View latest scan
wayhack view --latest
# View latest scan for specific tool
wayhack view --latest --tool ffuf
# View last 10 scans
wayhack view --count 10
# Detailed scan information
wayhack view --detailed
View Options
-
--latest
: Show the most recent scan -
--tool <name>
: Filter by specific tool -
--count <number>
: Limit number of results -
--detailed
: Show detailed scan information
Remote Execution
Listen Mode
Enable remote command execution from the web interface:
# Start listening for commands
wayhack listen
# Custom check interval (default: 10 seconds)
wayhack listen --interval 5
Listen Features
-
Polls server for queued commands
-
Executes commands automatically
-
5-hour maximum runtime for safety
-
Graceful shutdown with Ctrl+C
-
Team collaboration through web interface
Use Cases
-
Remote VPS reconnaissance
-
Team collaboration
-
Scheduled scanning
-
Distributed testing
Best Practices
Security
-
Protect your API key: Never share or commit API keys
-
Use listen mode safely: Monitor execution and set appropriate timeouts
-
Validate targets: Ensure you have permission to test targets
Performance
-
Tool installation: Install required tools before execution
-
Output management: Regularly clean old scan outputs
-
Resource monitoring: Monitor system resources during scans
Workflow
-
Start with search: Use
wayhack search
for reconnaissance -
Generate commands: Use
wayhack generate
for optimized commands -
Execute systematically: Run tools in logical order
-
Review results: Use
wayhack view
to analyze outputs
Troubleshooting
Common Issues
Setup Problems
# Verify installation
wayhack version
# Check configuration
wayhack setup
# Test API connection
wayhack list
Tool Execution Issues
# Check tool installation
wayhack check
# Verify tool is in PATH
which ffuf # Linux/macOS
where ffuf # Windows
Subscription Issues
-
Ensure you have a premium subscription
-
Visit
/plans
to upgrade if needed -
Contact support if subscription issues persist
Configuration File
Configuration is stored in
~/.wayhack-config.json
:
{
"apiUrl": "https://wayhack.sh",
"apiKey": "wh_your_api_key_here"
}
Output Directory
Scan outputs are stored in:
-
Linux/macOS:
~/.wayhack-outputs/
-
Windows:
%USERPROFILE%\.wayhack-outputs\
Each scan directory contains:
-
stdout.txt
- Tool output -
stderr.txt
- Error output -
metadata.json
- Scan metadata
Getting Help
# General help
wayhack --help
# Command-specific help
wayhack run --help
wayhack generate --help
wayhack search --help
wayhack view --help
wayhack listen --help
Next Steps:
-
Introduction - Platform introduction
-
Getting Started - Quick start guide
-
Platform Overview - Web interface guide
-
Search Techniques - URL discovery strategies
-
Data Sources Deep Dive - Understanding data sources
-
Web Interface Guide - Learn the web dashboard