Complete Documentation
Detailed guide for using 3g-scan
▶️ Basic Usage
3g-scan -ranges <CIDR[,CIDR,...]> [options]
CLI Options
| Flag | Description |
|---|---|
-ranges |
IP ranges to scan (comma-separated CIDRs) |
-p_scan |
Enable or disable port scanning |
-routine |
Enable concurrent scanning (goroutines) |
-debug |
Enable debug logging |
-csv |
Export results to a CSV file |
-yaml |
Export results to a YAML file |
📚 Usage Examples
Basic Scan
Scan a single network range
sudo ./3g-scan -ranges 192.168.1.0/24
Full Scan with Exports
Scan multiple ranges with port scanning and exports
sudo ./3g-scan \
-ranges 192.168.1.0/24,10.0.0.0/24 \
-p_scan true \
-routine true \
-csv results.csv \
-yaml results.yaml
Windows (Administrator)
Usage on Windows PowerShell
.\3g-scan.exe -ranges 192.168.1.0/24
🧠 How 3g-scan Works
1
CIDR Expansion
Convert CIDR ranges into individual IP addresses
2
ICMP Ping
Test availability of each host with native ICMP
3
Information Gathering
For active hosts: DNS resolution, MAC, vendor, ports
4
Aggregation
Compile results into a unified structure
5
Export
Generate CSV and/or YAML files if requested
🖥️ Multi-Platform Support
| OS | Ping | MAC | Hostname | Ports |
|---|---|---|---|---|
| Windows | ✅ | ARP cache | ✅ | ✅ |
| Linux | ✅ | Native ARP | ✅ | ✅ |
| macOS | ✅ | Native ARP | ✅ | ✅ |
🏢 Use Cases
🏢 Enterprise Networks
- Asset discovery
- Shadow IT detection
- Network audits
- Inventory generation
- Segmentation validation
🏠 Personal / Lab Usage
- Home network discovery
- Device identification
- IoT visibility
- Learning network concepts
⚠️ Limitations
MAC addresses are only available on the local network
ARP does not work across routed networks or VLANs
Firewalls may block ICMP or TCP probes
OS detection is heuristic, not guaranteed
📦 Project Structure
3g-scan/
├── main.go
├── ggg_network/
│ ├── cidrLister.go
│ ├── pinger.go
│ ├── hostnamer.go
│ ├── maccer.go
│ ├── portScanner.go
│ └── resources/
│ └── ieee-oui.txt
└── README.md
🛣️ Roadmap
- TUI interface
- JSON export
- Enhanced OS fingerprinting
- Custom port lists
- Vendor database optimization
- Profiling and scan statistics
⭐ Contribute
Contributions are welcome! Feel free to open issues or submit pull requests.
Contribute on GitHub