Skip to content

Instantly share code, notes, and snippets.

@prachauthit
Created August 13, 2019 08:45
Show Gist options
  • Save prachauthit/b59506de2b6c769e04fed12c25103055 to your computer and use it in GitHub Desktop.
Save prachauthit/b59506de2b6c769e04fed12c25103055 to your computer and use it in GitHub Desktop.
import netaddr
"""
For example,
Please scan every ip on 191.0.0.0/16 range but not 191.0.0.10.
Then:
ipcalc 191.0.0.0/16
Get from the Hostmin as start and Hostmax as end
pipe to file and use sublime to find it and remove the whitelised ip
please be careful that 191.0.0.10 can match with 191.0.0.100
please double check before use with nmap or nessus
"""
start = "191.0.0.1"
end = "191.0.255.254"
for i in netaddr.iter_iprange(start, end) :
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment