Kevin-Robertson / Inveigh

.NET IPv4/IPv6 machine-in-the-middle tool for penetration testers
BSD 3-Clause "New" or "Revised" License
2.44k stars 432 forks source link

cant set nbms types #19

Open chppppp opened 4 years ago

chppppp commented 4 years ago
PS C:\Windows\System32\spool\drivers\color> Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes
 '00,20,03,1B,1C' -MachineAccounts Y
Invoke-Inveigh : Cannot validate argument on parameter 'NBNSTypes'. The argument "00,20,03,1B,1C" does not belong to
the set "00,03,20,1B,1C,1D,1E" specified by the ValidateSet attribute. Supply an argument that is in the set and then
try the command again.
At line:1 char:78
+ Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes '00 ...
+                                                                              ~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Inveigh], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-Inveigh
chppppp commented 4 years ago

without the quotes:

PS C:\Windows\System32\spool\drivers\color> Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes
 00,20,03,1B,1C -MachineAccounts Y
Invoke-Inveigh : Cannot validate argument on parameter 'NBNSTypes'. The argument "0" does not belong to the set
"00,03,20,1B,1C,1D,1E" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the
command again.
At line:1 char:78
+ Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes 00, ...
+                                                                              ~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Inveigh], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-Inveigh
chppppp commented 4 years ago

this works, notice the quotes around the 00.

Invoke-Inveigh -ConsoleOutput Y -NBNS Y -mDNS Y -HTTPS Y -Proxy Y -NBNSTypes '00',20,03,1B,1C -MachineAccounts Y

Kevin-Robertson commented 4 years ago

Is that on Windows 10? I just tested this and it works as documented with Windows 7 but errors out on Windows 10. For me though, both 00 and 03 needed quotes.

chppppp commented 4 years ago

Yes! sorry! Win10 and yes, I did have to quote '03' as well.

chppppp commented 4 years ago

looks like anything starting with 0 is being treated as an int