Skip to content

Commit 5459aad

Browse files
committed
Ver 0.9.2
1 parent d96b2d6 commit 5459aad

6 files changed

Lines changed: 25 additions & 14 deletions

File tree

‎packed/Main_Gevent.py‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#coding=utf-8
22
#ippool will like [ [ipv4 ips] , [v6 ips] ]
33

4-
Ver = "0.9.0 alpha"
4+
Ver = "0.9.2 alpha"
55

66
import sys
77
import os
@@ -11,10 +11,6 @@
1111
reload(sys).setdefaultencoding('UTF-8')
1212
sys.dont_write_bytecode = True
1313

14-
sys.path += glob.glob('%s/*.egg' % os.path.dirname(os.path.abspath(__file__)))
15-
sys.path += [os.path.abspath(os.path.join(__file__, '../packages.egg/%s' % x)) for x in ('noarch', sysconfig.get_platform().split('-')[0])]
16-
sys.path += glob.glob('%s/*.zip' % os.path.dirname(os.path.abspath(__file__)))
17-
sys.path+=[os.path.dirname(os.path.abspath(__file__)), ]
1814

1915
import gevent
2016
from gevent import coros
@@ -33,13 +29,14 @@
3329
import RootPath
3430

3531
cfg = gogo_cfg.gogo_cfg()
32+
Protocol_chk = False if not int(cfg.get("Check_IP_Protocol", "Check")) else True
3633
sock_thread_num = float(cfg.get("TPool", "sock_thread_num"))
3734
ssl_thread_num = float(cfg.get("TPool", "ssl_thread_num"))
3835
v4_limit = float(cfg.get("Num","Limit"))
3936
v6_limit = float(cfg.get("Num","Limit_v6"))
4037
Lock = coros.Semaphore()
4138
root = RootPath.RootPath()
42-
ippool = ggc_ip.GGC_IP(root+"ggc.txt").IPPool
39+
ippool = ggc_ip.GGC_IP(root+"ggc.txt", Protocol_chk).IPPool
4340
Last_time = time.time()
4441

4542
#ippool[0] is v4 pool, ippool[1] is v6 pool
@@ -52,12 +49,14 @@
5249
"v4":{
5350
"Total":len(ippool[0]),
5451
"Tested":0,
55-
"Succ":0
52+
"Succ":0,
53+
"Target":v4_limit
5654
},
5755
"v6":{
5856
"Total":len(ippool[1]),
5957
"Tested":0,
60-
"Succ":0
58+
"Succ":0,
59+
"Target":v6_limit
6160
}
6261
}
6362
STOP ={

‎packed/config.ini‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[Check_IP_Protocol]
2+
; 0 stand for DO NOT CHECK PROTOCOL AVAILABLITY and vise versa.
3+
Check=0
4+
15
[Num]
26
; 0 means the program will not scan for it
37
Limit=40

‎packed/dependence.egg‎

121 Bytes
Binary file not shown.

‎src/Main_Gevent.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@
2929
import RootPath
3030

3131
cfg = gogo_cfg.gogo_cfg()
32+
Protocol_chk = False if not int(cfg.get("Check_IP_Protocol", "Check")) else True
3233
sock_thread_num = float(cfg.get("TPool", "sock_thread_num"))
3334
ssl_thread_num = float(cfg.get("TPool", "ssl_thread_num"))
3435
v4_limit = float(cfg.get("Num","Limit"))
3536
v6_limit = float(cfg.get("Num","Limit_v6"))
3637
Lock = coros.Semaphore()
3738
root = RootPath.RootPath()
38-
ippool = ggc_ip.GGC_IP(root+"ggc.txt").IPPool
39+
ippool = ggc_ip.GGC_IP(root+"ggc.txt", Protocol_chk).IPPool
3940
Last_time = time.time()
4041

4142
#ippool[0] is v4 pool, ippool[1] is v6 pool
@@ -48,12 +49,14 @@
4849
"v4":{
4950
"Total":len(ippool[0]),
5051
"Tested":0,
51-
"Succ":0
52+
"Succ":0,
53+
"Target":v4_limit
5254
},
5355
"v6":{
5456
"Total":len(ippool[1]),
5557
"Tested":0,
56-
"Succ":0
58+
"Succ":0,
59+
"Target":v6_limit
5760
}
5861
}
5962
STOP ={

‎src/config.ini‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[Check_IP_Protocol]
2+
; 0 stand for DO NOT CHECK PROTOCOL AVAILABLITY and vise versa.
3+
Check=0
4+
15
[Num]
26
; 0 means the program will not scan for it
37
Limit=40

‎src/ggc_ip.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
class GGC_IP:
77
import RootPath
88
root = RootPath.RootPath()
9-
def __init__(self, File=root + "ggc.txt", ConnChk = True, IntIPPool = True):
9+
def __init__(self, File=root + "ggc.txt", Protocol_Chk = True, IntIPPool = True):
1010
self.IPPool = self.GGCIPS(File)
11-
if ConnChk:
11+
if Protocol_Chk:
12+
print "Checking IP Protocol avaliblity"
1213
C = Con_Test.Con_Test()
1314
if not C["v4"]:
1415
self.IPPool[0] = []
@@ -17,7 +18,7 @@ def __init__(self, File=root + "ggc.txt", ConnChk = True, IntIPPool = True):
1718
self.IPPool[1] = []
1819
print "IPv6 is not avalible"
1920
else:
20-
pass
21+
print "=========================\r\n\r\n WARNING: IP Protocol avaliblity has not been confirmed\r\n\r\n Strongly suggest to open it unless you 100% believe that your network support IPv4 and IPv6.\r\n\r\n========================="
2122
print "Generating the IP pool.......Please Wait"
2223
if IntIPPool:
2324
self.IPPool = [map(lambda x:x.int(), i) for i in [list(itertools.chain.from_iterable(j)) for j in map(lambda x:[list(i) for i in x], self.IPPool)]]

0 commit comments

Comments
 (0)