Last active
July 12, 2018 21:29
-
-
Save Dapacruz/41245a732c7efd10548e3ad1c85f681c to your computer and use it in GitHub Desktop.
Nmap Ping Sweep of Multiple Subnets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subnets = @( | |
'10.1.1.253/22' | |
'10.10.10.252/24' | |
'10.1.20.253/24' | |
'10.120.10.252/22' | |
'10.220.10.252/22' | |
'10.254.254.253/24' | |
'10.100.1.249/22' | |
'10.200.1.249/22' | |
'10.30.1.251/22' | |
'10.40.1.251/22' | |
) | |
foreach ($subnet in $subnets) {Invoke-Expression "nmap -sn -T5 --min-parallelism 100 --max-parallelism 256 -n --host-timeout 10 -oG - $subnet" | Select-String -Pattern '#'; Write-Host} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment