Skip to content

Baud-Hacker/C99nl-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

C99.nl CLI

A powerful command-line interface wrapper for the C99.nl API. This tool provides quick and easy access to dozens of security, networking, and utility APIs directly from your terminal.

Features

  • Secure API Key Management: Never hardcode your API key in the script
  • Multiple Output Formats: Choose between formatted text or JSON output
  • Verbose Mode: Debug your requests with detailed logging
  • Comprehensive Error Handling: Clear error messages and input validation
  • 50+ Commands: Access all C99.nl API endpoints

Installation

  1. Download the script:

    curl -O https://raw.githubusercontent.com/yourusername/c99nl-cli/main/c99nl.sh
    chmod +x c99nl.sh
  2. Set up your API key (choose one method):

    Option 1: Environment Variable (Recommended)

    # Add to your ~/.bashrc or ~/.zshrc
    export C99_API_KEY="your_api_key_here"

    Option 2: Config File

    # Create config file
    echo "your_api_key_here" > ~/.c99nl

    Or use the alternative location:

    mkdir -p ~/.config/c99nl
    echo "your_api_key_here" > ~/.config/c99nl/config
  3. Verify installation:

    ./c99nl.sh --version
    ./c99nl.sh --help

Usage

Basic Syntax

c99nl.sh [OPTIONS] <COMMAND> [ARGUMENTS]

Options

  • -h, --help - Show help message
  • -v, --verbose - Enable verbose output (shows the actual API URL being called)
  • -j, --json - Output in JSON format
  • --key <KEY> - Override API key for this request
  • --version - Show version information

Examples

Basic Commands

# Subdomain finder
./c99nl.sh cfsub example.com

# Whois lookup
./c99nl.sh whois example.com

# GeoIP lookup
./c99nl.sh geoip 8.8.8.8

# Port scan
./c99nl.sh portscan example.com

# Phone lookup
./c99nl.sh phone +1234567890

Using Options

# Get JSON output
./c99nl.sh --json whois example.com
./c99nl.sh -j cfsub example.com

# Verbose mode for debugging
./c99nl.sh -v geoip 8.8.8.8

# Combine options
./c99nl.sh -v -j cfsub example.com

# Use a different API key temporarily
./c99nl.sh --key "temporary_key" whois example.com

Environment Variables

# Set output format via environment variable
export C99_OUTPUT_FORMAT=json
./c99nl.sh whois example.com  # Will output JSON

# Override with command-line flag
./c99nl.sh whois example.com  # Text output (default)

Available Commands

Network & Domain Tools

  • cfsub <DOMAIN> - Subdomain Finder and CloudFlare Resolver
  • portscan <HOST> - Scan all ports of given host
  • scanport <HOST> <PORT> - Scan a single port
  • nmap <HOST> - Perform nmap scan
  • ping <HOST> - Ping a host 4 times
  • ip2host <IP> - Get hostname from IP
  • host2ip <HOST> - Get IP from hostname
  • advdns <URL> <TYPE> - Advanced DNS check (types: a, aaaa, cname, mx, ns, soa, txt)
  • domain <DOMAIN> - Check if domain is available
  • dnshistory <DOMAIN> - Check domain IP history
  • ip2domain <IP> - Find websites hosted on IP
  • whois <DOMAIN> - Whois lookup
  • geoip <IP> - Locate IP address
  • updown <HOST> - Check if website is up or down
  • headers <URL> - Get website headers
  • WAF <URL> - Detect firewall technology

Communication Tools

  • phone <NUMBER> - Phone lookup (international format: +310000000000)
  • sms <COUNTRY> - SMS receiver (Country codes: US, CA, UK)
  • skypecheck <USERNAME> - Check if Skype account exists
  • skype2ip <USERNAME> - Resolve Skype username to IP
  • ip2skype <IP> - Find Skype accounts by IP
  • email2skype <EMAIL> - Find Skype accounts by email

Security Tools

  • rep <URL> - Site/URL reputation checker
  • validemail <EMAIL> - Validate email address
  • tempcheck <EMAIL> - Check if email is disposable
  • validip <IP> - Validate IP address format
  • torcheck <IP> - Check if IP is from TOR network
  • proxy <LIMIT> <TYPE> <ANON> <COUNTRY> - Fetch proxy list
  • detectproxy <IP> - Detect if IP is a proxy/VPN

Utility Tools

  • alexa <DOMAIN> - Get Alexa rank
  • screen <URL> - Create website screenshot
  • backup <URL> - Create online backup of link
  • shorten <URL> - Shorten URL
  • translate <TEXT> <LANG> - Translate text to any language
  • dict <WORD> - Get word definition
  • synonym <WORD> - Find synonyms
  • reverse <IMAGE_URL> - Reverse image search
  • img2txt <IMAGE_URL> - Extract text from image (OCR)
  • weather <LOCATION> - Check weather
  • gif <KEYWORD> - Find animated GIFs

Generator Tools

  • genpassword <LENGTH> <INCLUDE> - Generate random password
  • randnumber <LENGTH> <MIN> <MAX> - Generate random number
  • license <TEMPLATE> <AMOUNT> - Generate license keys (wildcards: * alpha, % numeric, ? mixed)
  • gennqr <STRING> <SIZE> - Generate QR code
  • randstr <URL_TO_TXT> - Pick random string from text file
  • info <GENDER> - Generate random person info (genders: male/female/all)

Cryptocurrency Tools

  • bitbalance <ADDRESS> - Check Bitcoin balance
  • bitaccelerator <TXN_ID> - Accelerate Bitcoin transaction
  • ethbalance <ADDRESS> - Check Ethereum balance
  • currency <AMOUNT> <FROM> <TO> - Convert currency
  • currencyrate <CURRENCY> - Get currency rates

YouTube Tools

  • ytdetails <VIDEO_ID> - Get YouTube video details
  • yt2mp3 <VIDEO_ID> - Convert YouTube video to MP3

Other Tools

  • iplogger - Create IP logger links
  • eitheror - Get random "would you rather" question

Configuration Priority

The script loads the API key in the following order (first found wins):

  1. Command-line argument: --key <KEY>
  2. Environment variable: C99_API_KEY
  3. Config file: ~/.c99nl or ~/.config/c99nl/config

Output Format

You can control the output format in multiple ways:

  1. Command-line flag: -j or --json
  2. Environment variable: C99_OUTPUT_FORMAT=json

When JSON output is requested, the script will use:

  • jq if available (provides colored, formatted output)
  • json_pp as fallback (Perl JSON formatter)
  • Raw output if neither is installed

Troubleshooting

"curl is required but not installed"

Install curl:

# Ubuntu/Debian
sudo apt-get install curl

# macOS
brew install curl

# Windows (Git Bash includes curl)

"No API key found"

Make sure you've set your API key using one of the methods described in Installation.

JSON output not formatted

Install jq for better JSON formatting:

# Ubuntu/Debian
sudo apt-get install jq

# macOS
brew install jq

Changelog

Version 2.0.0

  • Breaking Change: API key must now be set externally (not hardcoded in script)
  • Added proper argument parsing with long options support
  • Added --json / -j flag for JSON output
  • Added --verbose / -v flag for debugging
  • Added --key option to override API key per request
  • Improved error handling and input validation
  • Added dependency checks
  • Added comprehensive help documentation
  • Refactored code into modular functions
  • Added URL encoding for special characters
  • Better output formatting

Version 1.0.0

  • Initial release with basic functionality

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

This tool is provided as-is for use with C99.nl API services. Please review C99.nl's terms of service before use.

Credits

Created for the C99.nl API community. This is an unofficial tool and is not affiliated with C99.nl.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages