new: [VPN] lists of common VPN IPv4 and IPv6 addresses added
Source of the IPv4/IPv6 is https://github.com/ejrv/VPNspull/100/head
parent
61e9ad96f1
commit
5ed5403157
|
@ -43,6 +43,8 @@ are available in one of the list. The list can be globally enabled or disabled i
|
|||
- [lists/tlds](lists/tlds) - top-level domains
|
||||
- [lists/url-shortener](lists/url-shortener) - URL shorteners services
|
||||
- [lists/university_domains](lists/university_domains) - University domain names
|
||||
- [lists/vpn-ipv4](lists/vpn-ipv4) - Specialized list of IPv4 addresses belonging to common VPN providers and datacenters
|
||||
- [lists/vpn-ipv6](lists/vpn-ipv6) - Specialized list of IPv6 addresses belonging to common VPN providers and datacenters
|
||||
- [lists/whats-my-ip](lists/whats-my-ip) - "What's my IP" service
|
||||
|
||||
# Format of a warning list
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import requests
|
||||
import json
|
||||
import datetime
|
||||
|
||||
url = 'https://raw.githubusercontent.com/ejrv/VPNs/master/vpn-ipv4.txt'
|
||||
r = requests.get(url, stream=True)
|
||||
ipsv4 = []
|
||||
for ip in r.iter_lines():
|
||||
v = ip.decode('utf-8')
|
||||
if not v.startswith("#"):
|
||||
if v: ipsv4.append(v)
|
||||
|
||||
warninglist = {}
|
||||
warninglist['name'] = 'Specialized list of IPv4 addresses belonging to common VPN providers and datacenters'
|
||||
warninglist['version'] = int(datetime.date.today().strftime('%Y%m%d'))
|
||||
warninglist['description'] = 'Specialized list of IPv4 addresses belonging to common VPN providers and datacenters'
|
||||
warninglist['list'] = sorted(set(ipsv4))
|
||||
warninglist['type'] = 'cidr'
|
||||
warninglist['matching_attributes'] = ["ip-src", "ip-dst", "domain|ip"]
|
||||
|
||||
|
||||
with open('../lists/vpn-ipv4/lists.json', 'w') as data_file:
|
||||
json.dump(warninglist, data_file, indent=4, sort_keys=True)
|
||||
|
||||
|
||||
url = 'https://raw.githubusercontent.com/ejrv/VPNs/master/vpn-ipv6.txt'
|
||||
r = requests.get(url, stream=True)
|
||||
ipsv6 = []
|
||||
for ip in r.iter_lines():
|
||||
v = ip.decode('utf-8')
|
||||
if not v.startswith("#"):
|
||||
if v: ipsv6.append(v)
|
||||
|
||||
warninglist = {}
|
||||
warninglist['name'] = 'Specialized list of IPv6 addresses belonging to common VPN providers and datacenters'
|
||||
warninglist['version'] = int(datetime.date.today().strftime('%Y%m%d'))
|
||||
warninglist['description'] = 'Specialized list of IPv6 addresses belonging to common VPN providers and datacenters'
|
||||
warninglist['list'] = sorted(set(ipsv6))
|
||||
warninglist['type'] = 'cidr'
|
||||
warninglist['matching_attributes'] = ["ip-src", "ip-dst", "domain|ip"]
|
||||
|
||||
|
||||
with open('../lists/vpn-ipv6/lists.json', 'w') as data_file:
|
||||
json.dump(warninglist, data_file, indent=4, sort_keys=True)
|
||||
|
||||
|
Loading…
Reference in New Issue