No description
Find a file
MoCipher 346cfe8fe6 Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes
Enhancements:
- ANSI colored output with auto TTY detection and --no-color flag
- Global --json flag for structured output on all commands
- TLS certificate checker (tlscheck) — cert expiry, SANs, cipher suite, TLS version
- HIBP breach check integrated into password audit via k-anonymity API
- Subdomain enumeration (subenum) with built-in 120-entry wordlist + custom wordlist support
- File integrity verification (verify) with auto algorithm detection and exit codes
- Secure password input via getpass when passcheck is called without args

Bug fixes:
- Host discovery now correctly treats ConnectionRefusedError as alive host
- Port range validation (1-65535, start <= end)
- Encryption key files created with 0600 permissions
- Banner grabbing receives first, sends probe only if needed (handles SSH/SMTP correctly)
- File overwrite protection on encrypt/decrypt output
- File size limit (500MB) on encryption to prevent OOM
- Global exception handling with clean error messages
- Removed unused imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-18 21:33:16 +02:00
.gitignore Initial commit 2025-11-20 15:48:10 +01:00
colors.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
file_encryptor.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
hash_utils.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
http_analyzer.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
main.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
network_recon.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
password_audit.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
port_scanner.py Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
README.md Add colored output, JSON mode, TLS checker, HIBP breach check, subdomain enum, and bug fixes 2026-07-18 21:33:16 +02:00
requirements.txt Build fully functional cybersec toolkit with 12 commands 2026-07-18 20:52:08 +02:00

Advanced Cybersecurity Tool

A modular, command-line cybersecurity toolkit for network reconnaissance, file encryption, password auditing, and HTTP security analysis. Built in Python with minimal dependencies.


Features

Module Command Description
Port Scanner scan Threaded TCP port scanner with service identification and optional banner grabbing
Banner Grabber banner Grab service banners from a specific host and port
Host Discovery discover Sweep a subnet to find live hosts (TCP probe on 80/443/22/8080)
DNS Lookup dns Resolve A, AAAA, PTR, and alias records for a hostname
Subdomain Enum subenum Enumerate subdomains using a built-in wordlist or custom file
File Encryption encrypt Encrypt files using Fernet (AES-128-CBC + HMAC-SHA256)
File Decryption decrypt Decrypt .enc files with auto key-file detection
Key Generator keygen Generate and save Fernet encryption keys
Hashing hash Hash strings or files with MD5, SHA-1, SHA-256, or SHA-512
Hash Identifier hashid Identify hash types by format (MD5, SHA, bcrypt, Unix crypt)
Integrity Verify verify Verify a file's hash against an expected value
Password Audit passcheck Score password strength with entropy + HIBP breach check
Password Generator passgen Generate cryptographically secure random passwords
HTTP Header Analysis headers Audit a website's security headers and grade its posture
TLS Certificate Check tlscheck Inspect TLS version, cipher suite, cert expiry, and SANs

Global Flags

Flag Description
--json Output results as structured JSON (for scripting and piping)
--no-color Disable ANSI color output (auto-disabled when piped)

Installation

git clone https://git.mocipher.com/m01/AdvancedCybersecTool.git
cd AdvancedCybersecTool
pip install -r requirements.txt

Usage

python main.py <command> [options]

Port Scanning

# Scan default port range (1-1024)
python main.py scan 192.168.1.1

# Full port scan with banner grabbing, save results
python main.py scan example.com -s 1 -e 65535 -t 200 --banner -o results.txt

# JSON output for scripting
python main.py --json scan 10.0.0.1 -s 20 -e 100

Network Reconnaissance

# Grab a service banner
python main.py banner 192.168.1.1 22

# Discover live hosts on a subnet
python main.py discover 192.168.1.0/24

# DNS lookup
python main.py dns example.com

# Enumerate subdomains (built-in wordlist of ~120 common subs)
python main.py subenum example.com

# Use a custom wordlist
python main.py subenum example.com -w /path/to/wordlist.txt

File Encryption

# Encrypt a file (auto-generates key and saves .key file with 0600 perms)
python main.py encrypt secret.txt

# Encrypt with a specific key
python main.py encrypt secret.txt -k mykey.key

# Decrypt (auto-detects .key file next to the .enc file)
python main.py decrypt secret.txt.enc

# Decrypt with a specific key file
python main.py decrypt secret.txt.enc -k mykey.key

Hashing and Integrity

# Hash a string
python main.py hash "hello world" -a sha256

# Hash a file
python main.py hash /path/to/file -f -a sha512

# Identify a hash type
python main.py hashid "5d41402abc4b2a76b9719d911017c592"

# Verify file integrity (auto-detects algorithm from hash length)
python main.py verify important.bin "e3b0c44298fc1c149afbf4c8996fb924..."

# Returns exit code 0 on match, 1 on mismatch — use in scripts
python main.py verify file.iso "$EXPECTED_SHA256" && echo "OK"

Password Tools

# Audit a password (includes HIBP breach check)
python main.py passcheck "MyP@ssw0rd!"

# Secure prompt (password never in shell history)
python main.py passcheck

# Offline-only check (skip HIBP)
python main.py passcheck "MyP@ssw0rd!" --no-online

# Generate secure passwords
python main.py passgen -l 24 -n 5

# Generate without symbols
python main.py passgen -l 16 --no-symbols

HTTP and TLS Analysis

# Analyze a website's security headers
python main.py headers example.com

# JSON output for CI/CD pipelines
python main.py --json headers example.com

# Inspect TLS certificate details
python main.py tlscheck example.com

# Check a specific port
python main.py tlscheck mail.example.com -p 465

Project Structure

├── main.py             # CLI entry point with global flags and argument routing
├── port_scanner.py     # Threaded port scanner with service detection
├── network_recon.py    # Banner grabbing, host discovery, DNS, subdomain enum
├── file_encryptor.py   # Fernet file encryption/decryption with key management
├── hash_utils.py       # String/file hashing, hash ID, and integrity verification
├── password_audit.py   # Password strength audit, HIBP breach check, generation
├── http_analyzer.py    # HTTP security headers and TLS certificate analysis
├── colors.py           # ANSI color output with TTY auto-detection
├── requirements.txt    # Python dependencies
└── .gitignore          # Excludes keys, certs, scan results, and venvs

Requirements

  • Python 3.8+
  • cryptography (for Fernet encryption)

All other modules use the Python standard library.


Disclaimer

This tool is intended for authorized security testing, educational purposes, and defensive security only. Always obtain proper authorization before scanning networks or systems you do not own. Unauthorized use may violate applicable laws.


License

MIT