1 #coding=utf-8
2 import urllib2
3 import threading
4 from time import ctime,sleep
5 print "Start-Time : %s" %ctime()
6 f = open("C:\Users\sm0nk\Desktop\ip.txt","r")
7 lines = f.readlines()
8 for line in lines:
9 url = ‘http://‘+line.strip(‘\n‘)+‘:10000‘
10 try:
11 r = urllib2.urlopen(url,timeout=1)
12 if r.getcode() == 200:
13 print url
14 except Exception as e : pass
15 f.close()
16 print "Stop--Time : %s" %ctime()