Posted by michael schurter on Tue 18 Sep 14:52
report abuse | View followups from Anonymous and Bryan | download | new post
- from socket import gethostbyname_ex
- data = set()for name in file('proxies.txt').readlines():
- name = name.strip()
- if name:
- try:
- result = gethostbyname_ex(name)
- except:
- continue # Unable to resolve
- for ip in result[2]:
- data.add(ip)
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.