Commit bccbf55c authored by Tommy Lau's avatar Tommy Lau

Update route.py to load previous route table

parent 3e3e4af9
......@@ -6,6 +6,7 @@ www.google.com.hk
www.google.sg
www.google.co.jp
accounts.google.com
216.58.217.205
plus.google.com
play.google.com
news.google.com
......@@ -44,8 +45,10 @@ fbcdn-profile-a.akamaihd.net
1.9.56.194
80.239.178.49
fbexternal-a.akamaihd.net
184.25.56.194
23.62.109.81
fbcdn-sphotos-d-a.akamaihd.net
165.254.12.34
bit.ly
# Twitter
......@@ -54,6 +57,7 @@ m.twitter.com
mobile.twitter.com
support.twitter.com
about.twitter.com
199.59.148.84
twimg.com
abs.twimg.com
pbs.twimg.com
......@@ -83,8 +87,10 @@ telegraph-ec2proxy.instagram.com
help.instagram.com
blog.instagram.com
photos-e.ak.instagram.com
69.192.3.24
instagramstatic-a.akamaihd.net
igcdn-photos-h-a.akamaihd.net
92.122.190.32
instagramimages-a.akamaihd.net
# TuneIn
......
......@@ -39,6 +39,15 @@ def query_cidr(ip):
if __name__ == "__main__":
route_table = {}
# Read the old route tables from file
with open("route.txt", "r") as f:
for line in f:
l = line.strip()
if len(l) != 0 and l[0] != '#':
addr, mask = l.split('=')[1].strip().split('/')
route_table[get_decimal_ip(addr)] = (addr, mask)
with open("domains.txt", "r") as f:
for line in f:
domain = line.strip()
......
......@@ -5,37 +5,39 @@ route = 23.32.0.0/255.224.0.0
route = 23.64.0.0/255.252.0.0
route = 23.192.0.0/255.224.0.0
route = 31.0.0.0/255.0.0.0
route = 54.72.0.0/255.248.0.0
route = 54.80.0.0/255.240.0.0
route = 54.144.0.0/255.240.0.0
route = 54.160.0.0/255.240.0.0
route = 54.208.0.0/255.248.0.0
route = 54.224.0.0/255.240.0.0
route = 54.236.0.0/255.254.0.0
route = 54.0.0.0/255.0.0.0
route = 62.0.0.0/255.0.0.0
route = 64.212.0.0/255.252.0.0
route = 66.6.32.0/255.255.240.0
route = 66.155.0.0/255.255.128.0
route = 69.58.176.0/255.255.240.0
route = 69.192.0.0/255.255.0.0
route = 74.125.0.0/255.255.0.0
route = 76.74.248.0/255.255.248.0
route = 80.0.0.0/255.0.0.0
route = 92.0.0.0/255.0.0.0
route = 103.0.0.0/255.0.0.0
route = 107.20.0.0/255.252.0.0
route = 111.0.0.0/255.0.0.0
route = 117.0.0.0/255.0.0.0
route = 141.0.0.0/255.0.0.0
route = 165.254.0.0/255.255.0.0
route = 173.194.0.0/255.255.0.0
route = 173.252.64.0/255.255.192.0
route = 184.24.0.0/255.248.0.0
route = 184.154.0.0/255.255.0.0
route = 185.0.0.0/255.0.0.0
route = 192.0.64.0/255.255.192.0
route = 199.16.156.0/255.255.252.0
route = 199.59.148.0/255.255.252.0
route = 199.92.0.0/255.252.0.0
route = 199.96.56.0/255.255.248.0
route = 203.0.0.0/255.0.0.0
route = 204.69.221.0/255.255.255.0
route = 204.160.0.0/255.252.0.0
route = 205.128.0.0/255.252.0.0
route = 206.32.0.0/255.252.0.0
route = 207.108.0.0/255.254.0.0
route = 208.111.128.0/255.255.192.0
route = 210.0.0.0/255.0.0.0
route = 216.58.192.0/255.255.224.0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment