Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import ipaddress
- import urllib.request
- ips=[]
- resp = urllib.request.urlopen("http://www.vpngate.net/api/iphone/")
- data = resp.read().decode('utf-8').split(',')
- for value in data:
- try:
- ips.append(ipaddress.IPv4Address(value))
- except:
- pass
- with open("ips.txt","w+") as ipfile:
- for ip in ips:
- ipfile.write(str(ip))
- ipfile.write("\r\n")
- ipfile.close
Advertisement
Add Comment
Please, Sign In to add comment