Open raphaelm opened 9 years ago
Sorry, I accidentally wasn’t watching this repository on GitHub, so I never noticed you sent this!
As for the PR itself, the output looks like this on my system:
$ net status sessions parseable
11859\s-michael\s-private\\10.0.0.76
So, just parsing the fourth field instead of the fifth field will not work for both of us. Can you change the code so that it tries parsing the fifth field and falls back on the forth please?
Currently, dramaqueen parses the
hostname
part of the outputnet status sessions parseable
. In my network setup, however, there are cases where the hostname of the client is unknwon andnet status
therefore outputs something like this:Pinging
ipv4:192.168.0.10:39509
obviously fails, so the more robust way is to parse theremote_machine
column which, on my systems, contains a raw IP address.