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>
1.6 KiB
1.6 KiB
LAN Graph Architecture
Overview
- Scanner: Discovers live IPv4 hosts in the local subnet by pinging each address in the primary CIDR range discovered from
ip -4 addr. Reverse DNS lookups enrich each host node. When SSH is reachable using key-based authentication, the scanner also runsip neigh showremotely to learn neighbor MAC/IP and infers host-to-host connections. - Data Model:
HostNodestores IP, DNS name, reachability, last-seen timestamp, and optionally gathered SSH services;ConnectionEdgelinks nodes with a typed relation (e.g.,gateway,neighbor,ssh) to drive the visualization.ScanResultaggregates nodes, edges, CIDR, gateway, and timestamp. - Web Visualization: FastAPI serves the API plus a D3.js front-end.
/api/scantriggers a fresh scan (or acceptscidroverride) and returns the JSON graph. Static assets live underfrontend/and render the nodes/edges withd3-forceto deliver a Visio-like topology. - CLI/Server: Typing
lan-graph scanruns a JSON scan, andlan-graph servelaunches FastAPI (uvicorn) to host the visual overview and API.
Security & SSH
- Scanner defaults to
ssh -o BatchMode=yes -o ConnectTimeout=5to honor the user's request for key-based auth and to avoid prompting for passwords. - SSH user/key can come from the calling environment via
SSH_USERandSSH_KEY_PATHor CLI flags so credentials are not hard-coded.
Extensibility Points
- Additional probing (SMB, HTTP) can be added via
Scanner.probe_tcp_porthelpers. - Visualization can be enhanced by swapping the D3 force layout for hierarchical or layered diagrams.