PowerShell_IPv4PortScanner icon indicating copy to clipboard operation
PowerShell_IPv4PortScanner copied to clipboard

Scanning multiple devices?

Open dave-ps1 opened this issue 4 years ago • 1 comments

Thank you for sharing this great tool. Is there a way to make it scan multiple devices? I tried but wasn't able to get it to work. I don't want to mess up your tool. Can you alter it to scan more than one device at a time please. Thanks.

dave-ps1 avatar Nov 19 '21 14:11 dave-ps1

Maybe i can allow the same input for hosts as in this script: https://github.com/BornToBeRoot/PowerShell_IPv4NetworkScanner

BornToBeRoot avatar Nov 19 '21 19:11 BornToBeRoot

I was able to run it inside a for loop with a range of hosts. I mean, it's a script, so I'm using it accordingly.

I'm not sure if modifying the script is the best thing, but there might be some advice to add to the README.

When I run it with the default 500 threads, it returns a lot of false "open" ports. I dropped down to 30 threads and stopped getting false positives. The problem is not in the code, though. Maybe a Windows bug, or something weird about the network. In any case, it is 30x faster than what I was getting on my own!

$network="10.0.0"
$range= (2..126)

cd <path to the Scripts directory>

foreach ($ip in $range) {
    $t=("$network"+"."+"$ip")
    .\IPv4PortScan.ps1 -ComputerName $t -EndPort 8889 -Threads 30
    }

zaphodbeeblebrox3rd avatar Aug 10 '22 22:08 zaphodbeeblebrox3rd

I confirmed the false positives were the result of an obfuscation tool on the target network - my mistake. This script is great, thanks for sharing it!

zaphodbeeblebrox3rd avatar Aug 12 '22 16:08 zaphodbeeblebrox3rd

I close this because there are a few solutions how to implement it yourself. You can also use the script i mentioned above.

PRs are welcome, but this feature has no priory. Best is to keep this script simple.

Btw. some firewalls also block the requests when doing ping/port scan in mass.

BornToBeRoot avatar Aug 12 '22 20:08 BornToBeRoot