feat: NAPALM driver for Windows over PowerShell Remoting

Talks PSRP over WinRM via pypsrp, one runspace pool per connection. Each
getter sends one PowerShell script that projects cmdlet results onto flat
fields and ends in ConvertTo-Json, so the Python side parses JSON, not text.

Covers facts, interfaces, IP addresses, ARP, routes and services, plus
service start/stop/restart/enable/disable. Service names are validated and
quoted as PowerShell verbatim strings, typographic quotes included.

Fixtures are synthetic: they pin down the JSON the scripts are designed to
emit. tools/harvest.py records the real output from a host.

Refs christianmanivong/netork#300
This commit is contained in:
Christian Manivong
2026-09-24 09:23:25 +02:00
commit 1ce42ef099
18 changed files with 1435 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
[
{"name": "WinRM", "state": "Running", "start_mode": "Auto", "pid": 1234},
{"name": "Spooler", "state": "Stopped", "start_mode": "Manual", "pid": 0},
{"name": "MSSQL$SQLEXPRESS", "state": "Running", "start_mode": "Auto", "pid": 4321},
{"name": "RemoteRegistry", "state": "Stopped", "start_mode": "Disabled", "pid": 0},
{"name": "wuauserv", "state": "Stopped", "start_mode": "Manual", "pid": null}
]