Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tun
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Railgun
tun
Commits
b722fb4f
Commit
b722fb4f
authored
Mar 24, 2020
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chnroutes
parent
522c1dd7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
lists/chnroutes.sh
lists/chnroutes.sh
+11
-0
lists/requirements.txt
lists/requirements.txt
+1
-0
lists/reverse.py
lists/reverse.py
+11
-0
lists/special.txt
lists/special.txt
+16
-0
No files found.
lists/chnroutes.sh
0 → 100644
View file @
b722fb4f
#!/usr/bin/env bash
if
[
-d
"chnroutes2"
]
;
then
(
cd
chnroutes2
&&
git pull
)
else
git clone https://github.com/misakaio/chnroutes2.git
fi
ln
-sf
chnroutes2/chnroutes.txt chnroutes.txt
#pip3 install -r requirements.txt
python3 reverse.py
lists/requirements.txt
0 → 100644
View file @
b722fb4f
netaddr==0.7.19
lists/reverse.py
0 → 100644
View file @
b722fb4f
#!/usr/bin/env python3
from
netaddr
import
*
universe
=
IPSet
([
'0.0.0.0/0'
])
special
=
IPSet
([
line
.
strip
()
for
line
in
open
(
'special.txt'
)])
chnroutes
=
IPSet
([
line
.
strip
()
for
line
in
open
(
'chnroutes.txt'
)
if
not
line
.
startswith
(
'#'
)])
result
=
universe
-
special
-
chnroutes
for
network
in
result
.
iter_cidrs
():
print
(
network
)
lists/special.txt
0 → 100644
View file @
b722fb4f
0.0.0.0/8
10.0.0.0/8
100.64.0.0/10
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.0.0.0/24
192.0.2.0/24
192.88.99.0/24
192.168.0.0/16
198.18.0.0/15
198.51.100.0/24
203.0.113.0/24
224.0.0.0/4
240.0.0.0/4
255.255.255.255
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment