Skip to content

Commit

Permalink
Update Apex.rules and add tools/merge.py (#563)
Browse files Browse the repository at this point in the history
* Add files via upload

对比规则进行更新

* Update Apex.rules

最新Apex (台湾、日服)

* Update and rename 合并.py to merge.py.py
  • Loading branch information
Xqing-hup authored Jan 13, 2024
1 parent cc84ee1 commit 0b403cd
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 1 deletion.
117 changes: 116 additions & 1 deletion rules/Apex.rules
Original file line number Diff line number Diff line change
Expand Up @@ -1900,4 +1900,119 @@
221.121.152.101/32
221.121.158.61/32
221.121.158.109/32
221.121.158.145/32
221.121.158.145/32
52.72.96.0/24
23.2.13.0/24
52.45.150.0/24
159.153.191.0/24
44.197.254.0/24
3.86.150.0/24
35.83.124.0/24
155.133.248.0/24
162.254.199.0/24
155.133.233.0/24
155.133.224.0/24
155.133.253.0/24
185.25.183.0/24
155.133.255.0/24
162.254.197.0/24
155.133.227.0/24
65.109.17.0/24
162.213.192.0/24
155.133.249.0/24
205.196.6.0/24
146.66.152.0/24
162.254.198.0/24
155.133.252.0/24
103.10.125.0/24
146.66.155.0/24
155.133.230.0/24
103.28.54.0/24
162.254.192.0/24
147.75.193.0/24
155.133.238.0/24
162.254.195.0/24
162.254.196.0/24
155.133.244.0/24
155.133.246.0/24
173.237.41.0/24
68.169.42.0/24
188.42.190.0/24
151.106.18.0/24
162.254.193.0/24
185.25.182.0/24
155.133.232.0/24
35.164.4.0/24
54.218.123.0/24
52.86.226.0/24
177.54.152.0/24
35.247.197.0/24
35.199.73.0/24
52.67.92.0/24
52.67.31.0/24
217.147.89.0/24
34.140.130.0/24
35.241.147.0/24
34.76.163.0/24
52.58.81.0/24
52.59.121.0/24
61.4.123.0/24
104.199.182.0/24
34.126.123.0/24
174.127.100.0/24
34.84.103.0/24
34.146.173.0/24
34.85.61.0/24
52.197.77.0/24
15.185.47.0/24
15.185.93.0/24
35.244.68.0/24
13.54.193.0/24
104.198.102.0/24
52.40.240.0/24
52.42.44.0/24
148.72.171.0/24
34.70.146.0/24
104.197.136.0/24
104.197.42.0/24
107.150.147.0/24
34.75.67.0/24
104.196.209.0/24
104.196.8.0/24
52.6.64.0/24
23.251.100.0/24
146.0.237.0/24
174.127.98.0/24
95.154.228.0/24
34.214.99.0/24
108.181.93.0/24
45.121.184.0/24
174.127.77.0/24
44.195.184.0/24
23.21.156.0/24
94.72.166.0/24
108.181.79.0/24
23.21.34.0/24
44.233.238.0/24
44.225.198.0/24
204.74.224.0/24
146.0.238.0/24
173.244.199.0/24
34.231.237.0/24
99.81.58.0/24
104.95.184.0/24
100.20.60.0/24
15.254.34.0/24
151.106.15.0/24
18.236.11.0/24
54.158.196.0/24
35.155.243.0/24
52.36.236.0/24
54.173.22.0/24
155.133.226.0/24
65.109.21.0/24
148.72.174.0/24
72.251.246.0/24
129.227.70.0/24
109.169.64.0/24
203.34.110.0/24
43 changes: 43 additions & 0 deletions tools/merge.py.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
file_path = "Apex.rules"
_file_path = "1.rules"

def open_ru(path):
with open(path, "r") as file:
temp = file.readline()
data_list = []
while True:
data = file.readline().split("\n")
if len(data) == 1:
break
data_list.append(data[0])
return data_list

def slist(list:list, data):
for i in list:
if i == data:
return True
return False

def gengx(path, data:list):
with open(path, "a", encoding='utf-8') as gengx:
for i in data:
gengx.write(i+"\n")


if __name__ == "__main__":
file_path = str(input("输入需要更新文件:"))
_file_path = str(input("输入最新文件名:"))


yuan_list = open_ru(file_path)
geng_list = open_ru(_file_path)
gengx_list = []
for i in geng_list:
if slist(yuan_list, i):
pass
else:
print(f'添加: {i}')
gengx_list.append(i)
gengx(file_path, gengx_list)

print(f'更新结束 共:{len(gengx_list)}条')

0 comments on commit 0b403cd

Please sign in to comment.