Enthält: - rdp_client.py: RDP Client mit GUI und Monitor-Auswahl - rdp.sh: Bash-basierter RDP Client - teamleader_test/: Network Scanner Fullstack-App - teamleader_test2/: Network Mapper CLI Subdirectories mit eigenem Repo wurden ausgeschlossen. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
""" Quick Start Guide - Network Scanner
This guide will help you get started with the network scanner quickly.
Step 1: Setup
Run the setup script:
./start.sh
Or manually:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
Step 2: Start the Server
python main.py
The server will start at http://localhost:8000
Step 3: Use the API
Option 1: Web Interface
Open http://localhost:8000/docs in your browser for interactive API documentation.
Option 2: Command Line Interface
# Scan a network
python cli.py scan 192.168.1.0/24
# List hosts
python cli.py hosts
# Show topology
python cli.py topology
# Show statistics
python cli.py stats
Option 3: Python API
from examples.usage_example import NetworkScannerClient
import asyncio
async def quick_scan():
client = NetworkScannerClient()
scan_id = await client.start_scan("192.168.1.0/24")
result = await client.wait_for_scan(scan_id)
print(f"Found {result['hosts_found']} hosts")
asyncio.run(quick_scan())
Option 4: REST API
# Start a scan
curl -X POST http://localhost:8000/api/scans/start \
-H "Content-Type: application/json" \
-d '{
"network_range": "192.168.1.0/24",
"scan_type": "quick",
"use_nmap": false
}'
# Get hosts
curl http://localhost:8000/api/hosts
# Get topology
curl http://localhost:8000/api/topology
Common Use Cases
1. Quick Network Discovery
python cli.py scan 192.168.1.0/24 quick
python cli.py hosts
2. Detailed Port Scan
python cli.py scan 192.168.1.100 deep
3. Monitor Network Changes
Run periodic scans and compare results in the database.
4. Visualize Network
python cli.py topology
Access the topology data at http://localhost:8000/api/topology
Configuration
Edit .env file to customize:
# Scan faster with more workers
MAX_CONCURRENT_SCANS=100
# Enable nmap integration
ENABLE_NMAP=True
# Change default network
DEFAULT_NETWORK_RANGE=192.168.0.0/24
Troubleshooting
No hosts found?
- Check the network range is correct
- Verify you can ping hosts on that network
- Try increasing the timeout:
DEFAULT_SCAN_TIMEOUT=5
Scans too slow?
- Use "quick" scan type instead of "standard" or "deep"
- Increase concurrent scans:
MAX_CONCURRENT_SCANS=100 - Disable service detection in scan request
Permission errors?
- Socket-based scanning doesn't require root
- If using nmap with OS detection, you'll need root:
sudo python main.py
Next Steps
- Integrate with your frontend application
- Set up scheduled scans
- Export topology data
- Add custom service detection rules
- Configure alerting for network changes
Need Help?
- Check the full README.md
- View API docs at http://localhost:8000/docs
- Review logs at logs/network_scanner.log
- Check the examples/ directory for more code samples
Happy scanning! 🔍