Comprehensive Network Intelligence Platform for China's Decimal Network
One-command installation:
./setup.shThree ways to use:
ipv9scan # π― Interactive TUI with real-time logs
ipv9api # π REST API server
ipv9tool # π₯οΈ CLI tool for scriptingThat's it! See INSTALL.md for detailed installation and usage guide.
IPv9 is China's experimental "decimal network" that uses:
- Numeric domain names based on phone numbers (e.g.,
8613812345678.chn) - Special DNS servers (202.170.218.93 and 61.244.5.162) that intercept
.chnqueries - Standard IP routing - domains resolve to normal IPv4/IPv6 addresses
- DNS overlay architecture - no new protocol stack required
Example IPv9 sites:
www.v9.chnem777.chnwww.hqq.chn
IPv9 Scanner provides comprehensive tools to explore, enumerate, and audit this network infrastructure.
Professional tactical interface with TEMPEST-compliant design:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
CLASSIFICATION: UNCLASSIFIED β SYSTEM: IPVNINER β FACILITY: TNOC
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SYSTEM STATUS β β TACTICAL NETWORK INTELLIGENCE β
β ββββββββββββββββββββ£ β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
β SYS STATUS: β β β DOMAINS DISCOVERED: 1,245 β
β INTEGRITY: β β β IP ADDRESSES: 3,891 β
β ZULU TIME: 141530Zβ β ACTIVE HOSTS: 567 β
β UPTIME: 02:45:13β β PORTS IDENTIFIED: 2,134 β
βββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββ TACTICAL OPERATIONS βββββββββββββββββββββββββββββ
β PRIMARY OPS: [DNS RESOLVE] [PING SWEEP] [PORT SCAN] [ENUMERATE] β
β ADV OPS: [FULL AUDIT] [MASSCAN] [MONITOR] [β STOP] β
β TARGET: www.v9.chn or IPv4/IPv6 β
β MISSION PROGRESS: βββββββββββββββββββββββ 60% β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββ TACTICAL LOG ββββββββββββββββββββββββββββββββββββ
β 124530Z β OPR MISSION 1000: DNS RESOLUTION OPERATION β
β 124531Z βΊ INF TARGET: www.v9.chn β
β 124532Z β OPS DNS RESOLUTION: SUCCESS β
β 124532Z βΊ INF βΊ RESOLVED ADDRESS: 1.2.3.4 β
β 124535Z β OPR MISSION 1001: PORT SCAN OPERATION β
β 124536Z β OPS PORT SCAN: 3 PORTS IDENTIFIED β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
CLASSIFICATION: UNCLASSIFIED β FACILITY: TNOC β SYSTEM: IPVNINER
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Military-Grade Features:
- ποΈ TEMPEST-Compliant: High-contrast green-on-black phosphor terminal
- β° Zulu Time: Military UTC time format (DDHHMMSSZMONyy)
- π Security Banners: Classification markings (UNCLASSIFIED)
- π― Mission System: Sequential operation tracking (MISSION 1000, 1001...)
- π Tactical Intelligence: Real-time network statistics
- π₯οΈ Military Terminology: OPERATIONAL, SECURE, NOMINAL status
- β‘ Real-time Logs: Streaming with tactical formatting (ββΊββ²ββ )
- π Secure Design: Minimal emissions, monospace grid layout
- β¨οΈ Tactical Keys: Q=ABORT, S=STATUS, L=CLEAR LOG, H=HELP, R=REFRESH
- π¨ Professional Polish: Grid-based layout, double borders, hover effects
See docs/TEMPEST_MILITARY_THEME.md for complete design documentation
Production-ready FastAPI server with OpenAPI documentation:
# Start server
ipv9api
# Access documentation
open http://localhost:8000/docsFeatures:
- π 15+ REST endpoints
- π Automatic OpenAPI/Swagger docs
- βοΈ Background job processing
- πΎ SQLite database backend
- π Async I/O (1000+ req/s)
- π CORS support
Quick API Examples:
from ipv9tool.api.client import IPv9APIClient
client = IPv9APIClient("http://localhost:8000")
# DNS resolution
result = client.resolve("www.v9.chn")
print(result.addresses) # ['1.2.3.4']
# Port scan
scan = client.scan("em777.chn", ports="80,443")
for host in scan.hosts:
for port in host.ports:
print(f"{port.port}: {port.state}")
# Full network audit (background job)
job = client.start_audit(scan_dns=True, scan_web=True)
result = client.wait_for_job(job.job_id, timeout=3600)
# Export results
from ipv9tool.export import DataExporter
exporter = DataExporter()
exporter.export_audit_results(
result.result,
output_dir='./reports',
formats=['json', 'html', 'csv']
)Command-line interface for scripting and automation:
# DNS resolution
ipv9tool resolve www.v9.chn
# Ping test
ipv9tool ping em777.chn
# Port scanning
ipv9tool scan em777.chn --ports 80,443,8080
# Domain enumeration
ipv9tool enumerate --pattern "861381234NNNN" --max-results 100
# Cache statistics
ipv9tool cache-statsβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IPv9 Scanner Platform β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β User Interfaces β
β βββ ipv9scan - Interactive TUI (Textual) β
β βββ ipv9api - REST API Server (FastAPI) β
β βββ ipv9tool - CLI Tool (Click) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Core Capabilities β
β βββ DNS Resolution (IPv9 .chn domains) β
β βββ Port Scanning (nmap/masscan) β
β βββ Host Discovery (ICMP, TCP probes) β
β βββ Domain Enumeration (pattern-based) β
β βββ Network Auditing (6-phase methodology) β
β βββ Masscan Integration (10M pps) β
β βββ Continuous Monitoring (change detection) β
β βββ Multi-format Export (JSON/CSV/HTML/MD) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Backend Services β
β βββ SQLite Database (async) β
β βββ Background Job System β
β βββ DNS Cache (LRU) β
β βββ Rate Limiting (token bucket) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Query IPv9 DNS servers for
.chndomains - Multi-server verification (detect spoofing)
- LRU caching with configurable TTL
- Support for numeric hostnames (phone numbers)
- ICMP Ping: Traditional ping probes
- TCP Ping: Connection-based detection
- HTTP/HTTPS Probing: Web service detection
- Parallel Discovery: Multi-threaded scanning
- Nmap Integration: Service detection, OS fingerprinting
- Masscan Support: High-speed scanning (up to 10M packets/second)
- Customizable Ranges: Specific ports or full range (1-65535)
- Service Identification: Banner grabbing, version detection
- Pattern-based: Brute force with wildcards (e.g.,
861381234NNNN) - Phone Number Ranges: Chinese mobile prefixes (130-199)
- Wordlist Discovery: Custom domain lists
- Parallel Enumeration: 10 concurrent threads (configurable)
Comprehensive 6-phase methodology:
- DNS Infrastructure (20%) - Test IPv9 DNS servers, verify resolution
- Domain Enumeration (40%) - Pattern-based, phone number scanning
- Host Discovery (60%) - ICMP ping, TCP probing, HTTP detection
- Port Scanning (80%) - Common ports (fast) or all ports (comprehensive)
- Deep Inspection (90%) - HTTP/HTTPS probing, service fingerprinting
- Analysis & Reporting (100%) - Statistics, security scoring, recommendations
- High-speed Enumeration: Full IPv9 space scanning
- Scan Planning: Time/coverage calculations
- Sample-based Scanning: Configurable sample rates
- IPv9 Address Blocks: Covers 40+ Chinese /8 IP blocks
- Real-time Change Detection: Automatic notification of network changes
- Configurable Intervals: Custom monitoring frequency
- Callback System: Hook into change events
- Status Tracking: Timestamps and change history
- JSON: Machine-readable full data
- CSV: Spreadsheet-compatible lists
- XML: Structured data export
- HTML: Interactive visual reports with styling
- Markdown: Documentation-friendly reports
- Rate Limiting: Token bucket algorithm to control scan speed
- Input Validation: Pydantic models for all API inputs
- SQL Injection Prevention: Parameterized queries throughout
- Privilege Dropping: Run with minimal required permissions
- Sandbox Mode: Isolated execution environment
- Audit Logging: Comprehensive logging of all operations
- DNS Verification: Multi-server response validation
- INSTALL.md - Installation and quick start guide
- docs/GUIDE.md - Comprehensive user guide
- docs/API.md - API reference (1000+ lines)
- docs/API_QUICKSTART.md - API quick start
- API_ENHANCEMENT_SUMMARY.md - Enhancement details
Complete usage examples in examples/ directory:
# Basic API operations
python examples/basic_api_usage.py
# Full enumeration
python examples/full_enumeration.py
# Network audit
python examples/network_audit.py
# Continuous monitoring
python examples/continuous_monitoring.py
# Masscan full scan
python examples/masscan_full_scan.pyEdit /etc/ipv9tool/ipv9tool.yml:
dns:
servers:
- 202.170.218.93 # IPv9 DNS Primary
- 61.244.5.162 # IPv9 DNS Secondary
cache_ttl: 3600
timeout: 5
scanning:
default_ports: "21,22,23,25,80,443,3389,8080,8443"
rate_limit: 100
max_threads: 10
audit:
enable_masscan: true
deep_scan: false
export_format: ["json", "html"]- Total Modules: 33 Python files
- Code Lines: ~8,000 (including documentation)
- API Endpoints: 15+ REST endpoints
- Database Tables: 4 (hosts, ports, domains, scans)
- Export Formats: 5 (JSON, CSV, XML, HTML, Markdown)
- Documentation: 3,000+ lines
- OS: Ubuntu 20.04+, Debian 10+, or similar
- Python: 3.7+
- RAM: 2GB minimum, 4GB recommended
- Disk: 1GB for installation, more for scan results
- Network: Outbound access to IPv9 DNS servers
Dependencies:
- System: nmap, masscan, dnsmasq, dnsutils, sqlite3
- Python: fastapi, textual, rich, dnspython, pyyaml, aiosqlite
# Using TUI
ipv9scan
# Enter domain, click "Resolve DNS"
# Using API
curl -X POST http://localhost:8000/dns/resolve \
-H "Content-Type: application/json" \
-d '{"hostname": "www.v9.chn"}'
# Using CLI
ipv9tool resolve www.v9.chn# Using TUI
ipv9scan
# Enter target, click "Port Scan"
# Using API
python -c "
from ipv9tool.api.client import IPv9APIClient
client = IPv9APIClient('http://localhost:8000')
scan = client.scan('em777.chn', ports='1-1000')
print(scan)
"
# Using CLI
ipv9tool scan em777.chn --ports 1-1000# Using TUI
ipv9scan
# Click "Full Audit" button
# Using API
python examples/network_audit.py
# Using CLI (enumeration only)
ipv9tool enumerate --pattern "861381234NNNN" --max-results 10000Contributions are welcome! Please read our contributing guidelines and submit pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for authorized security testing, research, and educational purposes only. Always obtain proper authorization before scanning networks you do not own or have permission to test.
- Inspired by HDAIS workflow and masscan architecture
- Built with FastAPI, Textual, Rich, and other excellent open-source projects
- IPv9 DNS servers provided by China's decimal network infrastructure
- Documentation: See
docs/directory - Examples: See
examples/directory - API Docs: http://localhost:8000/docs (when API running)
- Issues: https://github.com/SWORDIntel/IPVNINER/issues
Happy scanning! π