| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,8 @@ | |||
| 1 | 1 | #!/usr/bin/python | |
| 2 | + #coding:utf-8 | ||
| 2 | 3 | import multiprocessing | |
| 3 | 4 | import re | |
| 4 | - import sys | ||
| 5 | + import sys,os | ||
| 5 | 6 | import commands | |
| 6 | 7 | import datetime | |
| 7 | 8 | def pinger(ip): | |
@@ -21,6 +22,9 @@ def pinger(ip): | |||
| 21 | 22 | ||
| 22 | 23 | ||
| 23 | 24 | if __name__ == "__main__": | |
| 25 | + if not os.path.exists("hosts.txt") : | ||
| 26 | + print "\033[31mhosts.txt文件不存在,请重试\033[0m" | ||
| 27 | + sys.exit(1) | ||
| 24 | 28 | now=datetime.datetime.now() | |
| 25 | 29 | file=open('hosts.txt','r') | |
| 26 | 30 | pool=multiprocessing.Pool(processes=4) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments