-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
If I don't provide the LocalIP for Start-Sniffer it returns an error
Using Local IP: Default
Cannot convert value "Default " to type "System.Net.IPAddress". Error: "Wrong IP Address (Error edited - was in Polish)."
At D:\PoSH\Skrypty\NetworkSniffer\Network-SnifferTools.psm1:762 char:5
+ $Endpoint = New-Object System.Net.IPEndpoint([Net.IPAddress]"$Loc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastParseTargetInvocation
The reason is I have a persistent route with a 0.0.0.0 IP address so the value of LocalIP is 'Default' instead of my IP.
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.254 192.168.1.145 306
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.1.254 Default
===========================================================================
Metadata
Metadata
Assignees
Labels
No labels