Skip to content

Instantly share code, notes, and snippets.

@axiaoxin
Created March 2, 2018 05:43
Show Gist options
  • Save axiaoxin/9072ff3e80c677097b04883cdbe70d5a to your computer and use it in GitHub Desktop.
Save axiaoxin/9072ff3e80c677097b04883cdbe70d5a to your computer and use it in GitHub Desktop.
gen_ips.py
from IPy import IP
start_ip = IP('181.0.0.3')
count = 1000
filename = '%sips.txt' % count
ips = [IP(start_ip.int() + i).strNormal() + '\n' for i in range(count)]
with open(filename, 'w') as f:
f.writelines(ips)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment