This commit is contained in:
parent
cb77afbb29
commit
b81017eaf6
4
ipdb.txt
4
ipdb.txt
|
|
@ -1,6 +1,5 @@
|
|||
# IP段清单
|
||||
104.247.192.0/24
|
||||
104.247.192.0/24
|
||||
107.149.204.0/24
|
||||
107.165.206.0/24
|
||||
111.121.27.0/24
|
||||
|
|
@ -9,7 +8,6 @@
|
|||
122.195.22.0/24
|
||||
124.163.207.0/24
|
||||
124.163.208.0/24
|
||||
124.163.208.0/24
|
||||
153.101.64.0/24
|
||||
173.245.76.0/24
|
||||
175.42.154.0/24
|
||||
|
|
@ -19,8 +17,6 @@
|
|||
183.185.14.0/24
|
||||
183.224.221.0/24
|
||||
211.90.146.0/24
|
||||
211.90.146.0/24
|
||||
211.90.147.0/24
|
||||
211.90.147.0/24
|
||||
211.93.170.0/24
|
||||
220.248.203.0/24
|
||||
|
|
|
|||
2
main.py
2
main.py
|
|
@ -15,6 +15,8 @@ with open('ipdb.txt', 'r') as f:
|
|||
# 读取内容,并将每行的数据进行排序
|
||||
lines = f.readlines()
|
||||
lines_without_newlines = [line.strip() for line in lines]
|
||||
# 对lines_without_newlines进行去重
|
||||
lines_without_newlines = list(set(lines_without_newlines))
|
||||
# 剔除lines_without_newlines中空的元素和#开头的元素
|
||||
lines_without_newlines = [line for line in lines_without_newlines if line and not line.startswith('#')]
|
||||
#print(lines_without_newlines)
|
||||
|
|
|
|||
Loading…
Reference in New Issue