BornToBeRoot / PowerShell_IPv4PortScanner

Powerful asynchronus IPv4 port scanner for PowerShell
GNU General Public License v2.0
229 stars 54 forks source link

Had to make a change to avoid $null errors #4

Closed OutOfThisPlanet closed 2 years ago

OutOfThisPlanet commented 2 years ago

I don't know how to make a commit on GitHub, so I will just comment here:

I have changed the following line :

$Service = $PortsHashTable.Get_Item($Job_Result.Port).Split('|')

To this :

if ($PortsHashTable.Get_Item($Job_Result.Port))
{
    $Service = $PortsHashTable.Get_Item($Job_Result.Port).Split('|')
}
else
{
    $service = @("Unknown","Unknown")
}

This is because there are $null errors for certain SharePoint ports, which messes up the output in the console window.

BornToBeRoot commented 2 years ago

Thanks!