Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit c4cd73a

Browse files
webstersprodigyclymb3r
authored andcommitted
Fix for hostfiles option in powershell 2
1 parent a40e79d commit c4cd73a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Recon/Invoke-Portscan.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,14 +647,14 @@ http://webstersprodigy.net
647647

648648
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
649649

650-
if ($Hosts)
650+
if ($PsCmdlet.ParameterSetName -eq "cmdHosts")
651651
{
652652
foreach($h in $Hosts)
653653
{
654654
Parse-Hosts($h) | Out-Null
655655
}
656656
}
657-
elseif ($HostFile)
657+
else
658658
{
659659
Parse-ILHosts($HostFile) | Out-Null
660660
}

0 commit comments

Comments
 (0)