Basic Usage

Learn how to use NetScan's core features through the command line interface and interactive menu.

Interactive Menu

The easiest way to use NetScan is through its interactive menu. Just run:

netscan

This presents a menu with all available options:

╔════════════════════════════════════════════════════════════════════════════╗
║                    NetScan - Network Discovery Tool                        ║
╚════════════════════════════════════════════════════════════════════════════╝

  1) MAC Address Lookup          - Look up vendor by MAC address
  2) Scan Network (Quick)        - Fast network discovery
  3) Scan Network (Full)         - Deep scan with port detection
  4) View Network Interfaces     - Show available interfaces
  5) Monitor Network             - Real-time network monitoring
  6) Export Results              - Export scan data to file
  7) Start Web Interface         - Launch browser-based interface
  8) Settings                    - Configure NetScan
  9) Update OUI Database         - Download latest vendor data
  0) Exit

Enter choice:

Command Line Interface

For scripting or quick operations, use command-line flags:

MAC Address Lookup

# Look up a single MAC address
netscan -l 00:11:22:33:44:55
netscan --lookup 00:11:22:33:44:55

# Different MAC formats are accepted
netscan -l 00-11-22-33-44-55
netscan -l 001122334455
netscan -l 00:11:22:33:44:55

Network Scanning

# Quick scan (ARP + ping)
netscan -s
netscan --scan

# Full scan with port detection
netscan -f
netscan --full

# Scan specific subnet
netscan -s -t 192.168.1.0/24
netscan --scan --target 10.0.0.0/24

# Specify interface
netscan -s -i en0
netscan --scan --interface eth0

Output Formats

# JSON output
netscan -s --json

# CSV output
netscan -s --csv

# Export to file
netscan -s --output results.json
netscan -s -o scan_results.csv

Web Interface

# Start web server
netscan -w
netscan --web

# Custom port
netscan -w -p 9000
netscan --web --port 9000

MAC Address Lookup

Look up the manufacturer of any network device by its MAC address.

Single Lookup

$ netscan -l 00:50:56:C0:00:08

MAC Address: 00:50:56:C0:00:08
Vendor: VMware, Inc.
OUI: 00:50:56

Batch Lookup

Look up multiple MAC addresses from a file:

# Create a file with MAC addresses (one per line)
cat > mac_list.txt << EOF
00:50:56:C0:00:08
AC:DE:48:00:11:22
00:1A:2B:3C:4D:5E
EOF

# Batch lookup
netscan -b mac_list.txt
netscan --batch mac_list.txt

Search by Vendor

# Find all Apple devices
netscan --vendor Apple

# Find Cisco devices
netscan --vendor Cisco

Network Scanning

Discover devices on your local network with detailed information.

Quick Scan

Fast discovery using ARP and ping:

$ netscan -s

Scanning 192.168.1.0/24...

IP Address      MAC Address         Hostname        Vendor
────────────────────────────────────────────────────────────────
192.168.1.1     00:11:22:AA:BB:CC   router.local    Netgear
192.168.1.10    AC:DE:48:00:11:22   macbook.local   Apple, Inc.
192.168.1.15    B8:27:EB:12:34:56   raspberrypi     Raspberry Pi
192.168.1.20    00:50:56:C0:00:08   vm-server       VMware, Inc.

Found 4 devices in 12.3 seconds

Full Scan

Deep scan including open ports:

$ netscan -f

[*] Starting full network scan...
[*] Target: 192.168.1.0/24
[*] Scanning 254 hosts...

IP Address      MAC Address         Vendor          Open Ports
────────────────────────────────────────────────────────────────
192.168.1.1     00:11:22:AA:BB:CC   Netgear         80, 443
192.168.1.10    AC:DE:48:00:11:22   Apple, Inc.     22, 5900
192.168.1.15    B8:27:EB:12:34:56   Raspberry Pi    22, 80, 8080
192.168.1.20    00:50:56:C0:00:08   VMware, Inc.    22, 80, 443, 3389

Found 4 devices with 10 open ports in 45.2 seconds

Custom Target

# Scan specific subnet
netscan -s -t 10.0.0.0/24

# Scan IP range
netscan -s -t 192.168.1.1-192.168.1.50

# Scan single host
netscan -f -t 192.168.1.100

Network Monitoring

Monitor your network in real-time for new devices and changes.

Start Monitoring

$ netscan -m

[*] Starting network monitor...
[*] Monitoring 192.168.1.0/24
[*] Press Ctrl+C to stop

[14:32:15] New device: 192.168.1.25 (Apple, Inc.) AC:DE:48:XX:XX:XX
[14:35:42] Device offline: 192.168.1.20 (VMware, Inc.)
[14:40:18] New device: 192.168.1.30 (Unknown) 00:00:00:XX:XX:XX

Monitor with Alerts

# Send desktop notifications
netscan -m --notify

# Log to file
netscan -m --log monitor.log

# Custom interval (seconds)
netscan -m --interval 30

Exporting Results

Export scan results in various formats for analysis or reporting.

Export Formats

# JSON
netscan -s --json > results.json
netscan -s -o results.json

# CSV  
netscan -s --csv > results.csv
netscan -s -o results.csv

# XML
netscan -s -o results.xml

# HTML Report
netscan -s --report report.html

JSON Output Example

{
  "scan_info": {
    "timestamp": "2024-01-15T14:32:00Z",
    "target": "192.168.1.0/24",
    "scan_type": "quick"
  },
  "devices": [
    {
      "ip": "192.168.1.1",
      "mac": "00:11:22:AA:BB:CC",
      "vendor": "Netgear",
      "hostname": "router.local",
      "status": "online"
    },
    {
      "ip": "192.168.1.10",
      "mac": "AC:DE:48:00:11:22",
      "vendor": "Apple, Inc.",
      "hostname": "macbook.local",
      "status": "online"
    }
  ],
  "summary": {
    "total_devices": 2,
    "scan_duration": "12.3s"
  }
}

Common Workflows

Audit Network Devices

# Full scan and export
netscan -f -o audit_$(date +%Y%m%d).json

# Compare with previous scan
diff previous_audit.json audit_20240115.json

Find Specific Device

# Scan and filter for specific vendor
netscan -s --json | jq '.devices[] | select(.vendor | contains("Apple"))'

# Find devices with specific open port
netscan -f --json | jq '.devices[] | select(.ports | contains([22]))'

Scheduled Monitoring

# Add to crontab for hourly scans
crontab -e

# Add this line:
0 * * * * /usr/local/bin/netscan -s -o ~/scans/scan_$(date +\%H).json

Docker Network Audit

# Scan Docker network
docker run --rm --network host --cap-add NET_RAW netscan -s -t 172.17.0.0/16

Tips & Best Practices

💡 Pro Tips:
  • Use sudo for best results: Some scanning methods require root privileges
  • Start with quick scan: Use -s for initial discovery, -f for detailed info
  • Update OUI database: Run netscan --update-oui monthly for accurate vendor info
  • Pipe to jq: Use --json | jq for powerful filtering
  • Quiet networks: Large networks may need longer timeouts
⚠️ Legal Notice:

Only scan networks you own or have explicit permission to scan. Unauthorized network scanning may be illegal in your jurisdiction.