Advertisement
jackieradallhazik

test ip vietnamese or not python

Mar 4th, 2015
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import random
  2. import urllib2
  3. i=0
  4. mylist = ['']
  5. while i < 1000:
  6. tip1 = 27
  7. tip2 = random.randint(70, 80)
  8. tip3 = random.randint(20, 30)
  9. tip4 = random.randint(60, 70)
  10. ip = str(tip1)+'.'+str(tip2)+'.'+str(tip3)+'.'+str(tip4)
  11. addr = 'http://'+ip+'.ipaddress.com/'
  12. temp = urllib2.urlopen(addr)
  13. data = temp.read()
  14. if (data.count('lags/vn.gif') > 1):
  15. print ip
  16. i = i + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement