Browse Source

fix: standlone ip without cidr

dev v1.2.2
dnomd343 3 years ago
parent
commit
eb9ee2ea78
  1. 4
      asset/chinalist/build/build.py

4
asset/chinalist/build/build.py

@ -27,9 +27,9 @@ for ipStr in ipList:
pass
ipList = []
for ipAddr in ipv4List:
ipList.append(str(ipAddr))
ipList.append(str(ipAddr) if str(ipAddr).find('/') != -1 else str(ipAddr) + '/32')
for ipAddr in ipv6List:
ipList.append(str(ipAddr))
ipList.append(str(ipAddr) if str(ipAddr).find('/') != -1 else str(ipAddr) + '/128')
with open (workDir + '/../china-ip.txt', 'w') as fileObj:
fileObj.write('\n'.join(ipList) + '\n')
os.popen('gzip -cf9 ' + workDir + '/../china-ip.txt > ' + workDir + '/../china-ip.txt.gz')

Loading…
Cancel
Save