From eb9ee2ea78980ff48c23675d5d84f9e656ab52df Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Tue, 29 Mar 2022 11:20:22 +0800 Subject: [PATCH] fix: standlone ip without cidr --- asset/chinalist/build/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/chinalist/build/build.py b/asset/chinalist/build/build.py index c225f79..f9d52cd 100755 --- a/asset/chinalist/build/build.py +++ b/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')