From 805bf72ab2a0783e352ccdadd2dd7e16795e47dc Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Mon, 17 Jun 2019 00:15:21 +0100 Subject: [PATCH 01/16] Refactor how crtsh works WIP --- requirements.txt | 15 +++---- theHarvester/__main__.py | 4 -- theHarvester/discovery/crtsh.py | 69 +++++++-------------------------- 3 files changed, 22 insertions(+), 66 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9d71d4bd..70692fee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ -beautifulsoup4>=4.7.1 +beautifulsoup4==4.7.1 censys==0.0.8 -plotly>=3.10.0 -pytest>=4.6.3 -PyYaml>=5.1.1 -requests>=2.22.0 -shodan>=1.13.0 -texttable>=1.6.1 +plotly==3.10.0 +pytest==4.6.3 +PyYaml==5.1.1 +psycopg2-binary==2.8.3 +requests==2.22.0 +shodan==1.13.0 +texttable==1.6.1 diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index a111b6c8..95758af8 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -148,8 +148,6 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() - hosts = filter(search.get_hostnames()) - all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') @@ -417,8 +415,6 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() - hosts = filter(search.get_hostnames()) - all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 5f33e2ff..3eac6736 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -1,66 +1,25 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * -from theHarvester.parsers import myparser -import requests -import time +import psycopg2 class SearchCrtsh: def __init__(self, word): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'https://crt.sh/?q=' - self.quantity = '100' - self.counter = 0 + self.word = word + self.db_server = 'crt.sh' + self.db_database = 'certwatch' + self.db_user = 'guest' def do_search(self): try: - urly = self.server + self.word - except Exception as e: - print(e) - try: - params = {'User-Agent': Core.get_user_agent()} - r = requests.get(urly, headers=params) - except Exception as e: - print(e) - links = self.get_info(r.text) - for link in links: - params = {'User-Agent': Core.get_user_agent()} - r = requests.get(link, headers=params) - time.sleep(getDelay()) - self.results = r.text - self.totalresults += self.results - - """ - Function goes through text from base request and parses it for links - @param text requests text - @return list of links - """ - def get_info(self, text): - lines = [] - for line in str(text).splitlines(): - line = line.strip() - if 'id=' in line: - lines.append(line) - links = [] - for i in range(len(lines)): - if i % 2 == 0: # Way html is formatted only care about every other one. - current = lines[i] - current = current[43:] # 43 is not an arbitrary number, the id number always starts at 43rd index. - link = '' - for ch in current: - if ch == '"': - break - else: - link += ch - links.append(('https://crt.sh?id=' + str(link))) - return links - - def get_hostnames(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames() + conn = psycopg2.connect('dbname={0} user={1} host={2}'.format(self.db_database, self.db_user, self.db_server)) + conn.autocommit = True + cursor = conn.cursor() + cursor.execute( + "SELECT ci.NAME_VALUE NAME_VALUE FROM certificate_identity ci WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%{}'));".format( + self.word)) + except ConnectionError: + print('[!] Unable to connect to the database') + return cursor def process(self): self.do_search() From 95b8b605dda65169eefa072da79823f07e1900bd Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Mon, 8 Jul 2019 00:13:13 +0100 Subject: [PATCH 02/16] Update requirments.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 70692fee..26be839f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ beautifulsoup4==4.7.1 censys==0.0.8 plotly==3.10.0 -pytest==4.6.3 +pytest==5.0.1 PyYaml==5.1.1 psycopg2-binary==2.8.3 requests==2.22.0 shodan==1.13.0 -texttable==1.6.1 +texttable==1.6.2 From 4fb94084c6781af9b1148e094a588df760abf14a Mon Sep 17 00:00:00 2001 From: L1ghtn1ng Date: Sun, 21 Jul 2019 20:20:38 +0100 Subject: [PATCH 03/16] fixes issue https://github.com/laramies/theHarvester/issues/268 --- requirements.txt | 9 +++++---- theHarvester/lib/reportgraph.py | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index 26be839f..479a98d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,10 @@ -beautifulsoup4==4.7.1 +beautifulsoup4==4.8.0 censys==0.0.8 -plotly==3.10.0 +chart-studio==1.0.0 +plotly==4.0.0 pytest==5.0.1 PyYaml==5.1.1 psycopg2-binary==2.8.3 requests==2.22.0 -shodan==1.13.0 -texttable==1.6.2 +shodan==1.14.0 +texttable==1.6.2 \ No newline at end of file diff --git a/theHarvester/lib/reportgraph.py b/theHarvester/lib/reportgraph.py index 255ff85e..7ee2e443 100644 --- a/theHarvester/lib/reportgraph.py +++ b/theHarvester/lib/reportgraph.py @@ -2,7 +2,7 @@ from datetime import datetime import plotly import plotly.graph_objs as go -import plotly.plotly as py +import chart_studio.plotly as py try: db = stash.stash_manager() @@ -92,5 +92,4 @@ def drawscattergraphscanhistory(self, domain, scanhistorydomain): except Exception as e: print(f'Error generating HTML for the historical graph for domain: {e}') -except Exception as e: - print(f'Error in the reportgraph module: {e}') + From 03e0404cb368b3e7aa4c982b8b1254383e671d06 Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Sat, 3 Aug 2019 14:27:31 +0100 Subject: [PATCH 04/16] WIP crtsh.py --- theHarvester/discovery/crtsh.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 3eac6736..efc2ecab 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -1,26 +1,26 @@ -import psycopg2 +from theHarvester.lib.core import * +import json +import requests class SearchCrtsh: def __init__(self, word): self.word = word - self.db_server = 'crt.sh' - self.db_database = 'certwatch' - self.db_user = 'guest' def do_search(self): - try: - conn = psycopg2.connect('dbname={0} user={1} host={2}'.format(self.db_database, self.db_user, self.db_server)) - conn.autocommit = True - cursor = conn.cursor() - cursor.execute( - "SELECT ci.NAME_VALUE NAME_VALUE FROM certificate_identity ci WHERE ci.NAME_TYPE = 'dNSName' AND reverse(lower(ci.NAME_VALUE)) LIKE reverse(lower('%{}'));".format( - self.word)) - except ConnectionError: - print('[!] Unable to connect to the database') - return cursor + url = f'https://crt.sh/?q=%{self.word}&output=json' + request = requests.get(url, headers={'User-Agent': Core.get_user_agent()}) + + if request.ok: + try: + content = request.content.decode('utf-8') + data = json.loads(content) + return data + except ValueError as error: + print(f'Error when requesting data from crt.sh: {error}') def process(self): self.do_search() print('\tSearching results.') + From 7086cf3bdba0d624174d847f19bba7d0a0e38238 Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Sat, 3 Aug 2019 14:28:44 +0100 Subject: [PATCH 05/16] Update requirements.txt to fix issues with having merge conflicts --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d63ee6da..235c5e61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ beautifulsoup4==4.8.0 censys==0.0.8 chart-studio==1.0.0 -plotly==3.10.0 +plotly==4.0.0 pytest==5.0.1 PyYaml==5.1.1 requests==2.22.0 From a9129c456d086b84002d0c7dc2921b2f895733b3 Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Sat, 3 Aug 2019 14:36:06 +0100 Subject: [PATCH 06/16] Fix #276 --- theHarvester/__main__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index 108b55f0..e44cacfc 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -285,7 +285,6 @@ def start(): print('---------------------') for user in sorted(list(set(people))): print(user) - sys.exit(0) elif engineitem == 'netcraft': print('\033[94m[*] Searching Netcraft. \033[0m') From d5c38b1af201643411f49741dfc05f1a7fed83da Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 00:27:42 -0400 Subject: [PATCH 07/16] Syncing and updated crtsh to work properly. --- api-keys.yaml | 4 +- theHarvester/__main__.py | 5 +- theHarvester/discovery/crtsh.py | 73 ++++++------------------ theHarvester/discovery/linkedinsearch.py | 2 +- wordlists/dorks.txt | 1 + 5 files changed, 22 insertions(+), 63 deletions(-) diff --git a/api-keys.yaml b/api-keys.yaml index 02c5138e..343587ba 100644 --- a/api-keys.yaml +++ b/api-keys.yaml @@ -6,13 +6,13 @@ apikeys: key: hunter: - key: + key: intelx: key: 9df61df0-84f7-4dc7-b34c-8ccfb8646ace securityTrails: - key: + key: shodan: key: oCiMsgM6rQWqiTvPxFHYcExlZgg7wvTt diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index 8fec020e..b3f5452e 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -147,7 +147,7 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() - hosts = filter(search.get_hostnames()) + hosts = filter(search.get_data()) all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') @@ -287,7 +287,6 @@ def start(): print('---------------------') for user in sorted(list(set(people))): print(user) - sys.exit(0) elif engineitem == 'netcraft': print('\033[94m[*] Searching Netcraft. \033[0m') @@ -434,8 +433,6 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() - hosts = filter(search.get_hostnames()) - all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 5f33e2ff..ea563b7b 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -1,67 +1,28 @@ -from theHarvester.discovery.constants import * -from theHarvester.lib.core import * -from theHarvester.parsers import myparser +#from theHarvester.theHarvester.lib import * import requests -import time class SearchCrtsh: def __init__(self, word): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'https://crt.sh/?q=' - self.quantity = '100' - self.counter = 0 + self.word = word + self.data = set() def do_search(self): - try: - urly = self.server + self.word - except Exception as e: - print(e) - try: - params = {'User-Agent': Core.get_user_agent()} - r = requests.get(urly, headers=params) - except Exception as e: - print(e) - links = self.get_info(r.text) - for link in links: - params = {'User-Agent': Core.get_user_agent()} - r = requests.get(link, headers=params) - time.sleep(getDelay()) - self.results = r.text - self.totalresults += self.results - - """ - Function goes through text from base request and parses it for links - @param text requests text - @return list of links - """ - def get_info(self, text): - lines = [] - for line in str(text).splitlines(): - line = line.strip() - if 'id=' in line: - lines.append(line) - links = [] - for i in range(len(lines)): - if i % 2 == 0: # Way html is formatted only care about every other one. - current = lines[i] - current = current[43:] # 43 is not an arbitrary number, the id number always starts at 43rd index. - link = '' - for ch in current: - if ch == '"': - break - else: - link += ch - links.append(('https://crt.sh?id=' + str(link))) - return links - - def get_hostnames(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames() + url = f'https://crt.sh/?q=%25.{self.word}&output=json' + request = requests.get(url) + if request.ok: + try: + content = request.json() + data = set([dct['name_value'][2:] if '*.' == dct['name_value'][:2] else dct['name_value'] for dct in content]) + return data + except ValueError as error: + print(f'Error when requesting data from crt.sh: {error}') def process(self): - self.do_search() print('\tSearching results.') + data = self.do_search() + self.data = data + + def get_data(self): + return self.data diff --git a/theHarvester/discovery/linkedinsearch.py b/theHarvester/discovery/linkedinsearch.py index 4f8e9b94..d59d14fd 100644 --- a/theHarvester/discovery/linkedinsearch.py +++ b/theHarvester/discovery/linkedinsearch.py @@ -39,4 +39,4 @@ def process(self): self.do_search() time.sleep(getDelay()) self.counter += 100 - print(f'\tSearching {self.counter} results.') + print(f'\tSearching {self.counter} results.') diff --git a/wordlists/dorks.txt b/wordlists/dorks.txt index 0c56e244..e40b574a 100644 --- a/wordlists/dorks.txt +++ b/wordlists/dorks.txt @@ -1,6 +1,7 @@ login.html administrator/login.%XT% admin_area/login.%XT% +intext:@ inurl: intitle: intext: From 74b3572b0d2df62226411bdd9960702fdbe9de81 Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 00:30:50 -0400 Subject: [PATCH 08/16] Syncing and updated crtsh to work proper ly. --- discovery/DNS/Base.py | 363 ++ discovery/DNS/Class.py | 58 + discovery/DNS/Lib.py | 764 +++ discovery/DNS/Opcode.py | 52 + discovery/DNS/Status.py | 67 + discovery/DNS/Type.py | 80 + discovery/DNS/__init__.py | 60 + discovery/DNS/lazy.py | 53 + discovery/DNS/win32dns.py | 143 + discovery/IPy.py | 1650 ++++++ discovery/baidusearch.py | 41 + discovery/bingsearch.py | 89 + discovery/censys.py | 130 + discovery/constants.py | 50 + discovery/crtsh.py | 67 + discovery/cymon.py | 38 + discovery/dnsdumpster.py | 43 + discovery/dnssearch.py | 233 + discovery/dogpilesearch.py | 48 + discovery/duckduckgosearch.py | 93 + discovery/exaleadsearch.py | 81 + discovery/googlecertificates.py | 38 + discovery/googlesearch.py | 147 + discovery/huntersearch.py | 42 + discovery/intelxsearch.py | 56 + discovery/linkedinsearch.py | 42 + discovery/netcraft.py | 72 + discovery/port_scanner.py | 32 + discovery/s3_scanner.py | 46 + discovery/securitytrailssearch.py | 62 + discovery/shodansearch.py | 43 + discovery/takeover.py | 44 + discovery/threatcrowd.py | 36 + discovery/trello.py | 61 + discovery/twittersearch.py | 64 + discovery/virustotal.py | 36 + discovery/wfuzz_search.py | 32 + discovery/yahoosearch.py | 49 + discovery/yandexsearch.py | 73 + lib/__init__.py | 1 + lib/core.py | 561 ++ lib/graphs.py | 744 +++ lib/hostchecker.py | 25 + lib/htmlExport.py | 167 + lib/ip-ranges.json | 8978 +++++++++++++++++++++++++++++ lib/markup.py | 559 ++ lib/port_scanner.py | 0 lib/reportgraph.py | 96 + lib/resolvers.txt | 2016 +++++++ lib/stash.py | 291 + lib/statichtmlgenerator.py | 176 + parsers/__init__.py | 0 parsers/censysparser.py | 67 + parsers/cymonparser.py | 19 + parsers/intelxparser.py | 27 + parsers/myparser.py | 158 + parsers/securitytrailsparser.py | 38 + 57 files changed, 19101 insertions(+) create mode 100644 discovery/DNS/Base.py create mode 100644 discovery/DNS/Class.py create mode 100644 discovery/DNS/Lib.py create mode 100644 discovery/DNS/Opcode.py create mode 100644 discovery/DNS/Status.py create mode 100644 discovery/DNS/Type.py create mode 100644 discovery/DNS/__init__.py create mode 100644 discovery/DNS/lazy.py create mode 100644 discovery/DNS/win32dns.py create mode 100644 discovery/IPy.py create mode 100644 discovery/baidusearch.py create mode 100644 discovery/bingsearch.py create mode 100644 discovery/censys.py create mode 100644 discovery/constants.py create mode 100644 discovery/crtsh.py create mode 100644 discovery/cymon.py create mode 100644 discovery/dnsdumpster.py create mode 100644 discovery/dnssearch.py create mode 100644 discovery/dogpilesearch.py create mode 100644 discovery/duckduckgosearch.py create mode 100644 discovery/exaleadsearch.py create mode 100644 discovery/googlecertificates.py create mode 100644 discovery/googlesearch.py create mode 100644 discovery/huntersearch.py create mode 100644 discovery/intelxsearch.py create mode 100644 discovery/linkedinsearch.py create mode 100644 discovery/netcraft.py create mode 100644 discovery/port_scanner.py create mode 100644 discovery/s3_scanner.py create mode 100644 discovery/securitytrailssearch.py create mode 100644 discovery/shodansearch.py create mode 100644 discovery/takeover.py create mode 100644 discovery/threatcrowd.py create mode 100644 discovery/trello.py create mode 100644 discovery/twittersearch.py create mode 100644 discovery/virustotal.py create mode 100644 discovery/wfuzz_search.py create mode 100644 discovery/yahoosearch.py create mode 100644 discovery/yandexsearch.py create mode 100644 lib/__init__.py create mode 100644 lib/core.py create mode 100644 lib/graphs.py create mode 100644 lib/hostchecker.py create mode 100644 lib/htmlExport.py create mode 100644 lib/ip-ranges.json create mode 100644 lib/markup.py create mode 100644 lib/port_scanner.py create mode 100644 lib/reportgraph.py create mode 100644 lib/resolvers.txt create mode 100644 lib/stash.py create mode 100644 lib/statichtmlgenerator.py create mode 100644 parsers/__init__.py create mode 100644 parsers/censysparser.py create mode 100644 parsers/cymonparser.py create mode 100644 parsers/intelxparser.py create mode 100644 parsers/myparser.py create mode 100644 parsers/securitytrailsparser.py diff --git a/discovery/DNS/Base.py b/discovery/DNS/Base.py new file mode 100644 index 00000000..9f0af7af --- /dev/null +++ b/discovery/DNS/Base.py @@ -0,0 +1,363 @@ +""" +$Id: Base.py,v 1.12.2.4 2007/05/22 20:28:31 customdesigned Exp $ + +This file is part of the pydns project. +Homepage: http://pydns.sourceforge.net + +This code is covered by the standard Python License. + + Base functionality. Request and Response classes, that sort of thing. +""" + +import socket +import time + +from discovery.DNS import Type, Class, Opcode +import asyncore + +class DNSError(Exception): + pass + +defaults = {'protocol': 'udp', 'port': 53, 'opcode': Opcode.QUERY, + 'qtype': Type.A, 'rd': 1, 'timing': 1, 'timeout': 30} + +defaults['server'] = [] + + +def ParseResolvConf(resolv_path): + global defaults + try: + lines = open(resolv_path).readlines() + except: + print('error in path' + resolv_path) + for line in lines: + line = line.strip() + if not line or line[0] == ';' or line[0] == '#': + continue + fields = line.split() + if len(fields) < 2: + continue + if fields[0] == 'domain' and len(fields) > 1: + defaults['domain'] = fields[1] + if fields[0] == 'search': + pass + if fields[0] == 'options': + pass + if fields[0] == 'sortlist': + pass + if fields[0] == 'nameserver': + defaults['server'].append(fields[1]) + + +def DiscoverNameServers(): + import sys + if sys.platform in ('win32', 'nt'): + import win32dns + defaults['server'] = win32dns.RegistryResolve() + else: + return ParseResolvConf() + + +class DnsRequest: + + """ high level Request object """ + + def __init__(self, *name, **args): + self.donefunc = None + #fix maybe? + self.asyn = False + #self.async = None #TODO FIX async is a keyword + self.defaults = {} + self.argparse(name, args) + self.defaults = self.args + + def argparse(self, name, args): + if not name and 'name' in self.defaults: + args['name'] = self.defaults['name'] + if isinstance(name, str): + args['name'] = name + else: + if len(name) == 1: + if name[0]: + args['name'] = name[0] + for i in defaults.keys(): + if i not in args: + if i in self.defaults: + args[i] = self.defaults[i] + else: + args[i] = defaults[i] + if isinstance(args['server'], str): + args['server'] = [args['server']] + self.args = args + + def socketInit(self, a, b): + self.s = socket.socket(a, b) + + def processUDPReply(self): + import time + import select + if self.args['timeout'] > 0: + r, w, e = select.select([self.s], [], [], self.args['timeout']) + if not len(r): + raise DNSError('Timeout') + self.reply = self.s.recv(1024) + self.time_finish = time.time() + self.args['server'] = self.ns + return self.processReply() + + def processTCPReply(self): + import time + from discovery.DNS import Lib + self.f = self.s.makefile('r') + header = self.f.read(2) + if len(header) < 2: + raise DNSError('EOF') + count = Lib.unpack16bit(header) + self.reply = self.f.read(count) + if len(self.reply) != count: + raise DNSError('incomplete reply') + self.time_finish = time.time() + self.args['server'] = self.ns + return self.processReply() + + def processReply(self): + from discovery.DNS import Lib + self.args['elapsed'] = (self.time_finish - self.time_start) * 1000 + u = Lib.Munpacker(self.reply) + r = Lib.DnsResult(u, self.args) + r.args = self.args + # self.args=None # mark this DnsRequest object as used. + return r + #### TODO TODO TODO #### +# if protocol == 'tcp' and qtype == Type.AXFR: +# while 1: +# header = f.read(2) +# if len(header) < 2: +# print '========== EOF ==========' +# break +# count = Lib.unpack16bit(header) +# if not count: +# print '========== ZERO COUNT ==========' +# break +# print '========== NEXT ==========' +# reply = f.read(count) +# if len(reply) != count: +# print '*** Incomplete reply ***' +# break +# u = Lib.Munpacker(reply) +# Lib.dumpM(u) + + def conn(self): + self.s.connect((str(self.ns), self.port)) + + + def req(self, *name, **args): + " needs a refactoring " + import time + from discovery.DNS import Lib + self.argparse(name, args) + # if not self.args: + # raise DNSError,'reinitialize request before reuse' + protocol = self.args['protocol'] + self.port = self.args['port'] + opcode = self.args['opcode'] + rd = self.args['rd'] + server = self.args['server'] + if isinstance(self.args['qtype'], str): + try: + qtype = getattr(Type, str.upper(self.args['qtype'])) + except AttributeError: + raise DNSError('unknown query type') + else: + qtype = self.args['qtype'] + if 'name' not in self.args: + print(self.args) + raise DNSError('nothing to lookup') + qname = self.args['name'] + if qtype == Type.AXFR: + print('Query type AXFR, protocol forced to TCP') + protocol = 'tcp' + # print 'QTYPE %d(%s)' % (qtype, Type.typestr(qtype)) + m = Lib.Mpacker() + # jesus. keywords and default args would be good. TODO. + m.addHeader(0, + 0, opcode, 0, 0, rd, 0, 0, 0, + 1, 0, 0, 0) + m.addQuestion(qname, qtype, Class.IN) + self.request = m.getbuf() + try: + if protocol == 'udp': + self.sendUDPRequest(server) + else: + self.sendTCPRequest(server) + except socket.error as reason: + raise DNSError(reason) + if self.asyn: + return None + else: + return self.response + + def sendUDPRequest(self, server): + "refactor me" + self.response = None + self.socketInit(socket.AF_INET, socket.SOCK_DGRAM) + for self.ns in server: + try: + # TODO. Handle timeouts &c correctly (RFC) + #self.s.connect((self.ns, self.port)) + self.conn() + self.time_start = time.time() + if not self.asyn: + self.s.send(self.request) + self.response = self.processUDPReply() + # except socket.error: + except Exception as e: + print(e) + continue + break + if not self.response: + if not self.asyn: + raise DNSError('no working nameservers found') + + def sendTCPRequest(self, server): + " do the work of sending a TCP request " + import time + import discovery.DNS.Lib as Lib + self.response = None + for self.ns in server: + try: + self.socketInit(socket.AF_INET, socket.SOCK_STREAM) + self.time_start = time.time() + self.conn() + self.s.send(Lib.pack16bit(len(self.request)) + self.request) + self.s.shutdown(1) + self.response = self.processTCPReply() + except socket.error: + continue + break + if not self.response: + raise DNSError('no working nameservers found') +# class DnsAsyncRequest(DnsRequest): + + +class DnsAsyncRequest(DnsRequest, asyncore.dispatcher_with_send): + + " an asynchronous request object. out of date, probably broken " + + def __init__(self, *name, **args): + DnsRequest.__init__(self, *name, **args) + # XXX todo + if 'done' in args and args['done']: + self.donefunc = args['done'] + else: + self.donefunc = self.showResult + # self.realinit(name,args) # XXX todo + self.asyn = True + + def conn(self): + import time + self.connect((self.ns, self.port)) + self.time_start = time.time() + if 'start' in self.args and self.args['start']: + asyncore.dispatcher.go(self) + + def socketInit(self, a, b): + self.create_socket(a, b) + asyncore.dispatcher.__init__(self) + self.s = self + + def handle_read(self): + if self.args['protocol'] == 'udp': + self.response = self.processUDPReply() + if self.donefunc: + self.donefunc(*(self,)) + + def handle_connect(self): + self.send(self.request) + + def handle_write(self): + pass + + def showResult(self, *s): + self.response.show() + +# +# $Log: Base.py,v $ +# Revision 1.12.2.4 2007/05/22 20:28:31 customdesigned +# Missing import Lib +# +# Revision 1.12.2.3 2007/05/22 20:25:52 customdesigned +# Use socket.inetntoa,inetaton. +# +# Revision 1.12.2.2 2007/05/22 20:21:46 customdesigned +# Trap socket error +# +# Revision 1.12.2.1 2007/05/22 20:19:35 customdesigned +# Skip bogus but non-empty lines in resolv.conf +# +# Revision 1.12 2002/04/23 06:04:27 anthonybaxter +# attempt to refactor the DNSRequest.req method a little. after doing a bit +# of this, I've decided to bite the bullet and just rewrite the puppy. will +# be checkin in some design notes, then unit tests and then writing the sod. +# +# Revision 1.11 2002/03/19 13:05:02 anthonybaxter +# converted to class based exceptions (there goes the python1.4 compatibility :) +# +# removed a quite gross use of 'eval()'. +# +# Revision 1.10 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.9 2002/03/19 12:26:13 anthonybaxter +# death to leading tabs. +# +# Revision 1.8 2002/03/19 10:30:33 anthonybaxter +# first round of major bits and pieces. The major stuff here (summarised +# from my local, off-net CVS server :/ this will cause some oddities with +# the +# +# tests/testPackers.py: +# a large slab of unit tests for the packer and unpacker code in DNS.Lib +# +# DNS/Lib.py: +# placeholder for addSRV. +# added 'klass' to addA, make it the same as the other A* records. +# made addTXT check for being passed a string, turn it into a length 1 list. +# explicitly check for adding a string of length > 255 (prohibited). +# a bunch of cleanups from a first pass with pychecker +# new code for pack/unpack. the bitwise stuff uses struct, for a smallish +# (disappointly small, actually) improvement, while addr2bin is much +# much faster now. +# +# DNS/Base.py: +# added DiscoverNameServers. This automatically does the right thing +# on unix/ win32. No idea how MacOS handles this. *sigh* +# Incompatible change: Don't use ParseResolvConf on non-unix, use this +# function, instead! +# a bunch of cleanups from a first pass with pychecker +# +# Revision 1.5 2001/08/09 09:22:28 anthonybaxter +# added what I hope is win32 resolver lookup support. I'll need to try +# and figure out how to get the CVS checkout onto my windows machine to +# make sure it works (wow, doing something other than games on the +# windows machine :) +# +# Code from Wolfgang.Strobl@gmd.de +# win32dns.py from +# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66260 +# +# Really, ParseResolvConf() should be renamed "FindNameServers" or +# some such. +# +# Revision 1.4 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.3 2001/07/19 07:20:12 anthony +# Handle blank resolv.conf lines. +# Patch from Bastian Kleineidam +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/Class.py b/discovery/DNS/Class.py new file mode 100644 index 00000000..cca4c3ef --- /dev/null +++ b/discovery/DNS/Class.py @@ -0,0 +1,58 @@ +""" +$Id: Class.py,v 1.6 2002/04/23 12:52:19 anthonybaxter Exp $ + + This file is part of the pydns project. + Homepage: http://pydns.sourceforge.net + + This code is covered by the standard Python License. + + CLASS values (section 3.2.4) +""" + + +IN = 1 # the Internet +CS = 2 # the CSNET class (Obsolete - used only for examples in + # some obsolete RFCs) +CH = 3 # the CHAOS class. When someone shows me python running on + # a Symbolics Lisp machine, I'll look at implementing this. +HS = 4 # Hesiod [Dyer 87] + +# QCLASS values (section 3.2.5) + +ANY = 255 # any class + + +# Construct reverse mapping dictionary + +_names = dir() +classmap = {} +for _name in _names: + if _name[0] != '_': + classmap[eval(_name)] = _name + + +def classstr(klass): + if klass in classmap: + return classmap[klass] + else: + return repr(klass) + +# +# $Log: Class.py,v $ +# Revision 1.6 2002/04/23 12:52:19 anthonybaxter +# cleanup whitespace. +# +# Revision 1.5 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.4 2002/03/19 12:26:13 anthonybaxter +# death to leading tabs. +# +# Revision 1.3 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/Lib.py b/discovery/DNS/Lib.py new file mode 100644 index 00000000..d0fa14f8 --- /dev/null +++ b/discovery/DNS/Lib.py @@ -0,0 +1,764 @@ +# -*- encoding: utf-8 -*- +""" + $Id: Lib.py,v 1.11.2.3 2007/05/22 20:27:40 customdesigned Exp $ + + This file is part of the pydns project. + Homepage: http://pydns.sourceforge.net + + This code is covered by the standard Python License. + + Library code. Largely this is packers and unpackers for various types. +""" + +# +# +# See RFC 1035: +# ------------------------------------------------------------------------ +# Network Working Group P. Mockapetris +# Request for Comments: 1035 ISI +# November 1987 +# Obsoletes: RFCs 882, 883, 973 +# +# DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION +# ------------------------------------------------------------------------ + +from discovery.DNS import Type, Class, Opcode, Status +from discovery.DNS.Base import DNSError + +class UnpackError(DNSError): + pass + + +class PackError(DNSError): + pass + +# Low-level 16 and 32 bit integer packing and unpacking + +from struct import pack as struct_pack +from struct import unpack as struct_unpack +from socket import inet_ntoa, inet_aton + + +def pack16bit(n): + return struct_pack('!H', n) + + +def pack32bit(n): + return struct_pack('!L', n) + + +def unpack16bit(s): + return struct_unpack('!H', s)[0] + + +def unpack32bit(s): + return struct_unpack('!L', s)[0] + + +def addr2bin(addr): + return struct_unpack('!l', inet_aton(addr))[0] + + +def bin2addr(n): + return inet_ntoa(struct_pack('!L', n)) + +# Packing class + + +class Packer: + + " packer base class. supports basic byte/16bit/32bit/addr/string/name " + + def __init__(self): + self.buf = b'' + self.index = {} + + def getbuf(self): + return self.buf + + def addbyte(self, c): + if len(c) != 1: + raise TypeError('one character expected') + self.buf = self.buf + c + + def addbytes(self, bytes): + self.buf = self.buf + bytes + + def add16bit(self, n): + self.buf = self.buf + pack16bit(n) + + def add32bit(self, n): + self.buf = self.buf + pack32bit(n) + + def addaddr(self, addr): + n = addr2bin(addr) + self.buf = self.buf + pack32bit(n) + + def addstring(self, s): + if len(s) > 255: + raise ValueError("Can't encode string of length " + + "%s (> 255)" % (len(s))) + self.addbyte(chr(len(s))) + self.addbytes(s) + + def addname(self, name): + # Domain name packing (section 4.1.4) + # Add a domain name to the buffer, possibly using pointers. + # The case of the first occurrence of a name is preserved. + # Redundant dots are ignored. + list = [] + for label in name.split('.'): + if label: + if len(label) > 63: + raise PackError('label too long') + list.append(label) + keys = [] + s = '' + for i in range(len(list)): + key = str.upper((s.join(list[i:]))) + keys.append(key) + if key in self.index: + pointer = self.index[key] + break + else: + i = len(list) + pointer = None + # Do it into temporaries first so exceptions don't + # mess up self.index and self.buf + buf = '' + offset = len(self.buf) + index = [] + for j in range(i): + label = list[j] + n = len(label) + if offset + len(buf) < 0x3FFF: + index.append((keys[j], offset + len(buf))) + else: + print('DNS.Lib.Packer.addname:',) + print('warning: pointer too big') + buf = buf + (chr(n) + label) + if pointer: + buf = buf + pack16bit(pointer | 0xC000) + else: + buf = buf + '\0' + self.buf = self.buf + bytes(buf, encoding='utf-8') + for key, value in index: + self.index[key] = value + + def dump(self): + keys = sorted(self.index.keys()) + print('-' * 40) + for key in keys: + print('%20s %3d' % (key, self.index[key])) + print('-' * 40) + space = 1 + for i in range(0, len(self.buf) + 1, 2): + if self.buf[i:i + 2] == '**': + if not space: + print() + space = 1 + continue + space = 0 + print('%4d' % i,) + for c in self.buf[i:i + 2]: + if ' ' < c < '\177': + print(' %c' % c,) + else: + print('%2d' % ord(c),) + print() + print('-' * 40) + + +# Unpacking class + + +class Unpacker: + + def __init__(self, buf): + self.buf = buf + self.offset = 0 + + def getbyte(self): + if self.offset >= len(self.buf): + raise UnpackError("Ran off end of data") + c = self.buf[self.offset] + self.offset = self.offset + 1 + return c + + def getbytes(self, n): + s = self.buf[self.offset: self.offset + n] + if len(s) != n: + raise UnpackError('not enough data left') + self.offset = self.offset + n + return s + + def get16bit(self): + return unpack16bit(self.getbytes(2)) + + def get32bit(self): + return unpack32bit(self.getbytes(4)) + + def getaddr(self): + return bin2addr(self.get32bit()) + + def getstring(self): + return self.getbytes(ord(self.getbyte())) + + def getname(self): + # Domain name unpacking (section 4.1.4) + c = self.getbyte() + i = ord(chr(c)) + if i & 0xC0 == 0xC0: + d = self.getbyte() + j = ord(chr(d)) + pointer = ((i << 8) | j) & ~0xC000 + save_offset = self.offset + try: + self.offset = pointer + domain = self.getname() + finally: + self.offset = save_offset + return domain + if i == 0: + return '' + domain = self.getbytes(i).decode('UTF-8') + remains = self.getname() + if not remains: + return domain + else: + return domain + '.' + remains + + +# Test program for packin/unpacking (section 4.1.4) + +def testpacker(): + N = 2500 + R = range(N) + import timing + # See section 4.1.4 of RFC 1035 + timing.start() + for i in R: + p = Packer() + p.addaddr('192.168.0.1') + p.addbytes('*' * 20) + p.addname('f.ISI.ARPA') + p.addbytes('*' * 8) + p.addname('Foo.F.isi.arpa') + p.addbytes('*' * 18) + p.addname('arpa') + p.addbytes('*' * 26) + p.addname('') + timing.finish() + print(timing.milli(), "ms total for packing") + print(round(timing.milli() / i, 4), 'ms per packing') + # p.dump() + u = Unpacker(p.buf) + u.getaddr() + u.getbytes(20) + u.getname() + u.getbytes(8) + u.getname() + u.getbytes(18) + u.getname() + u.getbytes(26) + u.getname() + timing.start() + for i in R: + u = Unpacker(p.buf) + + res = (u.getaddr(), + u.getbytes(20), + u.getname(), + u.getbytes(8), + u.getname(), + u.getbytes(18), + u.getname(), + u.getbytes(26), + u.getname()) + timing.finish() + print(timing.milli(), "ms total for unpacking") + print(round(timing.milli() / i, 4), 'ms per unpacking') + # for item in res: print item + + +# Pack/unpack RR toplevel format (section 3.2.1) + +class RRpacker(Packer): + + def __init__(self): + Packer.__init__(self) + self.rdstart = None + + def addRRheader(self, name, type, klass, ttl, *rest): + self.addname(name) + self.add16bit(type) + self.add16bit(klass) + self.add32bit(ttl) + if rest: + if rest[1:]: + raise TypeError('too many args') + rdlength = rest[0] + else: + rdlength = 0 + self.add16bit(rdlength) + self.rdstart = len(self.buf) + + def patchrdlength(self): + rdlength = unpack16bit(self.buf[self.rdstart - 2:self.rdstart]) + if rdlength == len(self.buf) - self.rdstart: + return + rdata = self.buf[self.rdstart:] + save_buf = self.buf + ok = 0 + try: + self.buf = self.buf[:self.rdstart - 2] + self.add16bit(len(rdata)) + self.buf = self.buf + rdata + ok = 1 + finally: + if not ok: + self.buf = save_buf + + def endRR(self): + if self.rdstart is not None: + self.patchrdlength() + self.rdstart = None + + def getbuf(self): + if self.rdstart is not None: + self.patchrdlength() + return Packer.getbuf(self) + # Standard RRs (section 3.3) + + def addCNAME(self, name, klass, ttl, cname): + self.addRRheader(name, Type.CNAME, klass, ttl) + self.addname(cname) + self.endRR() + + def addHINFO(self, name, klass, ttl, cpu, os): + self.addRRheader(name, Type.HINFO, klass, ttl) + self.addstring(cpu) + self.addstring(os) + self.endRR() + + def addMX(self, name, klass, ttl, preference, exchange): + self.addRRheader(name, Type.MX, klass, ttl) + self.add16bit(preference) + self.addname(exchange) + self.endRR() + + def addNS(self, name, klass, ttl, nsdname): + self.addRRheader(name, Type.NS, klass, ttl) + self.addname(nsdname) + self.endRR() + + def addPTR(self, name, klass, ttl, ptrdname): + self.addRRheader(name, Type.PTR, klass, ttl) + self.addname(ptrdname) + self.endRR() + + def addSOA(self, name, klass, ttl, + mname, rname, serial, refresh, retry, expire, minimum): + self.addRRheader(name, Type.SOA, klass, ttl) + self.addname(mname) + self.addname(rname) + self.add32bit(serial) + self.add32bit(refresh) + self.add32bit(retry) + self.add32bit(expire) + self.add32bit(minimum) + self.endRR() + + def addTXT(self, name, klass, ttl, list): + self.addRRheader(name, Type.TXT, klass, ttl) + if isinstance(list, str): + list = [list] + for txtdata in list: + self.addstring(txtdata) + self.endRR() + # Internet specific RRs (section 3.4) -- class = IN + + def addA(self, name, klass, ttl, address): + self.addRRheader(name, Type.A, klass, ttl) + self.addaddr(address) + self.endRR() + + def addWKS(self, name, ttl, address, protocol, bitmap): + self.addRRheader(name, Type.WKS, Class.IN, ttl) + self.addaddr(address) + self.addbyte(chr(protocol)) + self.addbytes(bitmap) + self.endRR() + + def addSRV(self): + raise NotImplementedError + + +def prettyTime(seconds): + if seconds < 60: + return seconds, "%d seconds" % (seconds) + if seconds < 3600: + return seconds, "%d minutes" % (seconds / 60) + if seconds < 86400: + return seconds, "%d hours" % (seconds / 3600) + if seconds < 604800: + return seconds, "%d days" % (seconds / 86400) + else: + return seconds, "%d weeks" % (seconds / 604800) + + +class RRunpacker(Unpacker): + + def __init__(self, buf): + Unpacker.__init__(self, buf) + self.rdend = None + + def getRRheader(self): + name = self.getname() + rrtype = self.get16bit() + klass = self.get16bit() + ttl = self.get32bit() + rdlength = self.get16bit() + self.rdend = self.offset + rdlength + return (name, rrtype, klass, ttl, rdlength) + + def endRR(self): + if self.offset != self.rdend: + raise UnpackError('end of RR not reached') + + def getCNAMEdata(self): + return self.getname() + + def getHINFOdata(self): + return self.getstring(), self.getstring() + + def getMXdata(self): + return self.get16bit(), self.getname() + + def getNSdata(self): + return self.getname() + + def getPTRdata(self): + return self.getname() + + def getSOAdata(self): + return self.getname(), \ + self.getname(), \ + ('serial',) + (self.get32bit(),), \ + ('refresh ',) + prettyTime(self.get32bit()), \ + ('retry',) + prettyTime(self.get32bit()), \ + ('expire',) + prettyTime(self.get32bit()), \ + ('minimum',) + prettyTime(self.get32bit()) + + def getTXTdata(self): + list = [] + while self.offset != self.rdend: + list.append(self.getstring()) + return list + + def getAdata(self): + return self.getaddr() + + def getWKSdata(self): + address = self.getaddr() + protocol = ord(self.getbyte()) + bitmap = self.getbytes(self.rdend - self.offset) + return address, protocol, bitmap + + def getSRVdata(self): + """ + _Service._Proto.Name TTL Class SRV Priority Weight Port Target + """ + priority = self.get16bit() + weight = self.get16bit() + port = self.get16bit() + target = self.getname() + # print '***priority, weight, port, target', priority, weight, port, + # target + return priority, weight, port, target + + +# Pack/unpack Message Header (section 4.1) + +class Hpacker(Packer): + + def addHeader(self, id, qr, opcode, aa, tc, rd, ra, z, rcode, + qdcount, ancount, nscount, arcount): + self.add16bit(id) + self.add16bit((qr & 1) << 15 | (opcode & 0xF) << 11 | (aa & 1) << 10 + | (tc & 1) << 9 | (rd & 1) << 8 | (ra & 1) << 7 + | (z & 7) << 4 | (rcode & 0xF)) + self.add16bit(qdcount) + self.add16bit(ancount) + self.add16bit(nscount) + self.add16bit(arcount) + + +class Hunpacker(Unpacker): + + def getHeader(self): + id = self.get16bit() + flags = self.get16bit() + qr, opcode, aa, tc, rd, ra, z, rcode = ( + (flags >> 15) & 1, + (flags >> 11) & 0xF, + (flags >> 10) & 1, + (flags >> 9) & 1, + (flags >> 8) & 1, + (flags >> 7) & 1, + (flags >> 4) & 7, + (flags >> 0) & 0xF) + qdcount = self.get16bit() + ancount = self.get16bit() + nscount = self.get16bit() + arcount = self.get16bit() + return (id, qr, opcode, aa, tc, rd, ra, z, rcode, + qdcount, ancount, nscount, arcount) + + +# Pack/unpack Question (section 4.1.2) + +class Qpacker(Packer): + + def addQuestion(self, qname, qtype, qclass): + self.addname(qname) + self.add16bit(qtype) + self.add16bit(qclass) + + +class Qunpacker(Unpacker): + + def getQuestion(self): + return self.getname(), self.get16bit(), self.get16bit() + + +# Pack/unpack Message(section 4) +# NB the order of the base classes is important for __init__()! + +class Mpacker(RRpacker, Qpacker, Hpacker): + pass + + +class Munpacker(RRunpacker, Qunpacker, Hunpacker): + pass + + +# Routines to print an unpacker to stdout, for debugging. +# These affect the unpacker's current position! + +def dumpM(u): + print('HEADER:',) + (id, qr, opcode, aa, tc, rd, ra, z, rcode, + qdcount, ancount, nscount, arcount) = u.getHeader() + print('id=%d,' % id,) + print('qr=%d, opcode=%d, aa=%d, tc=%d, rd=%d, ra=%d, z=%d, rcode=%d,' \ + % (qr, opcode, aa, tc, rd, ra, z, rcode)) + if tc: + print('*** response truncated! ***') + if rcode: + print('*** nonzero error code! (%d) ***' % rcode) + print(' qdcount=%d, ancount=%d, nscount=%d, arcount=%d' \ + % (qdcount, ancount, nscount, arcount)) + for i in range(qdcount): + print('QUESTION %d:' % i,) + dumpQ(u) + for i in range(ancount): + print('ANSWER %d:' % i,) + dumpRR(u) + for i in range(nscount): + print('AUTHORITY RECORD %d:' % i,) + dumpRR(u) + for i in range(arcount): + print('ADDITIONAL RECORD %d:' % i,) + dumpRR(u) + + +class DnsResult: + + def __init__(self, u, args): + self.header = {} + self.questions = [] + self.answers = [] + self.authority = [] + self.additional = [] + self.args = args + self.storeM(u) + + def show(self): + import time + print('; <<>> PDG.py 1.0 <<>> %s %s' % (self.args['name'], + self.args['qtype'])) + opt = "" + if self.args['rd']: + opt = opt + 'recurs ' + h = self.header + print(';; options: ' + opt) + print(';; got answer:') + print(';; ->>HEADER<<- opcode %s, status %s, id %d' % ( + h['opcode'], h['status'], h['id'])) + flags = filter(lambda x, h=h: h[x], ('qr', 'aa', 'rd', 'ra', 'tc')) + print(';; flags: %s; Ques: %d, Ans: %d, Auth: %d, Addit: %d' % ( + ''.join(map(str,flags)), h['qdcount'], h['ancount'], h['nscount'], + h['arcount'])) + print(';; QUESTIONS:') + for q in self.questions: + print(';; %s, type = %s, class = %s' % (q['qname'], q['qtypestr'], + q['qclassstr'])) + print() + print(';; ANSWERS:') + for a in self.answers: + print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], + a['data'])) + print() + print(';; AUTHORITY RECORDS:') + for a in self.authority: + print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], + a['data'])) + print() + print(';; ADDITIONAL RECORDS:') + for a in self.additional: + print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], + a['data'])) + print() + if 'elapsed' in self.args: + print(';; Total query time: %d msec' % self.args['elapsed']) + print(';; To SERVER: %s' % (self.args['server'])) + print(';; WHEN: %s' % time.ctime(time.time())) + + def storeM(self, u): + (self.header['id'], self.header['qr'], self.header['opcode'], + self.header['aa'], self.header['tc'], self.header['rd'], + self.header['ra'], self.header['z'], self.header['rcode'], + self.header['qdcount'], self.header['ancount'], + self.header['nscount'], self.header['arcount']) = u.getHeader() + self.header['opcodestr'] = Opcode.opcodestr(self.header['opcode']) + self.header['status'] = Status.statusstr(self.header['rcode']) + for i in range(self.header['qdcount']): + # print 'QUESTION %d:' % i, + self.questions.append(self.storeQ(u)) + for i in range(self.header['ancount']): + # print 'ANSWER %d:' % i, + self.answers.append(self.storeRR(u)) + for i in range(self.header['nscount']): + # print 'AUTHORITY RECORD %d:' % i, + self.authority.append(self.storeRR(u)) + for i in range(self.header['arcount']): + # print 'ADDITIONAL RECORD %d:' % i, + self.additional.append(self.storeRR(u)) + + def storeQ(self, u): + q = {} + q['qname'], q['qtype'], q['qclass'] = u.getQuestion() + q['qtypestr'] = Type.typestr(q['qtype']) + q['qclassstr'] = Class.classstr(q['qclass']) + return q + + def storeRR(self, u): + r = {} + r['name'], r['type'], r['class'], r[ + 'ttl'], r['rdlength'] = u.getRRheader() + r['typename'] = Type.typestr(r['type']) + r['classstr'] = Class.classstr(r['class']) + # print 'name=%s, type=%d(%s), class=%d(%s), ttl=%d' \ + # % (name, + # type, typename, + # klass, Class.classstr(class), + # ttl) + mname = 'get%sdata' % r['typename'] + if hasattr(u, mname): + r['data'] = getattr(u, mname)() + else: + r['data'] = u.getbytes(r['rdlength']) + return r + + +def dumpQ(u): + qname, qtype, qclass = u.getQuestion() + print('qname=%s, qtype=%d(%s), qclass=%d(%s)' \ + % (qname, + qtype, Type.typestr(qtype), + qclass, Class.classstr(qclass))) + + +def dumpRR(u): + name, type, klass, ttl, rdlength = u.getRRheader() + typename = Type.typestr(type) + print('name=%s, type=%d(%s), class=%d(%s), ttl=%d' \ + % (name, + type, typename, + klass, Class.classstr(klass), + ttl)) + mname = 'get%sdata' % typename + if hasattr(u, mname): + print(' formatted rdata:', getattr(u, mname)()) + else: + print(' binary rdata:', u.getbytes(rdlength)) + +if __name__ == "__main__": + testpacker() +# +# $Log: Lib.py,v $ +# Revision 1.11.2.3 2007/05/22 20:27:40 customdesigned +# Fix unpacker underflow. +# +# Revision 1.11.2.2 2007/05/22 20:25:53 customdesigned +# Use socket.inetntoa,inetaton. +# +# Revision 1.11.2.1 2007/05/22 20:20:39 customdesigned +# Mark utf-8 encoding +# +# Revision 1.11 2002/03/19 13:05:02 anthonybaxter +# converted to class based exceptions (there goes the python1.4 compatibility :) +# +# removed a quite gross use of 'eval()'. +# +# Revision 1.10 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.9 2002/03/19 10:30:33 anthonybaxter +# first round of major bits and pieces. The major stuff here (summarised +# from my local, off-net CVS server :/ this will cause some oddities with +# the +# +# tests/testPackers.py: +# a large slab of unit tests for the packer and unpacker code in DNS.Lib +# +# DNS/Lib.py: +# placeholder for addSRV. +# added 'klass' to addA, make it the same as the other A* records. +# made addTXT check for being passed a string, turn it into a length 1 list. +# explicitly check for adding a string of length > 255 (prohibited). +# a bunch of cleanups from a first pass with pychecker +# new code for pack/unpack. the bitwise stuff uses struct, for a smallish +# (disappointly small, actually) improvement, while addr2bin is much +# much faster now. +# +# DNS/Base.py: +# added DiscoverNameServers. This automatically does the right thing +# on unix/ win32. No idea how MacOS handles this. *sigh* +# Incompatible change: Don't use ParseResolvConf on non-unix, use this +# function, instead! +# a bunch of cleanups from a first pass with pychecker +# +# Revision 1.8 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.7 2001/07/19 07:50:44 anthony +# Added SRV (RFC 2782) support. Code from Michael Str�der. +# +# Revision 1.6 2001/07/19 07:39:18 anthony +# 'type' -> 'rrtype' in getRRheader(). Fix from Michael Str�der. +# +# Revision 1.5 2001/07/19 07:34:19 anthony +# oops. glitch in storeRR (fixed now). +# Reported by Bastian Kleineidam and by greg lin. +# +# Revision 1.4 2001/07/19 07:16:42 anthony +# Changed (opcode&0xF)<<11 to (opcode*0xF)<<11. +# Patch from Timothy J. Miller. +# +# Revision 1.3 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/Opcode.py b/discovery/DNS/Opcode.py new file mode 100644 index 00000000..c1310275 --- /dev/null +++ b/discovery/DNS/Opcode.py @@ -0,0 +1,52 @@ +""" + $Id: Opcode.py,v 1.6 2002/04/23 10:51:43 anthonybaxter Exp $ + + This file is part of the pydns project. + Homepage: http://pydns.sourceforge.net + + This code is covered by the standard Python License. + + Opcode values in message header. RFC 1035, 1996, 2136. +""" + + +QUERY = 0 +IQUERY = 1 +STATUS = 2 +NOTIFY = 4 +UPDATE = 5 + +# Construct reverse mapping dictionary + +_names = dir() +opcodemap = {} +for _name in _names: + if _name[0] != '_': + opcodemap[eval(_name)] = _name + + +def opcodestr(opcode): + if opcode in opcodemap: + return opcodemap[opcode] + else: + return repr(opcode) + +# +# $Log: Opcode.py,v $ +# Revision 1.6 2002/04/23 10:51:43 anthonybaxter +# Added UPDATE, NOTIFY. +# +# Revision 1.5 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.4 2002/03/19 12:26:13 anthonybaxter +# death to leading tabs. +# +# Revision 1.3 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/Status.py b/discovery/DNS/Status.py new file mode 100644 index 00000000..3a5cf5d0 --- /dev/null +++ b/discovery/DNS/Status.py @@ -0,0 +1,67 @@ +""" + $Id: Status.py,v 1.7 2002/04/23 12:52:19 anthonybaxter Exp $ + + This file is part of the pydns project. + Homepage: http://pydns.sourceforge.net + + This code is covered by the standard Python License. + + Status values in message header +""" + +NOERROR = 0 # No Error [RFC 1035] +FORMERR = 1 # Format Error [RFC 1035] +SERVFAIL = 2 # Server Failure [RFC 1035] +NXDOMAIN = 3 # Non-Existent Domain [RFC 1035] +NOTIMP = 4 # Not Implemented [RFC 1035] +REFUSED = 5 # Query Refused [RFC 1035] +YXDOMAIN = 6 # Name Exists when it should not [RFC 2136] +YXRRSET = 7 # RR Set Exists when it should not [RFC 2136] +NXRRSET = 8 # RR Set that should exist does not [RFC 2136] +NOTAUTH = 9 # Server Not Authoritative for zone [RFC 2136] +NOTZONE = 10 # Name not contained in zone [RFC 2136] +BADVERS = 16 # Bad OPT Version [RFC 2671] +BADSIG = 16 # TSIG Signature Failure [RFC 2845] +BADKEY = 17 # Key not recognized [RFC 2845] +BADTIME = 18 # Signature out of time window [RFC 2845] +BADMODE = 19 # Bad TKEY Mode [RFC 2930] +BADNAME = 20 # Duplicate key name [RFC 2930] +BADALG = 21 # Algorithm not supported [RFC 2930] + +# Construct reverse mapping dictionary + +_names = dir() +statusmap = {} +for _name in _names: + if _name[0] != '_': + statusmap[eval(_name)] = _name + + +def statusstr(status): + if status in statusmap: + return statusmap[status] + else: + return repr(status) + +# +# $Log: Status.py,v $ +# Revision 1.7 2002/04/23 12:52:19 anthonybaxter +# cleanup whitespace. +# +# Revision 1.6 2002/04/23 10:57:57 anthonybaxter +# update to complete the list of response codes. +# +# Revision 1.5 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.4 2002/03/19 12:26:13 anthonybaxter +# death to leading tabs. +# +# Revision 1.3 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/Type.py b/discovery/DNS/Type.py new file mode 100644 index 00000000..5db5b55a --- /dev/null +++ b/discovery/DNS/Type.py @@ -0,0 +1,80 @@ +# -*- encoding: utf-8 -*- +""" + $Id: Type.py,v 1.6.2.1 2007/05/22 20:20:39 customdesigned Exp $ + + This file is part of the pydns project. + Homepage: http://pydns.sourceforge.net + + This code is covered by the standard Python License. + + TYPE values (section 3.2.2) +""" + +A = 1 # a host address +NS = 2 # an authoritative name server +MD = 3 # a mail destination (Obsolete - use MX) +MF = 4 # a mail forwarder (Obsolete - use MX) +CNAME = 5 # the canonical name for an alias +SOA = 6 # marks the start of a zone of authority +MB = 7 # a mailbox domain name (EXPERIMENTAL) +MG = 8 # a mail group member (EXPERIMENTAL) +MR = 9 # a mail rename domain name (EXPERIMENTAL) +NULL = 10 # a null RR (EXPERIMENTAL) +WKS = 11 # a well known service description +PTR = 12 # a domain name pointer +HINFO = 13 # host information +MINFO = 14 # mailbox or mail list information +MX = 15 # mail exchange +TXT = 16 # text strings +AAAA = 28 # IPv6 AAAA records (RFC 1886) +SRV = 33 # DNS RR for specifying the location of services (RFC 2782) + + +# Additional TYPE values from host.c source + +UNAME = 110 +MP = 240 + +# QTYPE values (section 3.2.3) + +AXFR = 252 # A request for a transfer of an entire zone +MAILB = 253 # A request for mailbox-related records (MB, MG or MR) +MAILA = 254 # A request for mail agent RRs (Obsolete - see MX) +ANY = 255 # A request for all records + +# Construct reverse mapping dictionary + +_names = dir() +typemap = {} +for _name in _names: + if _name[0] != '_': + typemap[eval(_name)] = _name + + +def typestr(type): + if type in typemap: + return typemap[type] + else: + return repr(type) +# +# $Log: Type.py,v $ +# Revision 1.6.2.1 2007/05/22 20:20:39 customdesigned +# Mark utf-8 encoding +# +# Revision 1.6 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.5 2002/03/19 12:26:13 anthonybaxter +# death to leading tabs. +# +# Revision 1.4 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.3 2001/07/19 07:38:28 anthony +# added type code for SRV. From Michael Ströder. +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/__init__.py b/discovery/DNS/__init__.py new file mode 100644 index 00000000..0b7302f1 --- /dev/null +++ b/discovery/DNS/__init__.py @@ -0,0 +1,60 @@ +# -*- encoding: utf-8 -*- +# $Id: __init__.py,v 1.8.2.2 2007/05/22 21:06:52 customdesigned Exp $ +# +# This file is part of the pydns project. +# Homepage: http://pydns.sourceforge.net +# +# This code is covered by the standard Python License. +# + +# __init__.py for DNS class. + +__version__ = '2.3.1' + +from discovery.DNS import Type +from discovery.DNS import Opcode +from discovery.DNS import Status +from discovery.DNS import Class +from discovery.DNS.Base import DnsRequest, DNSError +from discovery.DNS.Lib import DnsResult +from discovery.DNS.Base import * +from discovery.DNS.Lib import * +Error = DNSError +from discovery.DNS.lazy import * +Request = DnsRequest +Result = DnsResult + +# +# $Log: __init__.py,v $ +# Revision 1.8.2.2 2007/05/22 21:06:52 customdesigned +# utf-8 in __init__.py +# +# Revision 1.8.2.1 2007/05/22 20:39:20 customdesigned +# Release 2.3.1 +# +# Revision 1.8 2002/05/06 06:17:49 anthonybaxter +# found that the old README file called itself release 2.2. So make +# this one 2.3... +# +# Revision 1.7 2002/05/06 06:16:15 anthonybaxter +# make some sort of reasonable version string. releasewards ho! +# +# Revision 1.6 2002/03/19 13:05:02 anthonybaxter +# converted to class based exceptions (there goes the python1.4 compatibility :) +# +# removed a quite gross use of 'eval()'. +# +# Revision 1.5 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.4 2001/11/26 17:57:51 stroeder +# Added __version__ +# +# Revision 1.3 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# \ No newline at end of file diff --git a/discovery/DNS/lazy.py b/discovery/DNS/lazy.py new file mode 100644 index 00000000..4f2ba331 --- /dev/null +++ b/discovery/DNS/lazy.py @@ -0,0 +1,53 @@ +# $Id: lazy.py,v 1.5.2.1 2007/05/22 20:23:38 customdesigned Exp $ +# +# This file is part of the pydns project. +# Homepage: http://pydns.sourceforge.net +# +# This code is covered by the standard Python License. +# + +# routines for lazy people. +from discovery.DNS import Base + +def revlookup(name): + "convenience routine for doing a reverse lookup of an address" + if Base.defaults['server'] == []: + Base.DiscoverNameServers() + a = name.split('.') + a.reverse() + s = '.' + b = s.join(a) + '.in-addr.arpa' + # this will only return one of any records returned. + return Base.DnsRequest(b, qtype='ptr').req().answers[0]['data'] + + +def mxlookup(name): + """ + convenience routine for doing an MX lookup of a name. returns a + sorted list of (preference, mail exchanger) records + """ + if Base.defaults['server'] == []: + Base.DiscoverNameServers() + a = Base.DnsRequest(name, qtype='mx').req().answers + l = sorted(map(lambda x: x['data'], a)) + return l + +# +# $Log: lazy.py,v $ +# Revision 1.5.2.1 2007/05/22 20:23:38 customdesigned +# Lazy call to DiscoverNameServers +# +# Revision 1.5 2002/05/06 06:14:38 anthonybaxter +# reformat, move import to top of file. +# +# Revision 1.4 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. +# yay. +# +# Revision 1.3 2001/08/09 09:08:55 anthonybaxter +# added identifying header to top of each file +# +# Revision 1.2 2001/07/19 06:57:07 anthony +# cvs keywords added +# +# diff --git a/discovery/DNS/win32dns.py b/discovery/DNS/win32dns.py new file mode 100644 index 00000000..afffb82c --- /dev/null +++ b/discovery/DNS/win32dns.py @@ -0,0 +1,143 @@ +""" + $Id: win32dns.py,v 1.3.2.1 2007/05/22 20:26:49 customdesigned Exp $ + + Extract a list of TCP/IP name servers from the registry 0.1 + 0.1 Strobl 2001-07-19 + Usage: + RegistryResolve() returns a list of ip numbers (dotted quads), by + scouring the registry for addresses of name servers + + Tested on Windows NT4 Server SP6a, Windows 2000 Pro SP2 and + Whistler Pro (XP) Build 2462 and Windows ME + ... all having a different registry layout wrt name servers :-/ + + Todo: + + Program doesn't check whether an interface is up or down + + (c) 2001 Copyright by Wolfgang Strobl ws@mystrobl.de, + License analog to the current Python license +""" + +import winreg + +def binipdisplay(s): + "convert a binary array of ip adresses to a python list" + if len(s) % 4 != 0: + raise EnvironmentError # well ... + ol = [] + s = '.' + for i in range(int(len(s) / 4)): + s1 = s[:4] + s = s[4:] + ip = [] + for j in s1: + ip.append(str(ord(j))) + ol.append(s.join(ip)) + return ol + + +def stringdisplay(s): + '''convert "d.d.d.d,d.d.d.d" to ["d.d.d.d","d.d.d.d"]. + also handle u'd.d.d.d d.d.d.d', as reporting on SF + ''' + import re + return map(str, re.split("[ ,]", s)) + + +def RegistryResolve(): + nameservers = [] + x = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) + try: + y = winreg.OpenKey(x, + r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters") + except EnvironmentError: # so it isn't NT/2000/XP + # windows ME, perhaps? + try: # for Windows ME + y = winreg.OpenKey(x, + r"SYSTEM\CurrentControlSet\Services\VxD\MSTCP") + nameserver, dummytype = winreg.QueryValueEx(y, 'NameServer') + if nameserver and not (nameserver in nameservers): + nameservers.extend(stringdisplay(nameserver)) + except EnvironmentError: + pass + return nameservers # no idea + try: + nameserver = winreg.QueryValueEx(y, "DhcpNameServer")[0].split() + except: + nameserver = winreg.QueryValueEx(y, "NameServer")[0].split() + if nameserver: + nameservers = nameserver + nameserver = winreg.QueryValueEx(y, "NameServer")[0] + winreg.CloseKey(y) + try: # for win2000 + y = winreg.OpenKey(x, + r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters") + for i in range(1000): + try: + n = winreg.EnumKey(y, i) + z = winreg.OpenKey(y, n) + dnscount, dnscounttype = winreg.QueryValueEx(z, + 'DNSServerAddressCount') + dnsvalues, dnsvaluestype = winreg.QueryValueEx(z, + 'DNSServerAddresses') + nameservers.extend(binipdisplay(dnsvalues)) + winreg.CloseKey(z) + except EnvironmentError: + break + winreg.CloseKey(y) + except EnvironmentError: + pass +# + try: # for whistler + y = winreg.OpenKey(x, + r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces") + for i in range(1000): + try: + n = winreg.EnumKey(y, i) + z = winreg.OpenKey(y, n) + try: + nameserver, dummytype = winreg.QueryValueEx( + z, 'NameServer') + if nameserver and not (nameserver in nameservers): + nameservers.extend(stringdisplay(nameserver)) + except EnvironmentError: + pass + winreg.CloseKey(z) + except EnvironmentError: + break + winreg.CloseKey(y) + except EnvironmentError: + # print "Key Interfaces not found, just do nothing." + pass +# + winreg.CloseKey(x) + return nameservers + + +if __name__ == "__main__": + print('Name servers:', RegistryResolve()) + +# $Log: win32dns.py,v $ +# Revision 1.3.2.1 2007/05/22 20:26:49 customdesigned +# Fix win32 nameserver discovery. +# +# Revision 1.3 2002/05/06 06:15:31 anthonybaxter +# apparently some versions of windows return servers as unicode +# string with space sep, rather than strings with comma sep. +# *sigh* +# +# Revision 1.2 2002/03/19 12:41:33 anthonybaxter +# tabnannied and reindented everything. 4 space indent, no tabs. yay. +# +# Revision 1.1 2001/08/09 09:22:28 anthonybaxter +# added what I hope is win32 resolver lookup support. I'll need to try +# and figure out how to get the CVS checkout onto my windows machine to +# make sure it works (wow, doing something other than games on the +# windows machine :) +# +# Code from Wolfgang.Strobl@gmd.de +# win32dns.py from +# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66260 +# +# Really, ParseResolvConf() should be renamed "FindNameServers" or some such. diff --git a/discovery/IPy.py b/discovery/IPy.py new file mode 100644 index 00000000..eba4b55c --- /dev/null +++ b/discovery/IPy.py @@ -0,0 +1,1650 @@ +""" +IPy - class and tools for handling of IPv4 and IPv6 addresses and networks. +See README file for learn how to use IPy. + +Further Information might be available at: +https://github.com/haypo/python-ipy +""" + +__version__ = '0.83' + +import bisect +import collections +import sys +import types + +# Definition of the ranges for IPv4 IPs should include +# www.iana.org/assignments/ipv4-address-space +# and www.iana.org/assignments/multicast-addresses +IPv4ranges = { + '0': 'PUBLIC', # fall back + '00000000': 'PRIVATE', # 0/8 + '00001010': 'PRIVATE', # 10/8 + '0110010001': 'CARRIER_GRADE_NAT', # 100.64/10 + '01111111': 'LOOPBACK', # 127.0/8 + '1': 'PUBLIC', # fall back + '1010100111111110': 'PRIVATE', # 169.254/16 + '101011000001': 'PRIVATE', # 172.16/12 + '1100000010101000': 'PRIVATE', # 192.168/16 + '111': 'RESERVED', # 224/3 + } + +# Definition of the ranges for IPv6 IPs +# http://www.iana.org/assignments/ipv6-address-space/ +# http://www.iana.org/assignments/ipv6-unicast-address-assignments/ +# http://www.iana.org/assignments/ipv6-multicast-addresses/ +IPv6ranges = { + '00000000' : 'RESERVED', # ::/8 + '0' * 96 : 'RESERVED', # ::/96 Formerly IPV4COMP [RFC4291] + '0' * 128 : 'UNSPECIFIED', # ::/128 + '0' * 127 + '1' : 'LOOPBACK', # ::1/128 + '0' * 80 + '1' * 16 : 'IPV4MAP', # ::ffff:0:0/96 + '00000000011001001111111110011011' + '0' * 64 : 'WKP46TRANS', # 0064:ff9b::/96 Well-Known-Prefix [RFC6052] + '00000001' : 'UNASSIGNED', # 0100::/8 + '0000001' : 'RESERVED', # 0200::/7 Formerly NSAP [RFC4048] + '0000010' : 'RESERVED', # 0400::/7 Formerly IPX [RFC3513] + '0000011' : 'RESERVED', # 0600::/7 + '00001' : 'RESERVED', # 0800::/5 + '0001' : 'RESERVED', # 1000::/4 + '001' : 'GLOBAL-UNICAST', # 2000::/3 [RFC4291] + '00100000000000010000000' : 'SPECIALPURPOSE', # 2001::/23 [RFC4773] + '00100000000000010000000000000000' : 'TEREDO', # 2001::/32 [RFC4380] + '00100000000000010000000000000010' + '0' * 16 : 'BMWG', # 2001:0002::/48 Benchmarking [RFC5180] + '0010000000000001000000000001' : 'ORCHID', # 2001:0010::/28 (Temp until 2014-03-21) [RFC4843] + '00100000000000010000001' : 'ALLOCATED APNIC', # 2001:0200::/23 + '00100000000000010000010' : 'ALLOCATED ARIN', # 2001:0400::/23 + '00100000000000010000011' : 'ALLOCATED RIPE NCC', # 2001:0600::/23 + '00100000000000010000100' : 'ALLOCATED RIPE NCC', # 2001:0800::/23 + '00100000000000010000101' : 'ALLOCATED RIPE NCC', # 2001:0a00::/23 + '00100000000000010000110' : 'ALLOCATED APNIC', # 2001:0c00::/23 + '00100000000000010000110110111000' : 'DOCUMENTATION', # 2001:0db8::/32 [RFC3849] + '00100000000000010000111' : 'ALLOCATED APNIC', # 2001:0e00::/23 + '00100000000000010001001' : 'ALLOCATED LACNIC', # 2001:1200::/23 + '00100000000000010001010' : 'ALLOCATED RIPE NCC', # 2001:1400::/23 + '00100000000000010001011' : 'ALLOCATED RIPE NCC', # 2001:1600::/23 + '00100000000000010001100' : 'ALLOCATED ARIN', # 2001:1800::/23 + '00100000000000010001101' : 'ALLOCATED RIPE NCC', # 2001:1a00::/23 + '0010000000000001000111' : 'ALLOCATED RIPE NCC', # 2001:1c00::/22 + '00100000000000010010' : 'ALLOCATED RIPE NCC', # 2001:2000::/20 + '001000000000000100110' : 'ALLOCATED RIPE NCC', # 2001:3000::/21 + '0010000000000001001110' : 'ALLOCATED RIPE NCC', # 2001:3800::/22 + '0010000000000001001111' : 'RESERVED', # 2001:3c00::/22 Possible future allocation to RIPE NCC + '00100000000000010100000' : 'ALLOCATED RIPE NCC', # 2001:4000::/23 + '00100000000000010100001' : 'ALLOCATED AFRINIC', # 2001:4200::/23 + '00100000000000010100010' : 'ALLOCATED APNIC', # 2001:4400::/23 + '00100000000000010100011' : 'ALLOCATED RIPE NCC', # 2001:4600::/23 + '00100000000000010100100' : 'ALLOCATED ARIN', # 2001:4800::/23 + '00100000000000010100101' : 'ALLOCATED RIPE NCC', # 2001:4a00::/23 + '00100000000000010100110' : 'ALLOCATED RIPE NCC', # 2001:4c00::/23 + '00100000000000010101' : 'ALLOCATED RIPE NCC', # 2001:5000::/20 + '0010000000000001100' : 'ALLOCATED APNIC', # 2001:8000::/19 + '00100000000000011010' : 'ALLOCATED APNIC', # 2001:a000::/20 + '00100000000000011011' : 'ALLOCATED APNIC', # 2001:b000::/20 + '0010000000000010' : '6TO4', # 2002::/16 "6to4" [RFC3056] + '001000000000001100' : 'ALLOCATED RIPE NCC', # 2003::/18 + '001001000000' : 'ALLOCATED APNIC', # 2400::/12 + '001001100000' : 'ALLOCATED ARIN', # 2600::/12 + '00100110000100000000000' : 'ALLOCATED ARIN', # 2610::/23 + '00100110001000000000000' : 'ALLOCATED ARIN', # 2620::/23 + '001010000000' : 'ALLOCATED LACNIC', # 2800::/12 + '001010100000' : 'ALLOCATED RIPE NCC', # 2a00::/12 + '001011000000' : 'ALLOCATED AFRINIC', # 2c00::/12 + '00101101' : 'RESERVED', # 2d00::/8 + '0010111' : 'RESERVED', # 2e00::/7 + '0011' : 'RESERVED', # 3000::/4 + '010' : 'RESERVED', # 4000::/3 + '011' : 'RESERVED', # 6000::/3 + '100' : 'RESERVED', # 8000::/3 + '101' : 'RESERVED', # a000::/3 + '110' : 'RESERVED', # c000::/3 + '1110' : 'RESERVED', # e000::/4 + '11110' : 'RESERVED', # f000::/5 + '111110' : 'RESERVED', # f800::/6 + '1111110' : 'ULA', # fc00::/7 [RFC4193] + '111111100' : 'RESERVED', # fe00::/9 + '1111111010' : 'LINKLOCAL', # fe80::/10 + '1111111011' : 'RESERVED', # fec0::/10 Formerly SITELOCAL [RFC4291] + '11111111' : 'MULTICAST', # ff00::/8 + '1111111100000001' : 'NODE-LOCAL MULTICAST', # ff01::/16 + '1111111100000010' : 'LINK-LOCAL MULTICAST', # ff02::/16 + '1111111100000100' : 'ADMIN-LOCAL MULTICAST', # ff04::/16 + '1111111100000101' : 'SITE-LOCAL MULTICAST', # ff05::/16 + '1111111100001000' : 'ORG-LOCAL MULTICAST', # ff08::/16 + '1111111100001110' : 'GLOBAL MULTICAST', # ff0e::/16 + '1111111100001111' : 'RESERVED MULTICAST', # ff0f::/16 + '111111110011' : 'PREFIX-BASED MULTICAST', # ff30::/12 [RFC3306] + '111111110111' : 'RP-EMBEDDED MULTICAST', # ff70::/12 [RFC3956] + } + +MAX_IPV4_ADDRESS = 0xffffffff +MAX_IPV6_ADDRESS = 0xffffffffffffffffffffffffffffffff +IPV6_TEST_MAP = 0xffffffffffffffffffffffff00000000 +IPV6_MAP_MASK = 0x00000000000000000000ffff00000000 + +if sys.version_info >= (3,): + INT_TYPES = (int,) + STR_TYPES = (str,) + xrange = range +else: + INT_TYPES = (int, long) + STR_TYPES = (str, unicode) + + +class IPint(object): + """Handling of IP addresses returning integers. + + Use class IP instead because some features are not implemented for IPint.""" + + def __init__(self, data, ipversion=0, make_net=0): + """Create an instance of an IP object. + + Data can be a network specification or a single IP. IP + addresses can be specified in all forms understood by + parseAddress(). The size of a network can be specified as + + /prefixlen a.b.c.0/24 2001:658:22a:cafe::/64 + -lastIP a.b.c.0-a.b.c.255 2001:658:22a:cafe::-2001:658:22a:cafe:ffff:ffff:ffff:ffff + /decimal netmask a.b.c.d/255.255.255.0 not supported for IPv6 + + If no size specification is given a size of 1 address (/32 for + IPv4 and /128 for IPv6) is assumed. + + If make_net is True, an IP address will be transformed into the network + address by applying the specified netmask. + + >>> print(IP('127.0.0.0/8')) + 127.0.0.0/8 + >>> print(IP('127.0.0.0/255.0.0.0')) + 127.0.0.0/8 + >>> print(IP('127.0.0.0-127.255.255.255')) + 127.0.0.0/8 + >>> print(IP('127.0.0.1/255.0.0.0', make_net=True)) + 127.0.0.0/8 + + See module documentation for more examples. + """ + + # Print no Prefixlen for /32 and /128. + self.NoPrefixForSingleIp = 1 + + # Do we want prefix printed by default? see _printPrefix() + self.WantPrefixLen = None + + netbits = 0 + prefixlen = -1 + + # Handling of non string values in constructor. + if isinstance(data, INT_TYPES): + self.ip = int(data) + if ipversion == 0: + if self.ip <= MAX_IPV4_ADDRESS: + ipversion = 4 + else: + ipversion = 6 + if ipversion == 4: + if self.ip > MAX_IPV4_ADDRESS: + raise ValueError("IPv4 Address can't be larger than %x: %x" % (MAX_IPV4_ADDRESS, self.ip)) + prefixlen = 32 + elif ipversion == 6: + if self.ip > MAX_IPV6_ADDRESS: + raise ValueError("IPv6 Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, self.ip)) + prefixlen = 128 + else: + raise ValueError("only IPv4 and IPv6 supported") + self._ipversion = ipversion + self._prefixlen = prefixlen + # Handle IP instance as an parameter. + elif isinstance(data, IPint): + self._ipversion = data._ipversion + self._prefixlen = data._prefixlen + self.ip = data.ip + elif isinstance(data, STR_TYPES): + # TODO: refactor me! + # Splitting of a string into IP and prefixlen et. al. + x = data.split('-') + if len(x) == 2: + # a.b.c.0-a.b.c.255 specification ? + (ip, last) = x + (self.ip, parsedVersion) = parseAddress(ip) + if parsedVersion != 4: + raise ValueError("first-last notation only allowed for IPv4") + (last, lastversion) = parseAddress(last) + if lastversion != 4: + raise ValueError("last address should be IPv4, too") + if last < self.ip: + raise ValueError("last address should be larger than first") + size = last - self.ip + netbits = _count1Bits(size) + # Make sure the broadcast is the same as the last IP, otherwise it + # will return /16 for something like: 192.168.0.0-192.168.191.255 + if IP('%s/%s' % (ip, 32-netbits)).broadcast().int() != last: + raise ValueError("the range %s is not on a network boundary." % data) + elif len(x) == 1: + x = data.split('/') + # If no prefix is given use defaults. + if len(x) == 1: + ip = x[0] + prefixlen = -1 + elif len(x) > 2: + raise ValueError("only one '/' allowed in IP Address") + else: + (ip, prefixlen) = x + if prefixlen.find('.') != -1: + # Check if the user might have used a netmask like a.b.c.d/255.255.255.0 + (netmask, vers) = parseAddress(prefixlen) + if vers != 4: + raise ValueError("netmask must be IPv4") + prefixlen = _netmaskToPrefixlen(netmask) + elif len(x) > 2: + raise ValueError("only one '-' allowed in IP Address") + else: + raise ValueError("can't parse") + + (self.ip, parsedVersion) = parseAddress(ip) + if ipversion == 0: + ipversion = parsedVersion + if prefixlen == -1: + bits = _ipVersionToLen(ipversion) + prefixlen = bits - netbits + self._ipversion = ipversion + self._prefixlen = int(prefixlen) + + if make_net: + self.ip = self.ip & _prefixlenToNetmask(self._prefixlen, self._ipversion) + + if not _checkNetaddrWorksWithPrefixlen(self.ip, + self._prefixlen, self._ipversion): + raise ValueError("%s has invalid prefix length (%s)" % (repr(self), self._prefixlen)) + else: + raise TypeError("Unsupported data type: %s" % type(data)) + + def int(self): + """Return the first / base / network addess as an (long) integer. + + The same as IP[0]. + + >>> "%X" % IP('10.0.0.0/8').int() + 'A000000' + """ + return self.ip + + def version(self): + """Return the IP version of this Object. + + >>> IP('10.0.0.0/8').version() + 4 + >>> IP('::1').version() + 6 + """ + return self._ipversion + + def prefixlen(self): + """Returns Network Prefixlen. + + >>> IP('10.0.0.0/8').prefixlen() + 8 + """ + return self._prefixlen + + def net(self): + """ + Return the base (first) address of a network as an (long) integer. + """ + return self.int() + + def broadcast(self): + """ + Return the broadcast (last) address of a network as an (long) integer. + + The same as IP[-1].""" + return self.int() + self.len() - 1 + + def _printPrefix(self, want): + """Prints Prefixlen/Netmask. + + Not really. In fact it is our universal Netmask/Prefixlen printer. + This is considered an internal function. + + want == 0 / None don't return anything 1.2.3.0 + want == 1 /prefix 1.2.3.0/24 + want == 2 /netmask 1.2.3.0/255.255.255.0 + want == 3 -lastip 1.2.3.0-1.2.3.255 + """ + + if (self._ipversion == 4 and self._prefixlen == 32) or \ + (self._ipversion == 6 and self._prefixlen == 128): + if self.NoPrefixForSingleIp: + want = 0 + if want == None: + want = self.WantPrefixLen + if want == None: + want = 1 + if want: + if want == 2: + # This should work with IP and IPint. + netmask = self.netmask() + if not isinstance(netmask, INT_TYPES): + netmask = netmask.int() + return "/%s" % (intToIp(netmask, self._ipversion)) + elif want == 3: + return "-%s" % (intToIp(self.ip + self.len() - 1, self._ipversion)) + else: + # default + return "/%d" % (self._prefixlen) + else: + return '' + + # We have different flavours to convert to: + # strFullsize 127.0.0.1 2001:0658:022a:cafe:0200:c0ff:fe8d:08fa + # strNormal 127.0.0.1 2001:658:22a:cafe:200:c0ff:fe8d:08fa + # strCompressed 127.0.0.1 2001:658:22a:cafe::1 + # strHex 0x7F000001 0x20010658022ACAFE0200C0FFFE8D08FA + # strDec 2130706433 42540616829182469433547974687817795834 + + def strBin(self, wantprefixlen = None): + """Return a string representation as a binary value. + + >>> print(IP('127.0.0.1').strBin()) + 01111111000000000000000000000001 + >>> print(IP('2001:0658:022a:cafe:0200::1').strBin()) + 00100000000000010000011001011000000000100010101011001010111111100000001000000000000000000000000000000000000000000000000000000001 + """ + + bits = _ipVersionToLen(self._ipversion) + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 0 + ret = _intToBin(self.ip) + return '0' * (bits - len(ret)) + ret + self._printPrefix(wantprefixlen) + + def strCompressed(self, wantprefixlen = None): + """Return a string representation in compressed format using '::' Notation. + + >>> IP('127.0.0.1').strCompressed() + '127.0.0.1' + >>> IP('2001:0658:022a:cafe:0200::1').strCompressed() + '2001:658:22a:cafe:200::1' + >>> IP('ffff:ffff:ffff:ffff:ffff:f:f:fffc/127').strCompressed() + 'ffff:ffff:ffff:ffff:ffff:f:f:fffc/127' + """ + + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 1 + + if self._ipversion == 4: + return self.strFullsize(wantprefixlen) + else: + if self.ip >> 32 == 0xffff: + ipv4 = intToIp(self.ip & MAX_IPV4_ADDRESS, 4) + text = "::ffff:" + ipv4 + self._printPrefix(wantprefixlen) + return text + # Find the longest sequence of '0'. + hextets = [int(x, 16) for x in self.strFullsize(0).split(':')] + # Every element of followingzeros will contain the number of zeros + # following the corresponding element of hextets. + followingzeros = [0] * 8 + for i in xrange(len(hextets)): + followingzeros[i] = _countFollowingZeros(hextets[i:]) + # compressionpos is the position where we can start removing zeros. + compressionpos = followingzeros.index(max(followingzeros)) + if max(followingzeros) > 1: + # Generate string with the longest number of zeros cut out. + # Now we need hextets as strings. + hextets = [x for x in self.strNormal(0).split(':')] + while compressionpos < len(hextets) and hextets[compressionpos] == '0': + del(hextets[compressionpos]) + hextets.insert(compressionpos, '') + if compressionpos + 1 >= len(hextets): + hextets.append('') + if compressionpos == 0: + hextets = [''] + hextets + return ':'.join(hextets) + self._printPrefix(wantprefixlen) + else: + return self.strNormal(0) + self._printPrefix(wantprefixlen) + + def strNormal(self, wantprefixlen = None): + """Return a string representation in the usual format. + + >>> print(IP('127.0.0.1').strNormal()) + 127.0.0.1 + >>> print(IP('2001:0658:022a:cafe:0200::1').strNormal()) + 2001:658:22a:cafe:200:0:0:1 + """ + + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 1 + + if self._ipversion == 4: + ret = self.strFullsize(0) + elif self._ipversion == 6: + ret = ':'.join(["%x" % x for x in [int(x, 16) for x in self.strFullsize(0).split(':')]]) + else: + raise ValueError("only IPv4 and IPv6 supported") + + + + return ret + self._printPrefix(wantprefixlen) + + def strFullsize(self, wantprefixlen = None): + """Return a string representation in the non-mangled format. + + >>> print(IP('127.0.0.1').strFullsize()) + 127.0.0.1 + >>> print(IP('2001:0658:022a:cafe:0200::1').strFullsize()) + 2001:0658:022a:cafe:0200:0000:0000:0001 + """ + + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 1 + + return intToIp(self.ip, self._ipversion) + self._printPrefix(wantprefixlen) + + def strHex(self, wantprefixlen = None): + """Return a string representation in hex format in lower case. + + >>> print(IP('127.0.0.1').strHex()) + 0x7f000001 + >>> print(IP('2001:0658:022a:cafe:0200::1').strHex()) + 0x20010658022acafe0200000000000001 + """ + + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 0 + + x = '0x%x' % self.ip + return x + self._printPrefix(wantprefixlen) + + def strDec(self, wantprefixlen = None): + """Return a string representation in decimal format. + + >>> print(IP('127.0.0.1').strDec()) + 2130706433 + >>> print(IP('2001:0658:022a:cafe:0200::1').strDec()) + 42540616829182469433547762482097946625 + """ + + if self.WantPrefixLen == None and wantprefixlen == None: + wantprefixlen = 0 + + x = '%d' % self.ip + return x + self._printPrefix(wantprefixlen) + + def iptype(self): + """Return a description of the IP type ('PRIVATE', 'RESERVED', etc). + + >>> print(IP('127.0.0.1').iptype()) + LOOPBACK + >>> print(IP('192.168.1.1').iptype()) + PRIVATE + >>> print(IP('195.185.1.2').iptype()) + PUBLIC + >>> print(IP('::1').iptype()) + LOOPBACK + >>> print(IP('2001:0658:022a:cafe:0200::1').iptype()) + ALLOCATED RIPE NCC + + The type information for IPv6 is out of sync with reality. + """ + + # This could be greatly improved. + if self._ipversion == 4: + iprange = IPv4ranges + elif self._ipversion == 6: + iprange = IPv6ranges + else: + raise ValueError("only IPv4 and IPv6 supported") + + bits = self.strBin() + for i in xrange(len(bits), 0, -1): + if bits[:i] in iprange: + return iprange[bits[:i]] + return "unknown" + + + def netmask(self): + """Return netmask as an integer. + + >>> "%X" % IP('195.185.0.0/16').netmask().int() + 'FFFF0000' + """ + + # TODO: unify with prefixlenToNetmask? + bits = _ipVersionToLen(self._ipversion) + locallen = bits - self._prefixlen + + return ((2 ** self._prefixlen) - 1) << locallen + + + def strNetmask(self): + """Return netmask as an string. Mostly useful for IPv6. + + >>> print(IP('195.185.0.0/16').strNetmask()) + 255.255.0.0 + >>> print(IP('2001:0658:022a:cafe::0/64').strNetmask()) + /64 + """ + + # TODO: unify with prefixlenToNetmask? + # Note: call to _ipVersionToLen() also validates version is 4 or 6. + bits = _ipVersionToLen(self._ipversion) + if self._ipversion == 4: + locallen = bits - self._prefixlen + return intToIp(((2 ** self._prefixlen) - 1) << locallen, 4) + elif self._ipversion == 6: + return "/%d" % self._prefixlen + + def len(self): + """Return the length of a subnet. + + >>> print(IP('195.185.1.0/28').len()) + 16 + >>> print(IP('195.185.1.0/24').len()) + 256 + """ + + bits = _ipVersionToLen(self._ipversion) + locallen = bits - self._prefixlen + return 2 ** locallen + + + def __nonzero__(self): + """All IPy objects should evaluate to true in boolean context. + Ordinarily they do, but if handling a default route expressed as + 0.0.0.0/0, the __len__() of the object becomes 0, which is used + as the boolean value of the object. + """ + return True + + def __bool__(self): + return self.__nonzero__() + + def __len__(self): + """ + Return the length of a subnet. + + Called to implement the built-in function len(). + It will break with large IPv6 Networks. + Use the object's len() instead. + """ + return self.len() + + def __add__(self, other): + """Emulate numeric objects through network aggregation""" + if self._ipversion != other._ipversion: + raise ValueError("Only networks with the same IP version can be added.") + if self._prefixlen != other._prefixlen: + raise ValueError("Only networks with the same prefixlen can be added.") + if self._prefixlen < 1: + raise ValueError("Networks with a prefixlen longer than /1 can't be added.") + if self > other: + # Fixed by Skinny Puppy . + return other.__add__(self) + if other.int() - self[-1].int() != 1: + raise ValueError("Only adjacent networks can be added together.") + ret = IP(self.int(), ipversion=self._ipversion) + ret._prefixlen = self.prefixlen() - 1 + if not _checkNetaddrWorksWithPrefixlen(ret.ip, ret._prefixlen, + ret._ipversion): + raise ValueError("The resulting %s has invalid prefix length (%s)" + % (repr(ret), ret._prefixlen)) + return ret + + def __sub__(self, other): + """Return the prefixes that are in this IP but not in the other""" + return _remove_subprefix(self, other) + + def __getitem__(self, key): + """Called to implement evaluation of self[key]. + + >>> ip=IP('127.0.0.0/30') + >>> for x in ip: + ... print(repr(x)) + ... + IP('127.0.0.0') + IP('127.0.0.1') + IP('127.0.0.2') + IP('127.0.0.3') + >>> ip[2] + IP('127.0.0.2') + >>> ip[-1] + IP('127.0.0.3') + """ + + if isinstance(key, slice): + return [self.ip + int(x) for x in xrange(*key.indices(len(self)))] + if not isinstance(key, INT_TYPES): + raise TypeError + if key < 0: + if abs(key) <= self.len(): + key = self.len() - abs(key) + else: + raise IndexError + else: + if key >= self.len(): + raise IndexError + + return self.ip + int(key) + + + + def __contains__(self, item): + """Called to implement membership test operators. + + Should return true if item is in self, false otherwise. Item + can be other IP-objects, strings or ints. + + >>> IP('195.185.1.1').strHex() + '0xc3b90101' + >>> 0xC3B90101 in IP('195.185.1.0/24') + True + >>> '127.0.0.1' in IP('127.0.0.0/24') + True + >>> IP('127.0.0.0/24') in IP('127.0.0.0/25') + False + """ + + if isinstance(item, IP): + if item._ipversion != self._ipversion: + return False + else: + item = IP(item) + if item.ip >= self.ip and item.ip < self.ip + self.len() - item.len() + 1: + return True + else: + return False + + + def overlaps(self, item): + """Check if two IP address ranges overlap. + + Returns 0 if the two ranges don't overlap, 1 if the given + range overlaps at the end and -1 if it does at the beginning. + + >>> IP('192.168.0.0/23').overlaps('192.168.1.0/24') + 1 + >>> IP('192.168.0.0/23').overlaps('192.168.1.255') + 1 + >>> IP('192.168.0.0/23').overlaps('192.168.2.0') + 0 + >>> IP('192.168.1.0/24').overlaps('192.168.0.0/23') + -1 + """ + + if not isinstance(item, IP): + item = IP(item) + if item.ip >= self.ip and item.ip < self.ip + self.len(): + return 1 + elif self.ip >= item.ip and self.ip < item.ip + item.len(): + return -1 + else: + return 0 + + + def __str__(self): + """Dispatch to the prefered String Representation. + + Used to implement str(IP).""" + + return self.strCompressed() + + + def __repr__(self): + """Print a representation of the Object. + + Used to implement repr(IP). Returns a string which evaluates + to an identical Object (without the wantprefixlen stuff - see + module docstring. + + >>> print(repr(IP('10.0.0.0/24'))) + IP('10.0.0.0/24') + """ + + return("IPint('%s')" % (self.strCompressed(1))) + + + def __cmp__(self, other): + """Called by comparison operations. + + Should return a negative integer if self < other, zero if self + == other, a positive integer if self > other. + + Order is first determined by the address family. IPv4 addresses + are always smaller than IPv6 addresses: + + >>> IP('10.0.0.0') < IP('2001:db8::') + 1 + + Then the first address is compared. Lower addresses are + always smaller: + + >>> IP('10.0.0.0') > IP('10.0.0.1') + 0 + >>> IP('10.0.0.0/24') > IP('10.0.0.1') + 0 + >>> IP('10.0.1.0') > IP('10.0.0.0/24') + 1 + >>> IP('10.0.1.0/24') > IP('10.0.0.0/24') + 1 + >>> IP('10.0.1.0/24') > IP('10.0.0.0') + 1 + + Then the prefix length is compared. Shorter prefixes are + considered smaller than longer prefixes: + + >>> IP('10.0.0.0/24') > IP('10.0.0.0') + 0 + >>> IP('10.0.0.0/24') > IP('10.0.0.0/25') + 0 + >>> IP('10.0.0.0/24') > IP('10.0.0.0/23') + 1 + + """ + if not isinstance(other, IPint): + raise TypeError + + # Lower version -> lower result. + if self._ipversion != other._ipversion: + return self._ipversion < other._ipversion and -1 or 1 + + # Lower start address -> lower result. + if self.ip != other.ip: + return self.ip < other.ip and -1 or 1 + + # Shorter prefix length -> lower result. + if self._prefixlen != other._prefixlen: + return self._prefixlen < other._prefixlen and -1 or 1 + + # No differences found. + return 0 + + def __eq__(self, other): + if not isinstance(other, IPint): + return False + return self.__cmp__(other) == 0 + + def __ne__(self, other): + return not self.__eq__(other) + + def __lt__(self, other): + return self.__cmp__(other) < 0 + + def __le__(self, other): + return self.__cmp__(other) <= 0 + + def __hash__(self): + """Called for the key object for dictionary operations, and by + the built-in function hash(). Should return a 32-bit integer + usable as a hash value for dictionary operations. The only + required property is that objects which compare equal have the + same hash value + + >>> IP('10.0.0.0/24').__hash__() + -167772185 + """ + + thehash = int(-1) + ip = self.ip + while ip > 0: + thehash = thehash ^ (ip & 0x7fffffff) + ip = ip >> 32 + thehash = thehash ^ self._prefixlen + return int(thehash) + + +class IP(IPint): + """Class for handling IP addresses and networks.""" + + def net(self): + """Return the base (first) address of a network as an IP object. + + The same as IP[0]. + + >>> IP('10.0.0.0/8').net() + IP('10.0.0.0') + """ + return IP(IPint.net(self), ipversion=self._ipversion) + + def broadcast(self): + """Return the broadcast (last) address of a network as an IP object. + + The same as IP[-1]. + + >>> IP('10.0.0.0/8').broadcast() + IP('10.255.255.255') + """ + return IP(IPint.broadcast(self)) + + def netmask(self): + """Return netmask as an IP object. + + >>> IP('10.0.0.0/8').netmask() + IP('255.0.0.0') + """ + return IP(IPint.netmask(self), ipversion=self._ipversion) + + def _getIPv4Map(self): + if self._ipversion != 6: + return None + if (self.ip >> 32) != 0xffff: + return None + ipv4 = self.ip & MAX_IPV4_ADDRESS + if self._prefixlen != 128: + ipv4 = '%s/%s' % (ipv4, 32-(128-self._prefixlen)) + return IP(ipv4, ipversion=4) + + def reverseNames(self): + """Return a list with values forming the reverse lookup. + + >>> IP('213.221.113.87/32').reverseNames() + ['87.113.221.213.in-addr.arpa.'] + >>> IP('213.221.112.224/30').reverseNames() + ['224.112.221.213.in-addr.arpa.', '225.112.221.213.in-addr.arpa.', '226.112.221.213.in-addr.arpa.', '227.112.221.213.in-addr.arpa.'] + >>> IP('127.0.0.0/24').reverseNames() + ['0.0.127.in-addr.arpa.'] + >>> IP('127.0.0.0/23').reverseNames() + ['0.0.127.in-addr.arpa.', '1.0.127.in-addr.arpa.'] + >>> IP('127.0.0.0/16').reverseNames() + ['0.127.in-addr.arpa.'] + >>> IP('127.0.0.0/15').reverseNames() + ['0.127.in-addr.arpa.', '1.127.in-addr.arpa.'] + >>> IP('128.0.0.0/8').reverseNames() + ['128.in-addr.arpa.'] + >>> IP('128.0.0.0/7').reverseNames() + ['128.in-addr.arpa.', '129.in-addr.arpa.'] + >>> IP('::1:2').reverseNames() + ['2.0.0.0.1.ip6.arpa.'] + """ + + if self._ipversion == 4: + ret = [] + # TODO: Refactor. Add support for IPint objects. + if self.len() < 2**8: + for x in self: + ret.append(x.reverseName()) + elif self.len() < 2**16: + for i in xrange(0, self.len(), 2**8): + ret.append(self[i].reverseName()[2:]) + elif self.len() < 2**24: + for i in xrange(0, self.len(), 2**16): + ret.append(self[i].reverseName()[4:]) + else: + for i in xrange(0, self.len(), 2**24): + ret.append(self[i].reverseName()[6:]) + return ret + elif self._ipversion == 6: + ipv4 = self._getIPv4Map() + if ipv4 is not None: + return ipv4.reverseNames() + s = "%x" % self.ip + if self._prefixlen % 4 != 0: + raise NotImplementedError("can't create IPv6 reverse names at sub nibble level") + s = list(s) + s.reverse() + s = '.'.join(s) + first_nibble_index = int(32 - (self._prefixlen // 4)) * 2 + return ["%s.ip6.arpa." % s[first_nibble_index:]] + else: + raise ValueError("only IPv4 and IPv6 supported") + + def reverseName(self): + """Return the value for reverse lookup/PTR records as RFC 2317 look alike. + + RFC 2317 is an ugly hack which only works for sub-/24 e.g. not + for /23. Do not use it. Better set up a zone for every + address. See reverseName for a way to achieve that. + + >>> print(IP('195.185.1.1').reverseName()) + 1.1.185.195.in-addr.arpa. + >>> print(IP('195.185.1.0/28').reverseName()) + 0-15.1.185.195.in-addr.arpa. + >>> IP('::1:2').reverseName() + '2.0.0.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.' + >>> IP('ff02::/64').reverseName() + '0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa.' + """ + + if self._ipversion == 4: + s = self.strFullsize(0) + s = s.split('.') + s.reverse() + first_byte_index = int(4 - (self._prefixlen // 8)) + if self._prefixlen % 8 != 0: + nibblepart = "%s-%s" % (s[3-(self._prefixlen // 8)], intToIp(self.ip + self.len() - 1, 4).split('.')[-1]) + nibblepart += '.' + else: + nibblepart = "" + + s = '.'.join(s[first_byte_index:]) + return "%s%s.in-addr.arpa." % (nibblepart, s) + + elif self._ipversion == 6: + ipv4 = self._getIPv4Map() + if ipv4 is not None: + return ipv4.reverseName() + s = '%032x' % self.ip + if self._prefixlen % 4 != 0: + nibblepart = "%s-%x" % (s[self._prefixlen:], self.ip + self.len() - 1) + nibblepart += '.' + else: + nibblepart = "" + s = list(s) + s.reverse() + s = '.'.join(s) + first_nibble_index = int(32 - (self._prefixlen // 4)) * 2 + return "%s%s.ip6.arpa." % (nibblepart, s[first_nibble_index:]) + else: + raise ValueError("only IPv4 and IPv6 supported") + + def make_net(self, netmask): + """Transform a single IP address into a network specification by + applying the given netmask. + + Returns a new IP instance. + + >>> print(IP('127.0.0.1').make_net('255.0.0.0')) + 127.0.0.0/8 + """ + if '/' in str(netmask): + raise ValueError("invalid netmask (%s)" % netmask) + return IP('%s/%s' % (self, netmask), make_net=True) + + def __getitem__(self, key): + """Called to implement evaluation of self[key]. + + >>> ip=IP('127.0.0.0/30') + >>> for x in ip: + ... print(str(x)) + ... + 127.0.0.0 + 127.0.0.1 + 127.0.0.2 + 127.0.0.3 + >>> print(str(ip[2])) + 127.0.0.2 + >>> print(str(ip[-1])) + 127.0.0.3 + """ + if isinstance(key, slice): + return [IP(IPint.__getitem__(self, x), ipversion=self._ipversion) for x in xrange(*key.indices(len(self)))] + return IP(IPint.__getitem__(self, key), ipversion=self._ipversion) + + def __repr__(self): + """Print a representation of the Object. + + >>> IP('10.0.0.0/8') + IP('10.0.0.0/8') + """ + + return("IP('%s')" % (self.strCompressed(1))) + + def get_mac(self): + """ + Get the 802.3 MAC address from IPv6 RFC 2464 address, in lower case. + Return None if the address is an IPv4 or not a IPv6 RFC 2464 address. + + >>> IP('fe80::f66d:04ff:fe47:2fae').get_mac() + 'f4:6d:04:47:2f:ae' + """ + if self._ipversion != 6: + return None + if (self.ip & 0x20000ffff000000) != 0x20000fffe000000: + return None + return '%02x:%02x:%02x:%02x:%02x:%02x' % ( + (((self.ip >> 56) & 0xff) & 0xfd), + (self.ip >> 48) & 0xff, + (self.ip >> 40) & 0xff, + (self.ip >> 16) & 0xff, + (self.ip >> 8) & 0xff, + self.ip & 0xff, + ) + + def v46map(self): + """ + Returns the IPv6 mapped address of an IPv4 address, or the corresponding + IPv4 address if the IPv6 address is in the appropriate range. + Raises a ValueError if the IPv6 address is not translatable. See RFC 4291. + + >>> IP('192.168.1.1').v46map() + IP('::ffff:192.168.1.1') + >>> IP('::ffff:192.168.1.1').v46map() + IP('192.168.1.1') + """ + if self._ipversion == 4: + return IP(str(IPV6_MAP_MASK + self.ip) + + "/%s" % (self._prefixlen + 96)) + else: + if self.ip & IPV6_TEST_MAP == IPV6_MAP_MASK: + return IP(str(self.ip - IPV6_MAP_MASK) + + "/%s" % (self._prefixlen - 96)) + raise ValueError("%s cannot be converted to an IPv4 address." + % repr(self)) + +class IPSet(collections.MutableSet): + def __init__(self, iterable=[]): + # Make sure it's iterable, otherwise wrap. + if not isinstance(iterable, collections.Iterable): + raise TypeError("'%s' object is not iterable" % type(iterable).__name__) + + # Make sure we only accept IP objects. + for prefix in iterable: + if not isinstance(prefix, IP): + raise ValueError('Only IP objects can be added to an IPSet') + + # Store and optimize. + self.prefixes = iterable[:] + self.optimize() + + def __contains__(self, ip): + valid_masks = self.prefixtable.keys() + if isinstance(ip, IP): + # Don't dig through more-specific ranges. + ip_mask = ip._prefixlen + valid_masks = [x for x in valid_masks if x <= ip_mask] + for mask in sorted(valid_masks): + i = bisect.bisect(self.prefixtable[mask], ip) + # Because of sorting order, a match can only occur in the prefix + # that comes before the result of the search. + if i and ip in self.prefixtable[mask][i - 1]: + return True + + def __iter__(self): + for prefix in self.prefixes: + yield prefix + + def __len__(self): + return self.len() + + def __add__(self, other): + return IPSet(self.prefixes + other.prefixes) + + def __sub__(self, other): + new = IPSet(self.prefixes) + for prefix in other: + new.discard(prefix) + return new + + def __and__(self, other): + left = iter(self.prefixes) + right = iter(other.prefixes) + result = [] + try: + l = next(left) + r = next(right) + while True: + # Iterate over prefixes in order, keeping the smaller of the two if they overlap. + if l in r: + result.append(l) + l = next(left) + continue + elif r in l: + result.append(r) + r = next(right) + continue + if l < r: + l = next(left) + else: + r = next(right) + except StopIteration: + return IPSet(result) + + def __repr__(self): + return '%s([' % self.__class__.__name__ + ', '.join(map(repr, self.prefixes)) + '])' + + def len(self): + return sum(prefix.len() for prefix in self.prefixes) + + def add(self, value): + # Make sure it's iterable, otherwise wrap. + if not isinstance(value, collections.Iterable): + value = [value] + + # Check type. + for prefix in value: + if not isinstance(prefix, IP): + raise ValueError('Only IP objects can be added to an IPSet') + + # Append and optimize. + self.prefixes.extend(value) + self.optimize() + + def discard(self, value): + # Make sure it's iterable, otherwise wrap. + if not isinstance(value, collections.Iterable): + value = [value] + + # This is much faster than iterating over the addresses. + if isinstance(value, IPSet): + value = value.prefixes + + # Remove + for del_prefix in value: + if not isinstance(del_prefix, IP): + raise ValueError('Only IP objects can be removed from an IPSet') + + # First check if this prefix contains anything in our list. + found = False + d = 0 + for i in range(len(self.prefixes)): + if self.prefixes[i - d] in del_prefix: + self.prefixes.pop(i - d) + d = d + 1 + found = True + + if found: + # If the prefix was bigger than an existing prefix, then it's + # certainly not a subset of one, so skip the rest. + continue + + # Maybe one of our prefixes contains this prefix. + found = False + for i in range(len(self.prefixes)): + if del_prefix in self.prefixes[i]: + self.prefixes[i:i+1] = self.prefixes[i] - del_prefix + break + + self.optimize() + + def isdisjoint(self, other): + left = iter(self.prefixes) + right = iter(other.prefixes) + try: + l = next(left) + r = next(right) + while True: + if l in r or r in l: + return False + if l < r: + l = next(left) + else: + r = next(right) + except StopIteration: + return True + + def optimize(self): + # The algorithm below *depends* on the sort order. + self.prefixes.sort() + + # First eliminate all values that are a subset of other values. + addrlen = len(self.prefixes) + i = 0 + while i < addrlen: + # Everything that might be inside this prefix follows directly behind it. + j = i+1 + while j < addrlen and self.prefixes[j] in self.prefixes[i]: + # Mark for deletion by overwriting with None. + self.prefixes[j] = None + j += 1 + + # Continue where we left off. + i = j + + # Try to merge as many prefixes as possible. + run_again = True + while run_again: + # Filter None values. This happens when a subset is eliminated + # above, or when two prefixes are merged below. + self.prefixes = [a for a in self.prefixes if a is not None] + + # We'll set run_again to True when we make changes that require + # re-evaluation of the whole list. + run_again = False + + # We can merge two prefixes that have the same version, same + # prefix length and differ only on the last bit of the prefix. + addrlen = len(self.prefixes) + i = 0 + while i < addrlen-1: + j = i + 1 + + try: + # The next line will throw an exception when merging is not possible. + self.prefixes[i] += self.prefixes[j] + self.prefixes[j] = None + i = j + 1 + run_again = True + except ValueError: + # Can't be merged, see if position j can be merged. + i = j + + # O(n) insertion now by prefix means faster searching on __contains__ + # when lots of ranges with the same length exist. + self.prefixtable = {} + for address in self.prefixes: + try: + self.prefixtable[address._prefixlen].append(address) + except KeyError: + self.prefixtable[address._prefixlen] = [address] + +def _parseAddressIPv6(ipstr): + """ + Internal function used by parseAddress() to parse IPv6 address with ':'. + + >>> print(_parseAddressIPv6('::')) + 0 + >>> print(_parseAddressIPv6('::1')) + 1 + >>> print(_parseAddressIPv6('0:0:0:0:0:0:0:1')) + 1 + >>> print(_parseAddressIPv6('0:0:0::0:0:1')) + 1 + >>> print(_parseAddressIPv6('0:0:0:0:0:0:0:0')) + 0 + >>> print(_parseAddressIPv6('0:0:0::0:0:0')) + 0 + + >>> print(_parseAddressIPv6('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210')) + 338770000845734292534325025077361652240 + >>> print(_parseAddressIPv6('1080:0000:0000:0000:0008:0800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('1080:0:0:0:8:800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('1080:0::8:800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('1080::8:800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('FF01:0:0:0:0:0:0:43')) + 338958331222012082418099330867817087043 + >>> print(_parseAddressIPv6('FF01:0:0::0:0:43')) + 338958331222012082418099330867817087043 + >>> print(_parseAddressIPv6('FF01::43')) + 338958331222012082418099330867817087043 + >>> print(_parseAddressIPv6('0:0:0:0:0:0:13.1.68.3')) + 218186755 + >>> print(_parseAddressIPv6('::13.1.68.3')) + 218186755 + >>> print(_parseAddressIPv6('0:0:0:0:0:FFFF:129.144.52.38')) + 281472855454758 + >>> print(_parseAddressIPv6('::FFFF:129.144.52.38')) + 281472855454758 + >>> print(_parseAddressIPv6('1080:0:0:0:8:800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('1080::8:800:200C:417A')) + 21932261930451111902915077091070067066 + >>> print(_parseAddressIPv6('::1:2:3:4:5:6')) + 1208962713947218704138246 + >>> print(_parseAddressIPv6('1:2:3:4:5:6::')) + 5192455318486707404433266432802816 + """ + + # Split string into a list, example: + # '1080:200C::417A' => ['1080', '200C', '417A'] and fill_pos=2 + # and fill_pos is the position of '::' in the list. + items = [] + index = 0 + fill_pos = None + while index < len(ipstr): + text = ipstr[index:] + if text.startswith("::"): + if fill_pos is not None: + # Invalid IPv6, eg. '1::2::' + raise ValueError("%r: Invalid IPv6 address: more than one '::'" % ipstr) + fill_pos = len(items) + index += 2 + continue + pos = text.find(':') + if pos == 0: + # Invalid IPv6, eg. '1::2:' + raise ValueError("%r: Invalid IPv6 address" % ipstr) + if pos != -1: + items.append(text[:pos]) + if text[pos:pos+2] == "::": + index += pos + else: + index += pos+1 + + if index == len(ipstr): + # Invalid IPv6, eg. '1::2:' + raise ValueError("%r: Invalid IPv6 address" % ipstr) + else: + items.append(text) + break + + if items and '.' in items[-1]: + # IPv6 ending with IPv4 like '::ffff:192.168.0.1' + if (fill_pos is not None) and not (fill_pos <= len(items)-1): + # Invalid IPv6: 'ffff:192.168.0.1::' + raise ValueError("%r: Invalid IPv6 address: '::' after IPv4" % ipstr) + value = parseAddress(items[-1])[0] + items = items[:-1] + ["%04x" % (value >> 16), "%04x" % (value & 0xffff)] + + # Expand fill_pos to fill with '0' + # ['1','2'] with fill_pos=1 => ['1', '0', '0', '0', '0', '0', '0', '2'] + if fill_pos is not None: + diff = 8 - len(items) + if diff <= 0: + raise ValueError("%r: Invalid IPv6 address: '::' is not needed" % ipstr) + items = items[:fill_pos] + ['0']*diff + items[fill_pos:] + + # Here we have a list of 8 strings. + if len(items) != 8: + # Invalid IPv6, eg. '1:2:3' + raise ValueError("%r: Invalid IPv6 address: should have 8 hextets" % ipstr) + + # Convert strings to long integer. + value = 0 + index = 0 + for item in items: + try: + item = int(item, 16) + error = not(0 <= item <= 0xffff) + except ValueError: + error = True + if error: + raise ValueError("%r: Invalid IPv6 address: invalid hexlet %r" % (ipstr, item)) + value = (value << 16) + item + index += 1 + return value + +def parseAddress(ipstr): + """ + Parse a string and return the corresponding IP address (as integer) + and a guess of the IP version. + + Following address formats are recognized: + + >>> def testParseAddress(address): + ... ip, version = parseAddress(address) + ... print(("%s (IPv%s)" % (ip, version))) + ... + >>> testParseAddress('0x0123456789abcdef') # IPv4 if <= 0xffffffff else IPv6 + 81985529216486895 (IPv6) + >>> testParseAddress('123.123.123.123') # IPv4 + 2071690107 (IPv4) + >>> testParseAddress('123.123') # 0-padded IPv4 + 2071658496 (IPv4) + >>> testParseAddress('127') + 2130706432 (IPv4) + >>> testParseAddress('255') + 4278190080 (IPv4) + >>> testParseAddress('256') + 256 (IPv4) + >>> testParseAddress('108000000000000000080800200C417A') + 21932261930451111902915077091070067066 (IPv6) + >>> testParseAddress('0x108000000000000000080800200C417A') + 21932261930451111902915077091070067066 (IPv6) + >>> testParseAddress('1080:0000:0000:0000:0008:0800:200C:417A') + 21932261930451111902915077091070067066 (IPv6) + >>> testParseAddress('1080:0:0:0:8:800:200C:417A') + 21932261930451111902915077091070067066 (IPv6) + >>> testParseAddress('1080:0::8:800:200C:417A') + 21932261930451111902915077091070067066 (IPv6) + >>> testParseAddress('::1') + 1 (IPv6) + >>> testParseAddress('::') + 0 (IPv6) + >>> testParseAddress('0:0:0:0:0:FFFF:129.144.52.38') + 281472855454758 (IPv6) + >>> testParseAddress('::13.1.68.3') + 218186755 (IPv6) + >>> testParseAddress('::FFFF:129.144.52.38') + 281472855454758 (IPv6) + """ + + try: + hexval = int(ipstr, 16) + except ValueError: + hexval = None + try: + intval = int(ipstr, 10) + except ValueError: + intval = None + + if ipstr.startswith('0x') and hexval is not None: + if hexval > MAX_IPV6_ADDRESS: + raise ValueError("IP Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, hexval)) + if hexval <= MAX_IPV4_ADDRESS: + return (hexval, 4) + else: + return (hexval, 6) + + if ipstr.find(':') != -1: + return (_parseAddressIPv6(ipstr), 6) + + elif len(ipstr) == 32 and hexval is not None: + # Assume IPv6 in pure hexadecimal notation. + return (hexval, 6) + + elif ipstr.find('.') != -1 or (intval is not None and intval < 256): + # Assume IPv4 ('127' gets interpreted as '127.0.0.0'). + bytes = ipstr.split('.') + if len(bytes) > 4: + raise ValueError("IPv4 Address with more than 4 bytes") + bytes += ['0'] * (4 - len(bytes)) + bytes = [int(x) for x in bytes] + for x in bytes: + if x > 255 or x < 0: + raise ValueError("%r: single byte must be 0 <= byte < 256" % (ipstr)) + return ((bytes[0] << 24) + (bytes[1] << 16) + (bytes[2] << 8) + bytes[3], 4) + + elif intval is not None: + # We try to interprete it as a decimal digit - + # this ony works for numbers > 255 ... others + # will be interpreted as IPv4 first byte. + if intval > MAX_IPV6_ADDRESS: + raise ValueError("IP Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, intval)) + if intval <= MAX_IPV4_ADDRESS: + return (intval, 4) + else: + return (intval, 6) + + raise ValueError("IP Address format was invalid: %s" % ipstr) + + +def intToIp(ip, version): + """Transform an integer string into an IP address.""" + + # Just to be sure and hoping for Python 2.2. + ip = int(ip) + + if ip < 0: + raise ValueError("IPs can't be negative: %d" % (ip)) + + ret = '' + if version == 4: + if ip > MAX_IPV4_ADDRESS: + raise ValueError("IPv4 Address can't be larger than %x: %x" % (MAX_IPV4_ADDRESS, ip)) + for l in xrange(4): + ret = str(ip & 0xff) + '.' + ret + ip = ip >> 8 + ret = ret[:-1] + elif version == 6: + if ip > MAX_IPV6_ADDRESS: + raise ValueError("IPv6 Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, ip)) + l = "%032x" % ip + for x in xrange(1, 33): + ret = l[-x] + ret + if x % 4 == 0: + ret = ':' + ret + ret = ret[1:] + else: + raise ValueError("only IPv4 and IPv6 supported") + + return ret + +def _ipVersionToLen(version): + """Return number of bits in address for a certain IP version. + + >>> _ipVersionToLen(4) + 32 + >>> _ipVersionToLen(6) + 128 + >>> _ipVersionToLen(5) + Traceback (most recent call last): + File "", line 1, in ? + File "IPy.py", line 1076, in _ipVersionToLen + raise ValueError("only IPv4 and IPv6 supported") + ValueError: only IPv4 and IPv6 supported + """ + + if version == 4: + return 32 + elif version == 6: + return 128 + else: + raise ValueError("only IPv4 and IPv6 supported") + + +def _countFollowingZeros(l): + """Return number of elements containing 0 at the beginning of the list.""" + if len(l) == 0: + return 0 + elif l[0] != 0: + return 0 + else: + return 1 + _countFollowingZeros(l[1:]) + + +_BitTable = {'0': '0000', '1': '0001', '2': '0010', '3': '0011', + '4': '0100', '5': '0101', '6': '0110', '7': '0111', + '8': '1000', '9': '1001', 'a': '1010', 'b': '1011', + 'c': '1100', 'd': '1101', 'e': '1110', 'f': '1111'} + +def _intToBin(val): + """Return the binary representation of an integer as string.""" + + if val < 0: + raise ValueError("Only positive values allowed") + s = "%x" % val + ret = '' + for x in s: + ret += _BitTable[x] + # remove leading zeros + while ret[0] == '0' and len(ret) > 1: + ret = ret[1:] + return ret + +def _count1Bits(num): + """Find the highest bit set to 1 in an integer.""" + ret = 0 + while num > 0: + num = num >> 1 + ret += 1 + return ret + +def _count0Bits(num): + """Find the highest bit set to 0 in an integer.""" + + # This could be so easy if _count1Bits(~int(num)) would work as excepted. + num = int(num) + if num < 0: + raise ValueError("Only positive Numbers please: %s" % (num)) + ret = 0 + while num > 0: + if num & 1 == 1: + break + num = num >> 1 + ret += 1 + return ret + + +def _checkPrefix(ip, prefixlen, version): + """Check the validity of a prefix + + Checks if the variant part of a prefix only has 0s, and the length is + correct. + + >>> _checkPrefix(0x7f000000, 24, 4) + 1 + >>> _checkPrefix(0x7f000001, 24, 4) + 0 + >>> repr(_checkPrefix(0x7f000001, -1, 4)) + 'None' + >>> repr(_checkPrefix(0x7f000001, 33, 4)) + 'None' + """ + + # TODO: unify this v4/v6/invalid code in a function + bits = _ipVersionToLen(version) + + if prefixlen < 0 or prefixlen > bits: + return None + + if ip == 0: + zbits = bits + 1 + else: + zbits = _count0Bits(ip) + if zbits < bits - prefixlen: + return 0 + else: + return 1 + + +def _checkNetmask(netmask, masklen): + """Checks if a netmask is expressable as a prefixlen.""" + + num = int(netmask) + bits = masklen + + # Remove zero bits at the end. + while (num & 1) == 0 and bits != 0: + num = num >> 1 + bits -= 1 + if bits == 0: + break + # Now check if the rest consists only of ones. + while bits > 0: + if (num & 1) == 0: + raise ValueError("Netmask 0x%x can't be expressed as an prefix." % netmask) + num = num >> 1 + bits -= 1 + + +def _checkNetaddrWorksWithPrefixlen(net, prefixlen, version): + """Check if a base addess of a network is compatible with a prefixlen""" + try: + return (net & _prefixlenToNetmask(prefixlen, version) == net) + except ValueError: + return False + + +def _netmaskToPrefixlen(netmask): + """Convert an Integer representing a netmask to a prefixlen. + + E.g. 0xffffff00 (255.255.255.0) returns 24 + """ + + netlen = _count0Bits(netmask) + masklen = _count1Bits(netmask) + _checkNetmask(netmask, masklen) + return masklen - netlen + + +def _prefixlenToNetmask(prefixlen, version): + """Return a mask of n bits as a long integer. + + From 'IP address conversion functions with the builtin socket module' + by Alex Martelli + http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66517 + """ + if prefixlen == 0: + return 0 + elif prefixlen < 0: + raise ValueError("Prefixlen must be > 0") + return ((2< 0: + print(f'\tSearching through {num} results') + link = self.links[num] + req = requests.get(link, headers=headers) + self.results = req.text + if search(self.results): + time.sleep(getDelay() * 5) # Sleep for a longer time. + else: + time.sleep(getDelay()) + self.totalresults += self.results + except Exception as e: + print(f'\tException Occurred {e}') diff --git a/discovery/huntersearch.py b/discovery/huntersearch.py new file mode 100644 index 00000000..b973327b --- /dev/null +++ b/discovery/huntersearch.py @@ -0,0 +1,42 @@ +from discovery.constants import * +from lib.core import * +from parsers import myparser +import requests + + +class SearchHunter: + + def __init__(self, word, limit, start): + self.word = word + self.limit = 100 + self.start = start + self.key = Core.hunter_key() + if self.key is None: + raise MissingKey(True) + self.results = "" + self.totalresults = "" + self.counter = start + self.database = "https://api.hunter.io/v2/domain-search?domain=" + word + "&api_key=" + self.key + "&limit=" + str(self.limit) + + def do_search(self): + try: + r = requests.get(self.database) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def process(self): + self.do_search() # Only need to do it once. + + def get_emails(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.emails() + + def get_hostnames(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.hostnames() + + def get_profiles(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.profiles() diff --git a/discovery/intelxsearch.py b/discovery/intelxsearch.py new file mode 100644 index 00000000..a04f1395 --- /dev/null +++ b/discovery/intelxsearch.py @@ -0,0 +1,56 @@ +from discovery.constants import * +from lib.core import * +from parsers import intelxparser +import requests +import time + + +class SearchIntelx: + + def __init__(self, word, limit): + self.word = word + # default key is public key + self.key = Core.intelx_key() + if self.key is None: + raise MissingKey(True) + self.database = 'https://public.intelx.io/' + self.results = None + self.info = () + self.limit = limit + + def do_search(self): + try: + user_agent = Core.get_user_agent() + headers = {'User-Agent': user_agent, 'x-key': self.key} + # data is json that corresponds to what we are searching for, sort:2 means sort by most relevant + data = f'{{"term": "{self.word}", "maxresults": {self.limit}, "media": 0, "sort": 2 , "terminate": []}}' + r = requests.post(f'{self.database}phonebook/search', data=data, headers=headers) + + if r.status_code == 400: + raise Exception('Invalid json was passed in.') + time.sleep(1) + + # grab uuid to send get request to fetch data + uuid = r.json()['id'] + url = f'{self.database}phonebook/search/result?id={uuid}&offset=0&limit={self.limit}' + r = requests.get(url, headers=headers) + time.sleep(1) + + # TODO: add in future grab status from r.text and check if more results can be gathered + if r.status_code != 200: + raise Exception('Error occurred while searching intelx.') + self.results = r.json() + except Exception as e: + print(f'An exception has occurred: {e}') + + def process(self): + self.do_search() + intelx_parser = intelxparser.Parser() + self.info = intelx_parser.parse_dictionaries(self.results) + # Create parser and set self.info to tuple returned from parsing text. + + def get_emails(self): + return self.info[0] + + def get_hostnames(self): + return self.info[1] diff --git a/discovery/linkedinsearch.py b/discovery/linkedinsearch.py new file mode 100644 index 00000000..dce71807 --- /dev/null +++ b/discovery/linkedinsearch.py @@ -0,0 +1,42 @@ +from discovery.constants import * +from lib.core import * +from parsers import myparser +import requests +import time + + +class SearchLinkedin: + + def __init__(self, word, limit): + self.word = word.replace(' ', '%20') + self.results = "" + self.totalresults = "" + self.server = 'www.google.com' + self.userAgent = '(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6' + self.quantity = '100' + self.limit = int(limit) + self.counter = 0 + + def do_search(self): + try: + urly = 'http://' + self.server + '/search?num=100&start=' + str(self.counter) + '&hl=en&meta=&q=site%3Alinkedin.com/in%20' + self.word + except Exception as e: + print(e) + try: + headers = {'User-Agent': Core.get_user_agent()} + r = requests.get(urly, headers=headers) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def get_people(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.people_linkedin() + + def process(self): + while self.counter < self.limit: + self.do_search() + time.sleep(getDelay()) + self.counter += 100 + print(f'\tSearching {self.counter} results.') diff --git a/discovery/netcraft.py b/discovery/netcraft.py new file mode 100644 index 00000000..036336b7 --- /dev/null +++ b/discovery/netcraft.py @@ -0,0 +1,72 @@ +from lib.core import * +from parsers import myparser +import requests +import hashlib +import urllib.parse as urllib +import re + +class SearchNetcraft: + # this module was inspired by sublist3r's netcraft module + + def __init__(self, word): + self.word = word.replace(' ', '%20') + self.totalresults = "" + self.server = 'netcraft.com' + self.base_url = 'https://searchdns.netcraft.com/?restriction=site+ends+with&host={domain}' + self.session = requests.session() + self.headers = { + 'User-Agent': Core.get_user_agent() + } + self.timeout = 25 + self.domain = f"https://searchdns.netcraft.com/?restriction=site+ends+with&host={self.word}" + + def request(self, url, cookies=None): + cookies = cookies or {} + try: + resp = self.session.get(url, headers=self.headers, timeout=self.timeout, cookies=cookies) + except Exception as e: + print(e) + resp = None + return resp + + def get_next(self, resp): + link_regx = re.compile('Next page') + link = link_regx.findall(resp) + link = re.sub(f'host=.*?{self.word}', f'host={self.domain}', link[0]) + url = f'http://searchdns.netcraft.com{link}' + return url + + def create_cookies(self, cookie): + cookies = dict() + cookies_list = cookie[0:cookie.find(';')].split("=") + cookies[cookies_list[0]] = cookies_list[1] + # get js verification response + cookies['netcraft_js_verification_response'] = hashlib.sha1( + urllib.unquote(cookies_list[1]).encode('utf-8')).hexdigest() + return cookies + + def get_cookies(self, headers): + if 'set-cookie' in headers: + cookies = self.create_cookies(headers['set-cookie']) + else: + cookies = {} + return cookies + + def do_search(self): + start_url = self.base_url + resp = self.request(start_url) + cookies = self.get_cookies(resp.headers) + url = self.base_url.format(domain="yale.edu") + while True: + resp = self.request(url, cookies).text + self.totalresults += resp + if 'Next page' not in resp or resp is None: + break + url = self.get_next(resp) + + def get_hostnames(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.hostnames() + + def process(self): + self.do_search() \ No newline at end of file diff --git a/discovery/port_scanner.py b/discovery/port_scanner.py new file mode 100644 index 00000000..6d94cf45 --- /dev/null +++ b/discovery/port_scanner.py @@ -0,0 +1,32 @@ +import socket +import threading + + +class PortScan: + + def __init__(self, host, ports): + self.threads = 25 + self.host = host + self.ports = ports + self.lock = threading.BoundedSemaphore(value=self.threads) + + def port_scanner(self, host, ports): + openports = [] + self.lock.acquire() + for port in ports: + try: + connect = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + connect.settimeout(2) + result = connect.connect_ex((host, int(port))) + if result == 0: + openports.append(port) + connect.close() + except Exception as e: + print(e) + pass + self.lock.release() + return openports + + def process(self): + ports = self.port_scanner(self.host, self.ports) + return ports diff --git a/discovery/s3_scanner.py b/discovery/s3_scanner.py new file mode 100644 index 00000000..5e95c307 --- /dev/null +++ b/discovery/s3_scanner.py @@ -0,0 +1,46 @@ +import re +import requests + + +class s3_scanner: + + def __init__(self, host): + self.host = host + self.results = "" + self.totalresults = "" + self.fingerprints = ['www.herokucdn.com/error-pages/no-such-app.html', 'Squarespace - No Such Account', "

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

","

If you\'re trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

","Bummer. It looks like the help center that you are trying to reach no longer exists."," The page you\'re looking for could not be found (404) "] + + def __check_http(self, bucket_url): + check_response = self.session.head( + S3_URL, timeout=3, headers={'Host': bucket_url}) + +# if not ARGS.ignore_rate_limiting\ +# and (check_response.status_code == 503 and check_response.reason == 'Slow Down'): +# self.q.rate_limited = True + # Add it back to the bucket for re-processing. +# self.q.put(bucket_url) + if check_response.status_code == 307: # valid bucket, lets check if its public + new_bucket_url = check_response.headers['Location'] + bucket_response = requests.request( + 'GET' if ARGS.only_interesting else 'HEAD', new_bucket_url, timeout=3) + + if bucket_response.status_code == 200\ + and (not ARGS.only_interesting or + (ARGS.only_interesting and any(keyword in bucket_response.text for keyword in KEYWORDS))): + print(f"Found bucket '{new_bucket_url}'") + self.__log(new_bucket_url) + + def do_s3(self): + try: + print('\t Searching takeovers for ' + self.host) + r = requests.get('https://' + self.host, verify=False) + for x in self.fingerprints: + take_reg = re.compile(x) + self.temp = take_reg.findall(r.text) + if self.temp != []: + print('\t\033[91m Takeover detected! - ' + self.host + '\033[1;32;40m') + except Exception as e: + print(e) + + def process(self): + self.do_take() diff --git a/discovery/securitytrailssearch.py b/discovery/securitytrailssearch.py new file mode 100644 index 00000000..0c78f5c0 --- /dev/null +++ b/discovery/securitytrailssearch.py @@ -0,0 +1,62 @@ +from discovery.constants import * +from lib.core import * +from parsers import securitytrailsparser +import requests +import sys +import time + + +class search_securitytrail: + + def __init__(self, word): + self.word = word + self.key = Core.security_trails_key() + if self.key is None: + raise MissingKey(True) + self.results = "" + self.totalresults = "" + self.database = "https://api.securitytrails.com/v1/" + self.info = () + + def authenticate(self): + # Method to authenticate API key before sending requests. + headers = {'APIKEY': self.key} + url = self.database + 'ping' + r = requests.get(url, headers=headers).text + if 'False' in r or 'Invalid authentication' in r: + print('\tKey could not be authenticated exiting program.') + sys.exit(-2) + time.sleep(2) + + def do_search(self): + url = '' + headers = {} + try: + # https://api.securitytrails.com/v1/domain/domain.com + url = self.database + 'domain/' + self.word + headers = {'APIKEY': self.key} + r = requests.get(url, headers=headers) + time.sleep(2) # Not random delay because 2 seconds is required due to rate limit. + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + url += '/subdomains' # Get subdomains now. + r = requests.get(url, headers=headers) + time.sleep(2) + self.results = r.text + self.totalresults += self.results + + def process(self): + self.authenticate() + self.do_search() + parser = securitytrailsparser.Parser(word=self.word, text=self.totalresults) + self.info = parser.parse_text() + # Create parser and set self.info to tuple returned from parsing text. + print('\tDone Searching Results') + + def get_ips(self): + return self.info[0] + + def get_hostnames(self): + return self.info[1] diff --git a/discovery/shodansearch.py b/discovery/shodansearch.py new file mode 100644 index 00000000..634c49e7 --- /dev/null +++ b/discovery/shodansearch.py @@ -0,0 +1,43 @@ +from discovery.constants import * +from lib.core import * +from shodan import exception +from shodan import Shodan + + +class SearchShodan: + + def __init__(self): + self.key = Core.shodan_key() + if self.key is None: + raise MissingKey(True) + self.api = Shodan(self.key) + self.hostdatarow = [] + + def search_ip(self, ip): + try: + ipaddress = ip + results = self.api.host(ipaddress) + technologies = [] + servicesports = [] + for result in results['data']: + try: + for key in result['http']['components'].keys(): + technologies.append(key) + except KeyError: + pass + port = str(result.get('port')) + product = str(result.get('product')) + servicesports.append(str(product)+':'+str(port)) + technologies = list(set(technologies)) + self.hostdatarow = [ + str(results.get('ip_str')), str(results.get('hostnames')).strip('[]\''), + str(results.get('org')), str(servicesports).replace('\'', '').strip('[]'), + str(technologies).replace('\'', '').strip('[]')] + except exception.APIError: + print(f'{ipaddress}: Not in Shodan') + self.hostdatarow = [ipaddress, "Not in Shodan", "Not in Shodan", "Not in Shodan", "Not in Shodan"] + + except Exception as e: + print(f'Error occurred in the Shodan IP search module: {e}') + finally: + return self.hostdatarow diff --git a/discovery/takeover.py b/discovery/takeover.py new file mode 100644 index 00000000..3a3979d1 --- /dev/null +++ b/discovery/takeover.py @@ -0,0 +1,44 @@ +import re +import requests + + +class take_over: + + def __init__(self, host): + self.host = host + self.results = "" + self.totalresults = "" + self.fingerprints = ["Squarespace - Domain Not Claimed", + 'www.herokucdn.com/error-pages/no-such-app.html', + 'Squarespace - No Such Account', + "

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", + "

If you\'re trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", + "Bummer. It looks like the help center that you are trying to reach no longer exists.", + " The page you\'re looking for could not be found (404) ", + 'The specified bucket does not exist', + 'Bad Request: ERROR: The request could not be satisfied', + 'Fastly error: unknown domain:', + "There isn't a Github Pages site here.", + 'No such app', + 'Unrecognized domain', + 'Sorry, this shop is currently unavailable.', + "Whatever you were looking for doesn't currently exist at this address", + 'The requested URL was not found on this server.', + 'This UserVoice subdomain is currently available!', + 'Do you want to register *.wordpress.com?', + 'Help Center Closed'] + + def do_take(self): + try: + print('\t Searching takeovers for ' + self.host) + r = requests.get('https://' + self.host, verify=False) + for x in self.fingerprints: + take_reg = re.compile(x) + self.temp = take_reg.findall(r.text) + if self.temp != []: + print(f'\t\033[91m Takeover detected! - {self.host} \033[1;32;40m') + except Exception as e: + print(e) + + def process(self): + self.do_take() diff --git a/discovery/threatcrowd.py b/discovery/threatcrowd.py new file mode 100644 index 00000000..e9620ddd --- /dev/null +++ b/discovery/threatcrowd.py @@ -0,0 +1,36 @@ +from lib.core import * +from parsers import myparser +import requests + + +class search_threatcrowd: + + def __init__(self, word): + self.word = word.replace(' ', '%20') + self.results = "" + self.totalresults = "" + self.server = 'www.google.com' + self.hostname = 'www.google.com' + self.quantity = '100' + self.counter = 0 + + def do_search(self): + try: + urly = 'https://www.threatcrowd.org/searchApi/v2/domain/report/?domain=' + self.word + except Exception as e: + print(e) + headers = {'User-Agent': Core.get_user_agent()} + try: + r = requests.get(urly, headers=headers) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def get_hostnames(self): + rawres = myparser.Parser(self.results, self.word) + return rawres.hostnames() + + def process(self): + self.do_search() + print('\tSearching results.') diff --git a/discovery/trello.py b/discovery/trello.py new file mode 100644 index 00000000..198e2d84 --- /dev/null +++ b/discovery/trello.py @@ -0,0 +1,61 @@ +from discovery.constants import * +from parsers import myparser +import requests +import time + + +class search_trello: + + def __init__(self, word, limit): + self.word = word.replace(' ', '%20') + self.results = "" + self.totalresults = "" + self.server = 'www.google.com' + self.hostname = 'www.google.com' + self.quantity = '100' + self.limit = limit + self.counter = 0 + + def do_search(self): + try: + urly = 'https://' + self.server + '/search?num=100&start=' + str( + self.counter) + '&hl=en&q=site%3Atrello.com%20' + self.word + except Exception as e: + print(e) + headers = {'User-Agent': googleUA} + try: + r = requests.get(urly, headers=headers) + time.sleep(getDelay()) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def get_emails(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.emails() + + def get_urls(self): + try: + rawres = myparser.Parser(self.totalresults, 'trello.com') + trello_urls = rawres.urls() + visited = set() + for url in trello_urls: + # Iterate through Trello URLs gathered and visit them, append text to totalresults. + if url not in visited: # Make sure visiting unique URLs. + visited.add(url) + self.totalresults += requests.get(url=url, headers={'User-Agent': googleUA}).text + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.hostnames(), trello_urls + except Exception as e: + print(f'Error occurred: {e}') + + def process(self): + while self.counter < self.limit: + self.do_search() + if search(self.results): + time.sleep(getDelay() * 5) + else: + time.sleep(getDelay()) + self.counter += 100 + print(f'\tSearching {self.counter} results.') diff --git a/discovery/twittersearch.py b/discovery/twittersearch.py new file mode 100644 index 00000000..019e1fcd --- /dev/null +++ b/discovery/twittersearch.py @@ -0,0 +1,64 @@ +from discovery.constants import * +from lib.core import * +from parsers import myparser +import requests +import time + + +class search_twitter: + + def __init__(self, word, limit): + self.word = word.replace(' ', '%20') + self.results = "" + self.totalresults = "" + self.server = 'www.google.com' + self.hostname = 'www.google.com' + self.quantity = '100' + self.limit = int(limit) + self.counter = 0 + + def do_search(self): + try: + urly = 'https://' + self.server + '/search?num=100&start=' + str(self.counter) + '&hl=en&meta=&q=site%3Atwitter.com%20intitle%3A%22on+Twitter%22%20' + self.word + except Exception as e: + print(e) + headers = {'User-Agent': Core.get_user_agent()} + try: + r = requests.get(urly, headers=headers) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def get_people(self): + rawres = myparser.Parser(self.totalresults, self.word) + to_parse = rawres.people_twitter() + # fix invalid handles that look like @user other_output + handles = set() + for handle in to_parse: + handle = str(handle).strip() + if len(handle) > 2: + if ' ' in handle: + handle = handle.split(' ')[0] + # strip off period at the end if exists + if handle[len(handle) - 1] == '.': + handle = handle[:len(handle) - 1] + # strip periods if contains three of them + if '...' in handle: + handle = handle[:handle.index('.')] + if '-' == handle[0]: + handle = handle[1:] + if '-' == handle[1]: + handle = handle[0] + handle[2:] + handles.add(handle) + if '@' in handles: + handles.remove('@') + + return handles + + def process(self): + while self.counter < self.limit: + self.do_search() + time.sleep(getDelay()) + self.counter += 100 + print(f'\tSearching {self.counter} results.') diff --git a/discovery/virustotal.py b/discovery/virustotal.py new file mode 100644 index 00000000..832d7362 --- /dev/null +++ b/discovery/virustotal.py @@ -0,0 +1,36 @@ +from lib.core import * +from parsers import myparser +import requests + + +class SearchVirustotal: + + def __init__(self, word): + self.word = word.replace(' ', '%20') + self.results = "" + self.totalresults = "" + self.server = 'www.google.com' + self.hostname = 'www.google.com' + self.quantity = '100' + self.counter = 0 + + def do_search(self): + try: + urly = 'https://www.virustotal.com/en/domain/' + self.word + '/information/' + except Exception as e: + print(e) + headers = {'User-Agent': Core.get_user_agent()} + try: + r = requests.get(urly, headers=headers) + except Exception as e: + print(e) + self.results = r.text + self.totalresults += self.results + + def get_hostnames(self): + rawres = myparser.Parser(self.results, self.word) + return rawres.hostnames() + + def process(self): + self.do_search() + print('\tSearching results.') diff --git a/discovery/wfuzz_search.py b/discovery/wfuzz_search.py new file mode 100644 index 00000000..6516f8ff --- /dev/null +++ b/discovery/wfuzz_search.py @@ -0,0 +1,32 @@ +try: + import wfuzz +except ImportError as e: + pass + + +class search_wfuzz: + + def __init__(self, host): + self.host = host + self.results = "" + self.totalresults = "" + + def do_search(self): + print('elo') + try: + for r in wfuzz.fuzz(url='https://'+self.host+'/FUZZ', hc=[404], payloads=[('file', dict(fn='wordlists/general/common.txt'))]): + print(r) + self.results += r + except Exception as e: + print(e) + self.totalresults += self.results + + def get_results(self): + return self.totalresults + + def do_check(self): + return + + def process(self): + self.do_search() + print('\tSearching Wfuzz') diff --git a/discovery/yahoosearch.py b/discovery/yahoosearch.py new file mode 100644 index 00000000..72931b13 --- /dev/null +++ b/discovery/yahoosearch.py @@ -0,0 +1,49 @@ +from discovery.constants import * +from lib.core import * +from parsers import myparser +import requests +import time + + +class search_yahoo: + + def __init__(self, word, limit): + self.word = word + self.total_results = "" + self.server = 'search.yahoo.com' + self.hostname = 'search.yahoo.com' + self.limit = limit + self.counter = 0 + + def do_search(self): + url = 'http://' + self.server + '/search?p=\"%40' + self.word + '\"&b=' + str(self.counter) + '&pz=10' + headers = { + 'Host': self.hostname, + 'User-agent': Core.get_user_agent() + } + h = requests.get(url=url, headers=headers) + self.total_results += h.text + + def process(self): + while self.counter <= self.limit and self.counter <= 1000: + self.do_search() + time.sleep(getDelay()) + print(f'\tSearching {self.counter} results.') + self.counter += 10 + + def get_emails(self): + rawres = myparser.Parser(self.total_results, self.word) + toparse_emails = rawres.emails() + emails = set() + # strip out numbers and dashes for emails that look like xxx-xxx-xxxemail@host.tld + for email in toparse_emails: + email = str(email) + if '-' in email and email[0].isdigit() and email.index('-') <= 9: + while email[0] == '-' or email[0].isdigit(): + email = email[1:] + emails.add(email) + return list(emails) + + def get_hostnames(self): + rawres = myparser.Parser(self.total_results, self.word) + return rawres.hostnames() diff --git a/discovery/yandexsearch.py b/discovery/yandexsearch.py new file mode 100644 index 00000000..7ce5f3ea --- /dev/null +++ b/discovery/yandexsearch.py @@ -0,0 +1,73 @@ +from discovery.constants import * +from lib.core import * +from parsers import myparser +import re +import requests +import time + + +class search_yandex: + + def __init__(self, word, limit, start): + self.word = word + self.results = "" + self.totalresults = "" + self.server = 'yandex.com' + self.hostname = 'yandex.com' + self.limit = limit + self.counter = start + + def do_search(self): + url = 'http://' + self.server + '/search?text=%40' + self.word + '&numdoc=50&lr=' + str(self.counter) + headers = { + 'Host': self.hostname, + 'User-agent': Core.get_user_agent() + } + h = requests.get(url=url, headers=headers) + self.results = h.text + self.totalresults += self.results + print(self.results) + + def do_search_files(self, files): # TODO + url = 'http://' + self.server + '/search?text=%40' + self.word + '&numdoc=50&lr=' + str(self.counter) + headers = { + 'Host': self.hostname, + 'User-agent': Core.get_user_agent() + } + h = requests.get(url=url, headers=headers) + self.results = h.text + self.totalresults += self.results + + def check_next(self): + renext = re.compile('topNextUrl') + nextres = renext.findall(self.results) + if nextres != []: + nexty = '1' + print(str(self.counter)) + else: + nexty = '0' + return nexty + + def get_emails(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.emails() + + def get_hostnames(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.hostnames() + + def get_files(self): + rawres = myparser.Parser(self.totalresults, self.word) + return rawres.fileurls(self.files) # self.files is not init? + + def process(self): + while self.counter <= self.limit: + self.do_search() + self.counter += 50 + print(f'Searching {self.counter} results.') + + def process_files(self, files): + while self.counter < self.limit: + self.do_search_files(files) + time.sleep(getDelay()) + self.counter += 50 diff --git a/lib/__init__.py b/lib/__init__.py new file mode 100644 index 00000000..24fa6550 --- /dev/null +++ b/lib/__init__.py @@ -0,0 +1 @@ +__all__ = ['markup', 'graphs', 'hostchecker'] diff --git a/lib/core.py b/lib/core.py new file mode 100644 index 00000000..b5e5c02b --- /dev/null +++ b/lib/core.py @@ -0,0 +1,561 @@ +# coding=utf-8 + +import random +import yaml + + +class Core: + @staticmethod + def bing_key(): + with open('api-keys.yaml', 'r') as api_keys: + keys = yaml.safe_load(api_keys) + return keys['apikeys']['bing']['key'] + + @staticmethod + def hunter_key(): + with open('api-keys.yaml', 'r') as api_keys: + keys = yaml.safe_load(api_keys) + return keys['apikeys']['hunter']['key'] + + @staticmethod + def intelx_key(): + with open('api-keys.yaml', 'r') as api_keys: + keys = yaml.safe_load(api_keys) + return keys['apikeys']['intelx']['key'] + + @staticmethod + def security_trails_key(): + with open('api-keys.yaml', 'r') as api_keys: + keys = yaml.safe_load(api_keys) + return keys['apikeys']['securityTrails']['key'] + + @staticmethod + def shodan_key(): + with open('api-keys.yaml', 'r') as api_keys: + keys = yaml.safe_load(api_keys) + return keys['apikeys']['shodan']['key'] + + @staticmethod + def banner(): + print('\n\033[93m*******************************************************************') + print("* _ _ _ *") + print(r"* | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ *") + print(r"* | __| _ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| *") + print(r"* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *") + print(r"* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *") + print('* *') + print('* theHarvester 3.0.6 v380 *') + print('* Coded by Christian Martorella *') + print('* Edge-Security Research *') + print('* cmartorella@edge-security.com *') + print('* *') + print('******************************************************************* \n\n \033[0m') + + @staticmethod + def get_supportedengines(): + supportedengines = {'baidu', + 'bing', + 'bingapi', + 'censys', + 'crtsh', + 'cymon', + 'dnsdumpster', + 'dogpile', + 'duckduckgo', + 'google', + 'google-certificates', + 'hunter', + 'intelx', + 'linkedin', + 'netcraft', + 'securityTrails', + 'threatcrowd', + 'trello', + 'twitter', + 'vhost', + 'virustotal', + 'yahoo', + 'all' + } + return supportedengines + + @staticmethod + def get_user_agent(): + # User-Agents from https://github.com/tamimibrahim17/List-of-user-agents + user_agents = [ + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) chromeframe/10.0.648.205', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36', + 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101213 Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2', + 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (X11; CrOS i686 3912.101.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; chromeframe/11.0.696.57)', + 'Mozilla/5.0 (Linux; U; Android 2.3; en-us) AppleWebKit/999+ (KHTML, like Gecko) Safari/999.9', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36', + 'Opera/9.80 (X11; Linux i686; U; ja) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; ja) Opera 11.00', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', + 'Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)', + 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1', + 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.17 Safari/537.11', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.8.36217; WOW64; en-US)', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5', + 'Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/536.5 (KHTML like Gecko) Chrome/19.0.1084.56 Safari/1EA69', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10', + 'Mozilla/5.0 (Linux; U; Android 2.3.5; zh-cn; HTC_IncredibleS_S710e Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C; Tablet PC 2.0)', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36', + 'Mozilla/5.0 (X11; CrOS i686 1660.57.0) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.46 Safari/535.19', + 'Mozilla/5.0 (Windows NT 6.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01', + 'Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7)', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)', + 'Opera/9.80 (X11; Linux x86_64; U; Ubuntu/10.10 (maverick); pl) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.2; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)', + 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.0; Trident/4.0; FBSMTWB; .NET CLR 2.0.34861; .NET CLR 3.0.3746.3218; .NET CLR 3.5.33652; msn OptimizedIE8;ENUS)', + 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51', + 'Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01', + 'Opera/9.80 (Windows NT 5.1; U; MRA 5.5 (build 02842); ru) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC_Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Opera/9.80 (Windows NT 6.1; U; cs) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00', + 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.7.39 Version/11.00', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8)', + 'Opera/9.80 (Windows NT 5.2; U; ru) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.1; U; nl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01', + 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)', + 'Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11', + 'Opera/9.80 (Windows NT 6.1; WOW64; U; pt) Presto/2.10.229 Version/11.62', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.14 (KHTML, like Gecko) Chrome/24.0.1292.0 Safari/537.14', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; yie8)', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; de) Presto/2.9.168 Version/11.52', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)', + 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/537.11', + 'Opera/9.80 (Windows NT 5.1; U; zh-tw) Presto/2.8.131 Version/11.10', + 'Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 3.0.04506.30)', + 'Mozilla/5.0 (Linux; U; Android 2.3.4; fr-fr; HTC Desire Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Mozilla/5.0 (Windows NT 5.1) Gecko/20100101 Firefox/14.0 Opera/12.0', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', + 'Opera/9.80 (X11; Linux i686; U; fr) Presto/2.7.62 Version/11.01', + 'Mozilla/4.0 (compatible; MSIE 8.0; X11; Linux x86_64; pl) Opera 11.00', + 'Opera/9.80 (X11; Linux i686; U; hu) Presto/2.9.168 Version/11.50', + 'Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.8.131 Version/11.10', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14', + 'Opera/9.80 (X11; Linux i686; U; it) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19', + 'Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Opera/9.80 (X11; Linux i686; U; es-ES) Presto/2.8.131 Version/11.11', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; fr) Opera 11.00', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.1; SV1; .NET CLR 2.8.52393; WOW64; en-US)', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', + 'Opera/9.80 (Windows NT 5.1; U; it) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; ko-kr; LG-LU3000 Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', + 'Opera/9.80 (Windows NT 6.1; U; fi) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', + 'Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02', + 'Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; pl) Opera 11.00', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36', + 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1', + 'Opera/9.80 (Windows NT 5.1; U; zh-sg) Presto/2.9.181 Version/12.00', + 'Opera/9.80 (Windows NT 6.1; U; en-GB) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; de) Opera 11.01', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; en) Opera 11.00', + 'Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.0 Safari/536.3', + 'Opera/9.80 (Windows NT 6.1; U; ko) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7', + 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36', + 'Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.6.37 Version/11.00', + 'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', + 'Mozilla/5.0 (Windows NT 6.0; U; ja; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/11.0.696.57)', + 'Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/13.0.782.215)', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/19.0.1047.0 Safari/535.22', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.7.58687; SLCC2; Media Center PC 5.0; Zune 3.4; Tablet PC 3.6; InfoPath.3)', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36', + 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36', + 'Mozilla/5.0 (X11; NetBSD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', + 'Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/5.0 Opera 11.11', + 'Mozilla/5.0 (Macintosh; AMD Mac OS X 10_8_2) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/18.6.872', + 'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)', + 'Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', + 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.0) yi; AppleWebKit/345667.12221 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/453667.1221', + 'Mozilla/1.22 (compatible; MSIE 10.0; Windows 3.1)', + 'Opera/9.80 (Windows NT 5.1; U;) Presto/2.7.62 Version/11.01', + 'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16', + 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21', + 'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1623.0 Safari/537.36', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/4E423F', + 'Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322)', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19', + 'Opera/9.80 (Windows NT 6.1; U; sv) Presto/2.7.62 Version/11.01', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', + 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1284.0 Safari/537.13', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5', + 'Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; Tablet PC 2.0; InfoPath.3; .NET4.0C; .NET4.0E)', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)', + 'Mozilla/4.0 (Compatible; MSIE 8.0; Windows NT 5.2; Trident/6.0)', + 'Opera/12.0(Windows NT 5.2;U;en)Presto/22.9.168 Version/12.00', + 'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36', + 'Opera/9.80 (X11; Linux x86_64; U; pl) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36', + 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.8.99 Version/11.10', + 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.7.39 Version/11.00', + 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC_Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari', + 'Mozilla/5.0 (Windows NT 5.1; U; pl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00', + 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.90 Safari/537.36', + 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; de) Opera 11.51', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11', + 'Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', + 'Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0', + 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)', + 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36', + 'Opera/9.80 (Windows NT 6.1 x64; U; en) Presto/2.7.62 Version/11.00', + 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile myTouch 3G Slide Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', + 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1041.0 Safari/535.21', + 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1500.55 Safari/537.36', + 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6', + 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.142 Chrome/18.0.1025.142 Safari/535.19', + 'Mozilla/5.0 (Windows NT 5.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00' + ] + return random.choice(user_agents) + + # TODO use this method when -b all is called to replace lines 383-635 in theHarvester.py + # TODO and to find the best approach of getting the word, limit, and start etc vars from + # the arguments and importing libs that are needed. + # + # @staticmethod + # def engine_all_search(): + # print(('Full harvest on ' + word)) + # all_emails = [] + # all_hosts = [] + # try: + # print('[*] Searching Baidu.') + # search = baidusearch.SearchBaidu(word, limit) + # search.process() + # all_emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'baidu') + # db.store_all(word, all_emails, 'email', 'baidu') + # except Exception: + # pass + # + # print('[*] Searching Bing.') + # bingapi = 'no' + # search = bingsearch.SearchBing(word, limit, start) + # search.process(bingapi) + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'bing') + # all_emails.extend(emails) + # all_emails = sorted(set(all_emails)) + # db.store_all(word, all_emails, 'email', 'bing') + # + # print('[*] Searching Censys.') + # from discovery import censys + # search = censys.SearchCensys(word, limit) + # search.process() + # ips = search.get_ipaddresses() + # setips = set(ips) + # uniqueips = list(setips) # Remove duplicates. + # all_ip.extend(uniqueips) + # hosts = filter(search.get_hostnames()) + # sethosts = set(hosts) + # uniquehosts = list(sethosts) # Remove duplicates. + # all_hosts.extend(uniquehosts) + # db = stash.stash_manager() + # db.store_all(word, uniquehosts, 'host', 'censys') + # db.store_all(word, uniqueips, 'ip', 'censys') + # + # print('[*] Searching CRT.sh.') + # search = crtsh.search_crtsh(word) + # search.process() + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'CRTsh') + # + # # cymon + # print('\033[94m[*] Searching Cymon. \033[0m') + # from discovery import cymon + # # Import locally or won't work. + # search = cymon.search_cymon(word) + # search.process() + # all_ip = search.get_ipaddresses() + # db = stash.stash_manager() + # db.store_all(word, all_ip, 'ip', 'cymon') + # + # print('\033[94m[*] Searching Dogpile. \033[0m') + # search = dogpilesearch.SearchDogpile(word, limit) + # search.process() + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # all_emails.extend(emails) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'email', 'dogpile') + # db.store_all(word, all_hosts, 'host', 'dogpile') + # + # print('[*] Searching DuckDuckGo.') + # from discovery import duckduckgosearch + # search = duckduckgosearch.SearchDuckDuckGo(word, limit) + # search.process() + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # all_emails.extend(emails) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'email', 'duckduckgo') + # db.store_all(word, all_hosts, 'host', 'duckduckgo') + # + # print('[*] Searching Google.') + # search = googlesearch.search_google(word, limit, start) + # search.process(google_dorking) + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_emails.extend(emails) + # db = stash.stash_manager() + # db.store_all(word, all_emails, 'email', 'google') + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'google') + # + # print('[*] Searching Google Certificate transparency report.') + # search = googlecertificates.SearchGoogleCertificates(word, limit, start) + # search.process() + # domains = filter(search.get_domains()) + # all_hosts.extend(domains) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'google-certificates') + # + # print('[*] Searching Hunter.') + # from discovery import huntersearch + # # Import locally. + # try: + # search = huntersearch.SearchHunter(word, limit, start) + # search.process() + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, hosts, 'host', 'hunter') + # all_emails.extend(emails) + # all_emails = sorted(set(all_emails)) + # db.store_all(word, all_emails, 'email', 'hunter') + # except Exception as e: + # if isinstance(e, MissingKey): + # print(e) + # else: + # pass + # + # print('\033[94m[*] Searching Linkedin. \033[0m') + # search = linkedinsearch.SearchLinkedin(word, limit) + # search.process() + # people = search.get_people() + # db = stash.stash_manager() + # db.store_all(word, people, 'name', 'linkedin') + # + # if len(people) == 0: + # print('\n[*] No users found.\n\n') + # else: + # print('\n[*] Users found: ' + str(len(people))) + # print('---------------------') + # for user in sorted(list(set(people))): + # print(user) + # + # print('[*] Searching Netcraft.') + # search = netcraft.SearchNetcraft(word) + # search.process() + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'netcraft') + # + # print('[*] Searching PGP key server.') + # try: + # search = pgpsearch.SearchPgp(word) + # search.process() + # emails = filter(search.get_emails()) + # hosts = filter(search.get_hostnames()) + # sethosts = set(hosts) + # uniquehosts = list(sethosts) # Remove duplicates. + # all_hosts.extend(uniquehosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'PGP') + # all_emails.extend(emails) + # db = stash.stash_manager() + # db.store_all(word, all_emails, 'email', 'PGP') + # except Exception: + # pass + # + # print('[*] Searching Threatcrowd.') + # try: + # search = threatcrowd.search_threatcrowd(word) + # search.process() + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'threatcrowd') + # except Exception: + # pass + # + # print('[*] Searching Trello.') + # from discovery import trello + # # Import locally or won't work. + # search = trello.search_trello(word, limit) + # search.process() + # emails = filter(search.get_emails()) + # all_emails.extend(emails) + # info = search.get_urls() + # hosts = filter(info[0]) + # trello_info = (info[1], True) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, hosts, 'host', 'trello') + # db.store_all(word, emails, 'email', 'trello') + # + # try: + # print('[*] Searching Twitter.') + # search = twittersearch.search_twitter(word, limit) + # search.process() + # people = search.get_people() + # db = stash.stash_manager() + # db.store_all(word, people, 'name', 'twitter') + # print('\nUsers from Twitter:') + # print('-------------------') + # for user in people: + # print(user) + # except Exception: + # pass + # + # print('\n[*] Virtual hosts:') + # print('------------------') + # for l in host_ip: + # search = bingsearch.SearchBing(l, limit, start) + # search.process_vhost() + # res = search.get_allhostnames() + # for x in res: + # x = re.sub(r'[[\<\/?]*[\w]*>]*', '', x) + # x = re.sub('<', '', x) + # x = re.sub('>', '', x) + # print((l + '\t' + x)) + # vhost.append(l + ':' + x) + # full.append(l + ':' + x) + # vhost = sorted(set(vhost)) + # + # print('[*] Searching VirusTotal.') + # search = virustotal.search_virustotal(word) + # search.process() + # hosts = filter(search.get_hostnames()) + # all_hosts.extend(hosts) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'virustotal') + # + # print('[*] Searching Yahoo.') + # search = yahoosearch.search_yahoo(word, limit) + # search.process() + # hosts = search.get_hostnames() + # emails = search.get_emails() + # all_hosts.extend(filter(hosts)) + # all_emails.extend(filter(emails)) + # db = stash.stash_manager() + # db.store_all(word, all_hosts, 'host', 'yahoo') + # db.store_all(word, all_emails, 'email', 'yahoo') diff --git a/lib/graphs.py b/lib/graphs.py new file mode 100644 index 00000000..7d82767e --- /dev/null +++ b/lib/graphs.py @@ -0,0 +1,744 @@ +""" + +-------------------------------------------------------------------+ + | H T M L - G R A P H S (v4.8) | + | | + | Copyright Gerd Tentler www.gerd-tentler.de/tools | + | Created: Sep. 17, 2002 Last modified: Feb. 13, 2010 | + +-------------------------------------------------------------------+ + | This program may be used and hosted free of charge by anyone for | + | personal purpose as long as this copyright notice remains intact. | + | | + | Obtain permission before selling the code for this program or | + | hosting this software on a commercial website or redistributing | + | this software over the Internet or in any other medium. In all | + | cases copyright must remain intact. | + +-------------------------------------------------------------------+ + +===================================================================================================== + Example: + + import graphs + graph = graphs.BarGraph('hBar') + graph.values = [234, 125, 289, 147, 190] + print graph.create() + + Returns HTML code +===================================================================================================== +""" + +import math +import re + + +class BarGraph: + + """Creates horizontal and vertical bar graphs, progress bars, and faders.""" + + def __init__(self, type=''): + #------------------------------------------------------------------------- + # Configuration + #------------------------------------------------------------------------- + # graph type: "hBar", "vBar", "pBar", or "fader" + self.type = type and type or 'hBar' + self.values = [] # graph data: list + + # graph background color: string + self.graphBGColor = '' + # graph border: string (CSS-spec: "size style color"; doesn't work with NN4) + self.graphBorder = '' + # graph padding: integer (pixels) + self.graphPadding = 0 + + # titles: array or string with comma-separated values + self.titles = [] + self.titleColor = 'black' # title font color: string + # title background color: string + self.titleBGColor = '#C0E0FF' + # title border: string (CSS specification) + self.titleBorder = '2px groove white' + # title font family: string (CSS specification) + self.titleFont = 'Arial, Helvetica' + # title font size: integer (pixels) + self.titleSize = 12 + # title text align: "left", "center", or "right" + self.titleAlign = 'center' + # title padding: integer (pixels) + self.titlePadding = 2 + + # label names: list or string with comma-separated values + self.labels = [] + self.labelColor = 'black' # label font color: string + # label background color: string + self.labelBGColor = '#C0E0FF' + # label border: string (CSS-spec: "size style color"; doesn't work with + # NN4) + self.labelBorder = '2px groove white' + # label font family: string (CSS-spec) + self.labelFont = 'Arial, Helvetica' + # label font size: integer (pixels) + self.labelSize = 12 + # label text align: "left", "center", or "right" + self.labelAlign = 'center' + # additional space between labels: integer (pixels) + self.labelSpace = 0 + + self.barWidth = 20 # bar width: integer (pixels) + # bar length ratio: float (from 0.1 to 2.9) + self.barLength = 1.0 + # bar colors OR bar images: list or string with comma-separated values + self.barColors = [] + # bar background color: string + self.barBGColor = '' + # bar border: string (CSS-spec: "size style color"; doesn't work with NN4) + self.barBorder = '2px outset white' + # bar level colors: ascending list (bLevel, bColor[,...]); draw bars >= bLevel with bColor + self.barLevelColors = [] + + # show values: 0 = % only, 1 = abs. and %, 2 = abs. only, 3 = none + self.showValues = 0 + # base value: integer or float (only hBar and vBar) + self.baseValue = 0 + + # abs. values font color: string + self.absValuesColor = 'black' + # abs. values background color: string + self.absValuesBGColor = '#C0E0FF' + # abs. values border: string (CSS-spec: "size style color"; doesn't work with NN4) + self.absValuesBorder = '2px groove white' + # abs. values font family: string (CSS-spec) + self.absValuesFont = 'Arial, Helvetica' + # abs. values font size: integer (pixels) + self.absValuesSize = 12 + # abs. values prefix: string (e.g. "$") + self.absValuesPrefix = '' + # abs. values suffix: string (e.g. " kg") + self.absValuesSuffix = '' + + # perc. values font color: string + self.percValuesColor = 'black' + # perc. values font family: string (CSS-spec) + self.percValuesFont = 'Arial, Helvetica' + # perc. values font size: integer (pixels) + self.percValuesSize = 12 + # perc. values number of decimals: integer + self.percValuesDecimals = 0 + + self.charts = 1 # number of charts: integer + + # hBar/vBar only: + # legend items: list or string with comma-separated values + self.legend = [] + self.legendColor = 'black' # legend font color: string + # legend background color: string + self.legendBGColor = '#F0F0F0' + # legend border: string (CSS-spec: "size style color"; doesn't work with NN4) + self.legendBorder = '2px groove white' + # legend font family: string (CSS-spec) + self.legendFont = 'Arial, Helvetica' + # legend font size: integer (pixels) + self.legendSize = 12 + # legend vertical align: "top", "center", "bottom" + self.legendAlign = 'top' + + # debug mode: 0 = off, 1 = on; just views some extra information + self.debug = 0 + #------------------------------------------------------------------------- + + # Default bar colors; only used if barColors isn't set. + __colors = ( + '#0000FF', + '#FF0000', + '#00E000', + '#A0A0FF', + '#FFA0A0', + '#00A000') + + # Error messages. + __err_type = 'ERROR: Type must be "hBar", "vBar", "pBar", or "fader"' + + # CSS names (don't change). + __cssGRAPH = '' + __cssBAR = '' + __cssBARBG = '' + __cssTITLE = '' + __cssLABEL = '' + __cssLABELBG = '' + __cssLEGEND = '' + __cssLEGENDBG = '' + __cssABSVALUES = '' + __cssPERCVALUES = '' + + # Search pattern for images. + __img_pattern = re.compile(r'\.(jpg|jpeg|jpe|gif|png)') + + def set_styles(self): + """set graph styles""" + if self.graphBGColor: + self.__cssGRAPH += 'background-color:' + self.graphBGColor + ';' + if self.graphBorder: + self.__cssGRAPH += 'border:' + self.graphBorder + ';' + if self.barBorder: + self.__cssBAR += 'border:' + self.barBorder + ';' + if self.barBGColor: + self.__cssBARBG += 'background-color:' + self.barBGColor + ';' + if self.titleColor: + self.__cssTITLE += 'color:' + self.titleColor + ';' + if self.titleBGColor: + self.__cssTITLE += 'background-color:' + self.titleBGColor + ';' + if self.titleBorder: + self.__cssTITLE += 'border:' + self.titleBorder + ';' + if self.titleFont: + self.__cssTITLE += 'font-family:' + self.titleFont + ';' + if self.titleAlign: + self.__cssTITLE += 'text-align:' + self.titleAlign + ';' + if self.titleSize: + self.__cssTITLE += 'font-size:' + str(self.titleSize) + 'px;' + if self.titleBGColor: + self.__cssTITLE += 'background-color:' + self.titleBGColor + ';' + if self.titlePadding: + self.__cssTITLE += 'padding:' + str(self.titlePadding) + 'px;' + if self.labelColor: + self.__cssLABEL += 'color:' + self.labelColor + ';' + if self.labelBGColor: + self.__cssLABEL += 'background-color:' + self.labelBGColor + ';' + if self.labelBorder: + self.__cssLABEL += 'border:' + self.labelBorder + ';' + if self.labelFont: + self.__cssLABEL += 'font-family:' + self.labelFont + ';' + if self.labelSize: + self.__cssLABEL += 'font-size:' + str(self.labelSize) + 'px;' + if self.labelAlign: + self.__cssLABEL += 'text-align:' + self.labelAlign + ';' + if self.labelBGColor: + self.__cssLABELBG += 'background-color:' + self.labelBGColor + ';' + if self.legendColor: + self.__cssLEGEND += 'color:' + self.legendColor + ';' + if self.legendFont: + self.__cssLEGEND += 'font-family:' + self.legendFont + ';' + if self.legendSize: + self.__cssLEGEND += 'font-size:' + str(self.legendSize) + 'px;' + if self.legendBGColor: + self.__cssLEGENDBG += 'background-color:' + self.legendBGColor + ';' + if self.legendBorder: + self.__cssLEGENDBG += 'border:' + self.legendBorder + ';' + if self.absValuesColor: + self.__cssABSVALUES += 'color:' + self.absValuesColor + ';' + if self.absValuesBGColor: + self.__cssABSVALUES += 'background-color:' + self.absValuesBGColor + ';' + if self.absValuesBorder: + self.__cssABSVALUES += 'border:' + self.absValuesBorder + ';' + if self.absValuesFont: + self.__cssABSVALUES += 'font-family:' + self.absValuesFont + ';' + if self.absValuesSize: + self.__cssABSVALUES += 'font-size:' + str(self.absValuesSize) + 'px;' + if self.percValuesColor: + self.__cssPERCVALUES += 'color:' + self.percValuesColor + ';' + if self.percValuesFont: + self.__cssPERCVALUES += 'font-family:' + self.percValuesFont + ';' + if self.percValuesSize: + self.__cssPERCVALUES += 'font-size:' + str(self.percValuesSize) + 'px;' + + def level_color(self, value, color): + """return bar color for each level""" + if self.barLevelColors: + for i in range(0, len(self.barLevelColors), 2): + try: + if (self.barLevelColors[i] > 0 and value >= self.barLevelColors[i]) or \ + (self.barLevelColors[i] < 0 and value <= self.barLevelColors[i]): + color = self.barLevelColors[i + 1] + except IndexError: + pass + return color + + def build_bar(self, value, width, height, color): + """return a single bar""" + title = self.absValuesPrefix + str(value) + self.absValuesSuffix + bg = self.__img_pattern.search(color) and 'background' or 'bgcolor' + bar = '' + bar += '
' or '>' + bar += '
' + bar += '
' + return bar + + def build_fader(self, value, width, height, x, color): + """return a single fader""" + fader = '' + x -= int(round(width / 2)) + if x > 0: + fader += '' + fader += '' + fader += '
' + self.build_bar(value, width, height, color) + '
' + return fader + + def build_value(self, val, max_dec, sum=0, align=''): + """return a single bar/fader value""" + val = _number_format(val, max_dec) + if sum: + sum = _number_format(sum, max_dec) + value = '' + legend += '' + i = 0 + + for color in barColors: + if len(self.legend) >= i + 1: + text = hasattr( + self.legend[i], + 'strip') and self.legend[i].strip() or str(self.legend[i]) + else: + text = '' + legend += '' + legend += '' + legend += '' + legend += '' + i += 1 + + legend += '
' + \ + self.build_bar( + '', + self.barWidth, + self.barWidth, + color) + '' + text + '
' + return legend + + def build_hTitle(self, titleLabel, titleValue, titleBar): + """return horizontal titles""" + title = '' + title += '' + titleLabel + '' + if titleValue != '': + title += '' + titleValue + '' + title += '' + titleBar + '' + title += '' + return title + + def create_hBar(self, value, percent, mPerc, mPerc_neg, + max_neg, mul, valSpace, bColor, border, spacer, spacer_neg): + """return a single horizontal bar with label and values (abs./perc.)""" + bar = '' + + if percent < 0: + percent *= -1 + bar += '' + else: + if max_neg: + bar += '' + if percent: + bar += '' + else: + bar += '' + bar += '' + + bar += '
' + if self.showValues < 2: + bar += '' + \ + str(_number_format(percent, self.percValuesDecimals)) + '%' + bar += ' ' + bar += self.build_bar(value, int(round(percent * mul)), self.barWidth, bColor) + bar += '' + bar += '
' + bar += self.build_bar(value, int(round(percent * mul)), self.barWidth, bColor) + bar += '' + if self.showValues < 2: + bar += ' ' + str(_number_format(percent, self.percValuesDecimals)) + '%' + bar += ' 
' + return bar + + def create_vBar(self, value, percent, mPerc, mPerc_neg, + max_neg, mul, valSpace, bColor, border, spacer, spacer_neg): + """return a single vertical bar with label and values (abs./perc.)""" + bar = '' + + if percent < 0: + percent *= -1 + bar += '' + bar += '' + else: + bar += '' + if percent: + bar += '' + else: + bar += '' + if max_neg: + bar += '' + + bar += '
' + bar += self.build_bar(value, self.barWidth, int(round(percent * mul)), bColor) + bar += '
' + bar += (self.showValues < 2) and '' + \ + str(_number_format(percent, self.percValuesDecimals)) + \ + '%' or ' ' + bar += '' + if self.showValues < 2: + bar += str(_number_format(percent, self.percValuesDecimals)) + '%' + bar += '
' + bar += self.build_bar(value, self.barWidth, int(round(percent * mul)), bColor) + bar += '
' + bar += '
' + return bar + + def create(self): + """create a complete bar graph (horizontal, vertical, progress, or fader)""" + self.type = self.type.lower() + d = self.values + t = hasattr( + self.titles, + 'split') and self.titles.split( + ',') or self.titles + r = hasattr( + self.labels, + 'split') and self.labels.split( + ',') or self.labels + drc = hasattr( + self.barColors, + 'split') and self.barColors.split( + ',') or self.barColors + val = [] + bc = [] + if self.barLength < 0.1: + self.barLength = 0.1 + elif self.barLength > 2.9: + self.barLength = 2.9 + labels = (len(d) > len(r)) and len(d) or len(r) + + if self.type == 'pbar' or self.type == 'fader': + if not self.barBGColor: + self.barBGColor = self.labelBGColor + if self.labelBGColor == self.barBGColor and len(t) == 0: + self.labelBGColor = '' + self.labelBorder = '' + + self.set_styles() + + graph = '' + graph += '' + + if self.legend and self.type != 'pbar' and self.type != 'fader': + graph += '
' + if self.type == 'vbar': + graph += '' + graph += '
' + + if self.charts > 1: + divide = math.ceil(labels / self.charts) + graph += '' + if self.showValues < 2: + graph += '' + graph += '' + if self.labelSpace and i < len(v) - 1: + graph += '' + lcnt += 1 + + else: + graph += '' + + graph += '
' + else: + divide = 0 + + sum = 0 + max = 0 + max_neg = 0 + max_dec = 0 + ccnt = 0 + lcnt = 0 + chart = 0 + + for i in range(labels): + if divide and i and not i % divide: + lcnt = 0 + chart += 1 + + try: + drv = len(d[i]) and [e for e in d[i]] or [d[i]] + except: + drv = [d[i]] + + j = 0 + dec = 0 + if len(val) <= chart: + val.append([]) + + for v in drv: + s = str(v) + if s.find('.') != -1: + dec = len(s[s.find('.') + 1:]) + if dec > max_dec: + max_dec = dec + + if len(val[chart]) <= lcnt: + val[chart].append([]) + val[chart][lcnt].append(v) + + if v != 0: + v -= self.baseValue + + if v > max: + max = v + elif v < max_neg: + max_neg = v + + if v < 0: + v *= -1 + sum += v + + if len(bc) <= j: + if ccnt >= len(self.__colors): + ccnt = 0 + if len(drc) <= j or len(drc[j]) < 3: + bc.append(self.__colors[ccnt]) + ccnt += 1 + else: + bc.append(drc[j].strip()) + + j += 1 + + lcnt += 1 + + border = int(self.barBorder[0]) + mPerc = sum and int(round(max * 100.0 / sum)) or 0 + if self.type == 'pbar' or self.type == 'fader': + mul = 2 + else: + mul = mPerc and 100.0 / mPerc or 1 + mul *= self.barLength + + if self.showValues < 2: + if self.type == 'hbar': + valSpace = (self.percValuesDecimals * (self.percValuesSize / 1.6)) + \ + (self.percValuesSize * 3.2) + else: + valSpace = self.percValuesSize * 1.2 + else: + valSpace = self.percValuesSize + spacer = maxSize = int(round(mPerc * mul + valSpace + border * 2)) + + if max_neg: + mPerc_neg = sum and int(round(-max_neg * 100.0 / sum)) or 0 + if mPerc_neg > mPerc and self.type != 'pbar' and self.type != 'fader': + mul = 100.0 / mPerc_neg * self.barLength + spacer_neg = int(round(mPerc_neg * mul + valSpace + border * 2)) + maxSize += spacer_neg + else: + mPerc_neg = spacer_neg = 0 + + titleLabel = '' + titleValue = '' + titleBar = '' + + if len(t) > 0: + titleLabel = (t[0] == '') and ' ' or t[0] + + if self.showValues == 1 or self.showValues == 2: + titleValue = (t[1] == '') and ' ' or t[1] + titleBar = (t[2] == '') and ' ' or t[2] + else: + titleBar = (t[1] == '') and ' ' or t[1] + + chart = 0 + lcnt = 0 + + for v in val: + graph += '' + + if self.type == 'hbar': + if len(t) > 0: + graph += self.build_hTitle(titleLabel, titleValue, titleBar) + + for i in range(len(v)): + label = ( + lcnt < len(r)) and r[lcnt].strip() or str(lcnt + 1) + rowspan = len(v[i]) + graph += '' + + for j in range(len(v[i])): + value = v[i][j] and v[i][j] - self.baseValue or 0 + percent = sum and value * 100.0 / sum or 0 + value = _number_format(v[i][j], max_dec) + bColor = self.level_color(v[i][j], bc[j]) + + if self.showValues == 1 or self.showValues == 2: + graph += self.build_value(v[i] + [j], max_dec, 0, 'right') + + graph += '' + graph += self.create_hBar( + value, percent, mPerc, mPerc_neg, + max_neg, mul, valSpace, bColor, border, spacer, spacer_neg) + graph += '' + if j < len(v[i]) - 1: + graph += '' + + if self.labelSpace and i < len(v) - 1: + graph += '' + lcnt += 1 + + elif self.type == 'vbar': + graph += '' + + if titleBar != '': + titleBar = titleBar.replace('-', '-
') + graph += '' + + for i in range(len(v)): + for j in range(len(v[i])): + value = v[i][j] and v[i][j] - self.baseValue or 0 + percent = sum and value * 100.0 / sum or 0 + value = _number_format(v[i][j], max_dec) + bColor = self.level_color(v[i][j], bc[j]) + + graph += '' + graph += self.create_vBar( + value, percent, mPerc, mPerc_neg, + max_neg, mul, valSpace, bColor, border, spacer, spacer_neg) + graph += '' + + if self.labelSpace: + graph += '' + + if self.showValues == 1 or self.showValues == 2: + graph += '' + if titleValue != '': + graph += '' + + for i in range(len(v)): + for j in range(len(v[i])): + graph += self.build_value(v[i][j], max_dec) + if self.labelSpace: + graph += '' + + graph += '' + if titleLabel != '': + graph += '' + + for i in range(len(v)): + label = ( + lcnt < len(r)) and r[lcnt].strip() or str(lcnt + 1) + colspan = len(v[i]) + graph += '' + if self.labelSpace: + graph += '' + lcnt += 1 + + graph += '' + + elif self.type == 'pbar' or self.type == 'fader': + if len(t) > 0: + graph += self.build_hTitle(titleLabel, titleValue, titleBar) + + for i in range(len(v)): + try: + m = (len(v[i]) > 1) and True or False + except: + m = False + + if m or not i: + label = ( + lcnt < len(r)) and r[lcnt].strip() or str(i + 1) + graph += '' + + if len(r): + graph += '' + + try: + sum = v[i][1] and v[i][1] or v[-1][0] + except: + sum = v[-1][0] + + percent = sum and v[i][0] * 100.0 / sum or 0 + value = _number_format(v[i][0], max_dec) + + if self.showValues == 1 or self.showValues == 2: + graph += self.build_value(v[i] + [0], max_dec, sum, 'right') + + graph += '' + + self.barColors = ( + len(drc) >= i + 1) and drc[i].strip() or self.__colors[0] + bColor = self.level_color(v[i][0], self.barColors) + graph += '
1) and ' rowspan=' + str(rowspan) or '') + '>' + graph += ' ' + label + ' 
' + titleBar + '
' + titleValue + '
' + titleLabel + ' 1) and ' colspan=' + str(colspan) or '') + '>' + graph += ' ' + label + ' 
' + graph += ' ' + label + ' 
' + graph += '
' + if self.type == 'fader': + graph += self.build_fader( + value, int(round(self.barWidth / 2)), + self.barWidth, int(round(percent * mul)), bColor) + else: + graph += self.build_bar(value, + int(round(percent * mul)), self.barWidth, bColor) + graph += '
 ' + \ + str(_number_format(percent, self.percValuesDecimals)) + '%
' + self.__err_type + '
' + + if chart < self.charts - 1 and len(val[chart + 1]): + graph += '
' + + chart += 1 + + if self.charts > 1: + graph += '
' + + if self.legend and self.type != 'pbar' and self.type != 'fader': + graph += ' ' + graph += self.build_legend(bc) + graph += '' + + if self.debug: + graph += "
sum=%s max=%s max_neg=%s max_dec=%s " % (sum, max, max_neg, max_dec) + graph += "mPerc=%s mPerc_neg=%s mul=%s valSpace=%s" % (mPerc, mPerc_neg, mul, valSpace) + + graph += '' + return graph + + +def _number_format(val, dec): + """return float with dec decimals; if dec is 0, return integer""" + return dec and ('%.' + str(dec) + 'f') % val or int(round(val)) + + +if __name__ == '__main__': + print(__doc__) diff --git a/lib/hostchecker.py b/lib/hostchecker.py new file mode 100644 index 00000000..9d3119b0 --- /dev/null +++ b/lib/hostchecker.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# encoding: utf-8 +""" +Created by laramies on 2008-08-21. +""" + +import socket + + +class Checker(): + + def __init__(self, hosts): + self.hosts = hosts + self.realhosts = [] + + def check(self): + for x in self.hosts: + x = str(x) + try: + res = socket.gethostbyname(x) + res = str(res) + self.realhosts.append(x + ':' + res) + except Exception as e: + self.realhosts.append(x + ':' + 'empty') + return self.realhosts diff --git a/lib/htmlExport.py b/lib/htmlExport.py new file mode 100644 index 00000000..07f07f04 --- /dev/null +++ b/lib/htmlExport.py @@ -0,0 +1,167 @@ +from lib import graphs +from lib import markup +import re + + +class htmlExport(): + + def __init__(self, users, hosts, vhosts, dnsres, dnsrev, file, domain, shodan, tldres): + self.users = users + self.hosts = hosts + self.vhost = vhosts + self.fname = file + self.dnsres = dnsres + self.dnsrev = dnsrev + self.domain = domain + self.shodan = shodan + self.tldres = tldres + self.style = "" + + def styler(self): + a = """ + """ + self.style = a + + def writehtml(self): + page = markup.page() + page.html() + self.styler() + page.head(self.style) + page.body() + page.h1('theHarvester results') + page.h2('for :' + self.domain) + page.h3('Dashboard:') + graph = graphs.BarGraph('vBar') + graph.values = [len( + self.users), + len(self.hosts), + len(self.vhost), + len(self.tldres), + len(self.shodan)] + graph.labels = ['Emails', 'hosts', 'Vhost', 'TLD', 'Shodan'] + graph.showValues = 1 + page.body(graph.create()) + page.h3('Emails found:') + if self.users != []: + page.ul(class_='userslist') + page.li(self.users, class_='useritem') + page.ul.close() + else: + page.h2('No emails found.') + page.h3('Hosts found:') + if self.hosts != []: + page.ul(class_='softlist') + page.li(self.hosts, class_='softitem') + page.ul.close() + else: + page.h2('No hosts found.') + if self.tldres != []: + page.h3('TLD domains found in TLD expansion:') + page.ul(class_='tldlist') + page.li(self.tldres, class_='tlditem') + page.ul.close() + if self.dnsres != []: + page.h3('Hosts found in DNS brute force:') + page.ul(class_='dnslist') + page.li(self.dnsres, class_='dnsitem') + page.ul.close() + if self.dnsrev != []: + page.h3('Hosts found with reverse lookup:') + page.ul(class_='dnsrevlist') + page.li(self.dnsrev, class_='dnsrevitem') + page.ul.close() + if self.vhost != []: + page.h3('Virtual hosts found:') + page.ul(class_='pathslist') + page.li(self.vhost, class_='pathitem') + page.ul.close() + if self.shodan != []: + shodanalysis = [] + page.h3('Shodan results:') + for x in self.shodan: + res = x.split('SAPO') + page.h3(res[0]) + page.a('Port:' + res[2]) + page.pre(res[1]) + page.pre.close() + ban = res[1] + reg_server = re.compile('Server:.*') + temp = reg_server.findall(res[1]) + if temp != []: + shodanalysis.append(res[0] + ':' + temp[0]) + if shodanalysis != []: + page.h3('Server technologies:') + repeated = [] + for x in shodanalysis: + if x not in repeated: + page.pre(x) + page.pre.close() + repeated.append(x) + page.body.close() + page.html.close() + file = open(self.fname, 'w') + for x in page.content: + try: + file.write(x) + except: + print('Exception' + x) # Send to logs. + pass + file.close() + return 'ok' diff --git a/lib/ip-ranges.json b/lib/ip-ranges.json new file mode 100644 index 00000000..678c8e6b --- /dev/null +++ b/lib/ip-ranges.json @@ -0,0 +1,8978 @@ +{ + "syncToken": "1546032855", + "createDate": "2018-12-28-21-34-15", + "prefixes": [ + { + "ip_prefix": "18.208.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.245.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.194.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.155.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.196.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.22.0/24", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.112/28", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.210.0.0/15", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.17.0/24", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.154.0/23", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.212.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.240/28", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.241.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "184.169.128.0/17", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "216.182.224.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.74.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.168.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.54.0/23", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.224.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.64.0/22", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.238.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "216.182.232.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.72.0/22", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.184.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "172.96.98.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.125.0.0/16", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.24.0/22", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "54.193.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.104.0/22", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.249.0/24", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.64.0/22", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.5.0/24", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.193.128/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.250.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "107.20.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.8.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.224.0/20", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.224.0/20", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.156.0/24", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "54.180.0.0/15", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.30.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.8.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.64/28", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.92.0.0/17", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.154.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "67.202.0.0/18", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "103.246.148.0/23", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.20.17/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.0.0/20", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.246.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.112/28", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.39.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.150.0/24", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.60.0/23", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.32/28", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.232.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.249.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "207.171.160.0/20", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.48.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.116.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.200/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.99.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.37.223/32", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.192/28", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.20.0/24", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.0.0/20", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.80.0/20", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "184.73.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "46.137.0.0/17", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.16/28", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.208.64/26", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.80.0.0/12", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.40.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.170.0/23", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.124.128.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "35.181.0.0/16", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.138.252/32", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.80.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.214.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.254.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.40.0/24", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.254.0/24", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.64.0/19", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.224.0.0/12", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.216.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.192.192/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.196.192/26", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.221.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.202.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.255.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.253.0.0/16", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.192.0/20", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.187.0/24", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.139.253/32", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.112/28", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.230.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "13.208.0.0/16", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.96.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.156.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.224.0/21", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.236.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.249.0/24", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.244.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.174.0/24", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.12.12/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.128/28", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.208.0.0/13", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.208/28", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "103.246.150.0/23", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.228.0.0/15", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.96/28", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.196.0.0/14", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.32.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.252.0/24", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.192.0/22", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.36.0/22", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.18.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.56.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.21.14/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.19.0/24", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.52.0/23", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "175.41.192.0/18", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.228.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.160/28", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.151.0.0/17", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.54.0.0/15", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.142.0/23", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.241.0/24", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.232.0/21", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.128.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.209.192/26", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "99.80.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.172.0/22", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.65.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.19.236/32", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.200.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.188.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.194.0/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.150.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.200.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.206.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.128.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.128.0/19", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.96/28", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.128.0/19", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.226.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.106.253/32", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.149.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.218.128.0/17", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "76.223.0.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "99.84.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "18.144.0.0/15", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.90.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.138.253/32", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.157.0/24", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.208.192/26", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.10.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.230.0/23", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "100.24.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.74.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.104.0.0/14", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.80.0.0/16", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.216.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.232.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.244.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "175.41.128.0/18", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.32.0/20", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.76.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.216.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.32/28", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.34.57/32", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.13.0/24", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.78.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.253.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.160.0/24", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.160.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.97.0/24", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "162.213.232.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.200.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.1.16/28", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "185.143.16.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.244.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.0.0/20", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.112.35/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.29.0/26", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "35.160.0.0/13", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.48.0.0/14", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.80/28", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.0.0/17", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.192.0/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.236.128.0/18", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.20.16/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.0/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.1.0/28", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.48.0.0/15", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.64.0.0/17", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.239.0/24", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.210.0/23", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "35.155.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.210.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.2.0/23", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.34.56/32", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.16/28", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.225.128/26", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.5.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.199.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.199.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.198.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.69.0/24", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.120.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.98.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.20.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.208/28", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.20.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.24.0/21", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.161.0/24", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "46.137.192.0/19", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.200.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.96.0/20", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.32.0/22", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.232.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.76.0.0/17", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.48.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.6/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.220.0/22", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.196/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.72.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.153.128.0/17", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.58.0/28", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "122.248.192.0/18", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.207.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.154.0.0/16", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.0.0/17", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.32/28", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.160/28", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.227.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.23.0/24", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.48.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.232.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.224.64/26", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.170.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.171.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.4.0/24", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.72.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.48.0/22", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.228.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.120.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.210.192/26", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.200/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.56.0/22", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.160.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "157.175.0.0/16", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.34.32.0/19", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.108.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.236.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.80/28", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.198.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.192.0/19", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "46.51.192.0/20", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.174.0/24", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.106.252/32", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.96.0/20", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.192.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.248.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "178.236.0.0/20", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.176.0.0/15", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.112.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.34.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.247.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.153.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.61.0.0/16", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.79.0.0/16", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.107.252/32", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.16.0/24", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.195.0/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.58.0.0/15", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.218.0.0/17", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.62.0.0/15", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.0.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.19.237/32", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.44.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.192.0/19", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.162.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.144/28", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "46.51.216.0/21", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.28.0.0/16", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.166.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.176.0/22", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.57.0.0/16", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.124.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.192/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.70.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.0/28", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.212.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.10/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.99.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.29.0.0/16", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.15.0/24", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.35.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.62.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.144.0/24", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.194.64/26", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.209.0/26", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.198/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "184.72.0.0/18", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.246.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.26.0/23", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.247.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.248.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "27.0.0.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.180.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.1.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.144/28", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.208.0/21", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.227.0/24", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.68.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.93.0.0/16", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "70.132.0.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.54.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.3.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.225.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.182.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.152.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.32.0.0/15", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "13.112.0.0/14", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.68.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.67.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.173.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.194.0.0/15", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.64.0/20", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.197.0/24", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.128/28", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.193.64/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.184.0.0/13", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.16.0/20", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.163.0/24", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.92.128.0/17", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.0/28", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.0.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.253.0/24", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.120.0/21", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.53.0.0/16", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.48.0/20", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "184.72.128.0/17", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.248.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.240.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.80/28", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.216.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.128.0/20", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.166.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.58.0.0/15", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.51.29/32", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.194.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.244.0/22", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.156.0.0/14", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.18.178/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.209.64/26", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "23.20.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.168.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.151.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.80/28", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.16.0/20", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.64.0/20", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.225.0/24", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "172.96.97.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.229.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.68.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.192.0/20", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.219.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.204.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.178.0.0/15", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.9.0/24", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.204.0/23", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.88.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "75.2.0.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.12.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.0/28", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.220.0.0/15", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.252.0/24", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.35.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "34.240.0.0/13", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.14.19/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.16/28", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.249.96/28", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.8/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.200.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.253.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.240.0/22", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.28.0/23", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.128/28", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.100.0/23", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.172.0/23", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.64/28", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.72.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.192/28", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.11.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.196.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.164.0/22", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "54.223.0.0/16", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.48/28", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.24.0/22", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.196.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "79.125.0.0/17", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.88.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.0.0/20", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.248.0/21", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.32/28", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.40.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.220.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "100.20.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.24.0/23", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.8.0.0/14", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.246.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.139.252/32", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.0/28", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.204.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.163.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "216.182.236.0/23", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "34.208.0.0/12", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.15.0.0/16", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.17.16/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.209.128/26", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.30.0/23", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.96.0/22", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.145.0/24", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.86.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.44.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.76.128.0/17", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.40.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.32.0/21", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.95.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.212.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.232.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.224/28", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.48.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.47.0.0/16", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.16.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.136.0/23", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.64/28", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.225.64/26", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.168.0/22", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.62.0/23", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.175.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.208.0/21", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.51.28/32", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.12.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "63.32.0.0/14", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.83.0.0/16", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.14.18/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.6.0/24", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.197.192/26", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "150.222.2.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.79.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.251.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.52.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.153.0.0/16", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.202.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.1.48/28", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.104.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.196.0.0/15", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.76.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.80.0/20", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.112/28", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.197.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "71.152.0.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "216.137.32.0/19", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.252.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.16/28", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.232.0.0/14", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.243.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.80.0/20", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.174.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "50.16.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.249.0/24", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.52.0.0/15", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.197.128/26", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.233.64.0/18", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.168.0.0/13", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.64.128.0/17", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.80.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.48/28", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.228.0/24", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.128.0/17", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "96.127.0.0/17", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.252.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.148.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "35.182.0.0/15", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.112.0.0/14", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.244.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.148.0/23", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "3.208.0.0/12", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.88.0/22", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "185.48.120.0/22", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.192.64/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.192.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.220.0.0/14", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.36.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.112.0/22", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.94.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.191.0.0/16", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.210.0/26", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.169.0/24", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.0.0/19", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.112/28", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.8.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.204.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "99.86.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "207.171.176.0/20", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.164.0/23", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.208.128/26", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.202.0.0/15", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.208.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.240.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.210.64/26", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "34.248.0.0/13", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.237.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.107.253/32", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "50.18.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.14.0.0/16", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.0.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.88.0/22", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.17.17/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.124.0.0/16", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.84.0.0/15", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.144/28", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.192.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.32/28", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "160.1.0.0/16", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.236.0.0/14", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.220.0/22", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.32.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.100.0/22", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.172.0/23", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "174.129.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.209.0.0/16", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.60.0.0/16", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.78.0.0/16", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "72.44.32.0/19", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.236.0/22", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "34.224.0.0/12", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.75.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.194/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.164.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.68.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.0.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.240.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.230.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.4.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.96/28", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.194.128/26", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.210.128/26", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.202/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.112.0/21", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.224.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.32.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "15.164.0.0/15", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.96.0/19", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.128.0/19", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.128/28", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.34.128.0/17", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.240.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.16.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "75.101.128.0/17", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.164.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.178.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.168.0/24", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "108.128.0.0/13", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.61.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.56.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.184.0.0/15", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "72.21.192.0/19", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.63.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.252.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.198/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.222.57.0/24", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.83.128.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "18.216.0.0/14", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "34.192.0.0/12", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.37.222/32", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.64.0/22", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.160.0/19", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.18.179/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.112.34/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.196.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.215.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "177.71.128.0/17", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.175.0.0/16", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.216.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.76.0/22", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.208.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.228.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "64.252.64.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.52.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.60.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.192/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.219.68.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.229.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.14.0/24", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.64/28", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.216.0/21", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.138.0.0/15", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.144/28", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.174.0/23", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "3.120.0.0/14", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.9.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.4/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.48/28", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.242.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "177.72.240.0/21", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "216.182.238.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "35.180.0.0/16", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.76.0/22", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.36.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.228.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.16.0.0/15", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.28.0/24", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.146.0/23", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.242.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.52.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "46.137.128.0/18", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.2.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.176/28", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.16.0/21", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.234.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.188.0.0/16", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "46.51.128.0/18", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "64.252.128.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.152.0/22", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.167.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.254.0/24", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.254.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.153.0.0/17", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.24.0.0/14", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.170.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.56.0/22", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.160.0/20", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.222.0.0/17", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.192.0/18", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.12.13/32", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.96.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.226.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.248.224/28", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.48/28", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.218.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "3.124.0.0/14", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.176.0/22", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.194.192/26", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.183.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.0/28", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.176.0.0/15", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.246.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.108.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.193.0/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "143.204.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "18.231.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.252.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "46.137.224.0/19", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.248.0/22", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.156.0/22", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.199.0/24", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.128.0/21", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.206.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.252.0/23", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.176.0/21", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.144.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.169.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.66.0.0/16", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.2.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "103.4.8.0/21", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.96.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "184.72.64.0/18", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.244.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.208.0/23", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.112.0/20", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.179.0.0/16", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.138.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.224.0/22", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.110.0/24", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "46.51.224.0/19", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.111.0/24", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.179.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.203.0/24", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.233.0.0/18", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.172.0/24", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.184.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.194/31", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.104.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.246.176.0/20", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.8.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.247.0/24", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.66.0.0/16", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.64/28", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.176.0/21", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "204.236.192.0/18", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.64.0.0/15", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "103.8.172.0/22", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "176.34.0.0/19", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.96.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.158.0/23", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.192.128/26", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.216.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.144.0/21", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.169.0/24", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.198.128/28", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.248.0/24", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.176/28", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.92.0/22", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.236.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.98.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.188.0/22", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.240.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.125.0/25", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "13.249.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.28.0/22", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.56.0/21", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.165.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.0.0.0/15", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "43.250.193.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.77.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.21.15/32", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.205.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.1.64/28", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.224.0.0/14", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.56.0.0/16", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.212.0/22", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.245.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "43.250.192.0/24", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.113.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.32.112.0/21", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.10.0/24", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "99.82.170.0/24", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.7.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.60.0/24", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.248.16.0/21", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.84.0/22", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.240.128.0/18", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "150.222.12.0/24", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "205.251.250.0/23", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.128/26", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.251.0/24", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.4.0.0/14", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.80.0/21", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ip_prefix": "52.46.184.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.67.0.0/16", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.116.0/22", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.201.0.0/16", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.119.214.0/23", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.202/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.151.128.0/17", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.81.0.0/16", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.222.128.0/17", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "13.250.0.0/15", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.166.0/23", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.216.2/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "3.16.0.0/14", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ip_prefix": "18.130.0.0/16", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.72.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.82.180.0/22", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.182.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.168.0/24", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.224.128/26", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.192.0.0/16", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.16/28", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.0.96/28", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "18.136.0.0/16", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "50.112.0.0/16", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ip_prefix": "52.93.97.0/24", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.215.196/31", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ip_prefix": "87.238.80.0/21", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.255.80/28", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.92.252.0/22", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.95.250.0/24", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.144.211.0/26", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "50.19.0.0/16", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "99.79.0.0/16", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.57.0.0/16", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.126.0.0/15", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.239.4.0/22", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.172.0.0/15", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "176.34.64.0/18", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ip_prefix": "52.94.206.0/23", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.231.192.0/20", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.233.128.0/17", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ip_prefix": "203.83.220.0/22", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "54.245.168.0/26", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.243.31.192/26", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "177.71.207.128/26", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.255.254.192/26", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.244.52.192/26", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "176.34.159.192/26", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.251.31.128/26", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.183.255.128/26", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.241.32.64/26", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.252.254.192/26", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "107.23.255.0/26", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.248.220.0/26", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.228.16.0/26", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.250.253.192/26", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.232.40.64/26", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "54.252.79.128/26", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ip_prefix": "52.95.154.0/23", + "region": "eu-west-3", + "service": "S3" + }, + { + "ip_prefix": "52.219.64.0/22", + "region": "ap-south-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.72.0/22", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.64.0/22", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.156.0/24", + "region": "eu-west-3", + "service": "S3" + }, + { + "ip_prefix": "52.92.39.0/24", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.150.0/24", + "region": "eu-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.219.60.0/23", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.48.0/22", + "region": "us-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.0.0/20", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.170.0/23", + "region": "eu-north-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.224.0/21", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.56.0/22", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.142.0/23", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.232.0/21", + "region": "us-west-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.128.0/19", + "region": "eu-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.218.128.0/17", + "region": "us-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.157.0/24", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ip_prefix": "52.219.76.0/22", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.253.0/24", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.0.0/17", + "region": "us-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.20.0/22", + "region": "us-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.24.0/21", + "region": "us-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.96.0/20", + "region": "us-east-2", + "service": "S3" + }, + { + "ip_prefix": "52.219.72.0/22", + "region": "eu-central-1", + "service": "S3" + }, + { + "ip_prefix": "54.222.48.0/22", + "region": "cn-north-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.56.0/22", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.174.0/24", + "region": "me-south-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.248.0/22", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.218.0.0/17", + "region": "eu-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.44.0/22", + "region": "eu-central-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.144.0/24", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.16.0/20", + "region": "us-east-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.252.0/24", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.219.0.0/20", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.40.0/22", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.163.0/24", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.145.0/24", + "region": "ca-central-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.40.0/21", + "region": "eu-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.32.0/21", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.136.0/23", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.62.0/23", + "region": "ap-south-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.80.0/20", + "region": "us-east-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.80.0/22", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.148.0/23", + "region": "eu-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.88.0/22", + "region": "eu-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.169.0/24", + "region": "eu-north-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.164.0/23", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.32.0/22", + "region": "us-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.172.0/23", + "region": "me-south-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.68.0/22", + "region": "eu-central-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.112.0/21", + "region": "us-west-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.16.0/22", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.160.0/19", + "region": "us-west-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.76.0/22", + "region": "us-east-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.52.0/22", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.92.60.0/22", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.219.68.0/22", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.146.0/23", + "region": "ca-central-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.248.0/22", + "region": "ap-south-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.128.0/21", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ip_prefix": "52.95.138.0/24", + "region": "sa-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.158.0/23", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ip_prefix": "52.216.0.0/15", + "region": "us-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.82.188.0/22", + "region": "cn-northwest-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.240.0/22", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.84.0/22", + "region": "ca-central-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.166.0/23", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.95.168.0/24", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ip_prefix": "52.92.252.0/22", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ip_prefix": "54.231.192.0/20", + "region": "eu-central-1", + "service": "S3" + }, + { + "ip_prefix": "18.208.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.245.0/24", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.194.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.155.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.196.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.112/28", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "13.210.0.0/15", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.241.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "184.169.128.0/17", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "216.182.224.0/21", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.74.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.168.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.238.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "216.182.232.0/22", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "13.125.0.0/16", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.193.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.250.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "107.20.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.180.0.0/15", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.30.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.64/28", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.92.0.0/17", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.154.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "67.202.0.0/18", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.112/28", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "54.232.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.116.0/22", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.192/28", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "184.73.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "46.137.0.0/17", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.16/28", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ip_prefix": "3.80.0.0/12", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.40.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "35.181.0.0/16", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ip_prefix": "54.80.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.214.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.254.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.254.0/24", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ip_prefix": "176.32.64.0/19", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "3.224.0.0/12", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.221.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.255.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "18.253.0.0/16", + "region": "us-gov-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.112/28", + "region": "us-gov-east-1", + "service": "EC2" + }, + { + "ip_prefix": "13.208.0.0/16", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ip_prefix": "54.156.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.236.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.249.0/24", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "54.244.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.128/28", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.208.0.0/13", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.228.0.0/15", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.96/28", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.196.0.0/14", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.32.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.252.0/24", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.222.36.0/22", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "52.18.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "175.41.192.0/18", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.160/28", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "54.151.0.0/17", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.54.0.0/15", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.241.0/24", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "99.80.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.65.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.150.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "18.200.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.206.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.96/28", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.226.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.144.0.0/15", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.90.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.10.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "100.24.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.74.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "3.104.0.0/14", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.80.0.0/16", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "175.41.128.0/18", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.216.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.78.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "162.213.232.0/24", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.200.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "35.160.0.0/13", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.48.0.0/14", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "204.236.128.0/18", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.48.0.0/15", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ip_prefix": "52.64.0.0/17", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.239.0/24", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "35.155.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.210.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.199.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.198.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.20.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.208/28", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ip_prefix": "46.137.192.0/19", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.200.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.222.32.0/22", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "52.76.0.0/17", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.153.128.0/17", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "122.248.192.0/18", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.207.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "35.154.0.0/16", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "52.82.0.0/17", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.32/28", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ip_prefix": "54.170.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.160.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "157.175.0.0/16", + "region": "me-south-1", + "service": "EC2" + }, + { + "ip_prefix": "176.34.32.0/19", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "18.236.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.80/28", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "46.51.192.0/20", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "35.176.0.0/15", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "35.153.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.61.0.0/16", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.79.0.0/16", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.58.0.0/15", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.62.0.0/15", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "46.51.216.0/21", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.28.0.0/16", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.57.0.0/16", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.70.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.0/28", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.29.0.0/16", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "184.72.0.0/18", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.246.0/24", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.247.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.248.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.46.180.0/22", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.227.0/24", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ip_prefix": "54.68.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.93.0.0/16", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.54.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.182.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.152.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "13.112.0.0/14", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.68.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.67.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.194.0.0/15", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.128/28", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ip_prefix": "54.184.0.0/13", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.92.128.0/17", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.0.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.253.0/24", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "13.53.0.0/16", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ip_prefix": "184.72.128.0/17", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "13.58.0.0/15", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "54.194.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "35.156.0.0/14", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "23.20.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.80/28", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.225.0/24", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ip_prefix": "18.229.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.219.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.204.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "35.178.0.0/15", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.88.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.12.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.0/28", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "52.220.0.0/15", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "34.240.0.0/13", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.16/28", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.249.96/28", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ip_prefix": "54.253.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.128/28", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.64/28", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.72.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.223.0.0/16", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "79.125.0.0/17", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.88.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.32/28", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.220.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "100.20.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "3.8.0.0/14", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "18.246.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.204.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "216.182.236.0/23", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "34.208.0.0/12", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.15.0.0/16", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "52.86.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.44.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.76.128.0/17", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.95.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.212.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "18.232.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.47.0.0/16", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.64/28", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "63.32.0.0/14", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.83.0.0/16", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ip_prefix": "54.79.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.251.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "18.153.0.0/16", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "18.202.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.196.0.0/15", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "54.76.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.16/28", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "13.232.0.0/14", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.243.0/24", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.174.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "50.16.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.52.0.0/15", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.233.64.0/18", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "35.168.0.0/13", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.64.128.0/17", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.228.0/24", + "region": "me-south-1", + "service": "EC2" + }, + { + "ip_prefix": "54.222.128.0/17", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "96.127.0.0/17", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.148.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "35.182.0.0/15", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ip_prefix": "3.112.0.0/14", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.244.0/24", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "3.208.0.0/12", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "185.48.120.0/22", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.220.0.0/14", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "52.36.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.94.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.191.0.0/16", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "54.202.0.0/15", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "34.248.0.0/13", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "50.18.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.14.0.0/16", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "13.124.0.0/16", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.144/28", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "52.192.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.32/28", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "160.1.0.0/16", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.236.0.0/14", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "174.129.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "13.209.0.0/16", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.60.0.0/16", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.78.0.0/16", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "72.44.32.0/19", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "34.224.0.0/12", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.75.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "13.230.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.224.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "15.164.0.0/15", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "176.34.128.0/17", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.240.0/24", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "75.101.128.0/17", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.178.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "108.128.0.0/13", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.56.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.184.0.0/15", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "18.216.0.0/14", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "34.192.0.0/12", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.215.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "177.71.128.0/17", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.175.0.0/16", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.208.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.228.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.229.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.138.0.0/15", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.144/28", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "3.120.0.0/14", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.9.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.48/28", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.242.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "216.182.238.0/23", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "35.180.0.0/16", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ip_prefix": "18.228.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.16.0.0/15", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.242.0/24", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "13.52.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "46.137.128.0/18", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.176/28", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ip_prefix": "54.234.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.188.0.0/16", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "46.51.128.0/18", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.153.0.0/17", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.24.0.0/14", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.222.0.0/17", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.94.248.224/28", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.48/28", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.218.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "3.124.0.0/14", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.82.176.0/22", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ip_prefix": "54.183.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.0/28", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.176.0.0/15", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.246.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "18.231.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.252.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "46.137.224.0/19", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.144.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.169.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.66.0.0/16", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ip_prefix": "52.2.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "103.4.8.0/21", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "184.72.64.0/18", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.179.0.0/16", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "46.51.224.0/19", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.179.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "54.233.0.0/18", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.8.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.247.0/24", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.66.0.0/16", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "204.236.192.0/18", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "54.64.0.0/15", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "176.34.0.0/19", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.248.0/24", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "3.0.0.0/15", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.77.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.119.205.0/24", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "18.224.0.0/14", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "52.56.0.0/16", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "54.245.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.251.0/24", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "52.4.0.0/14", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.46.184.0/22", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ip_prefix": "52.67.0.0/16", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "18.201.0.0/16", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.151.128.0/17", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "52.81.0.0/16", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ip_prefix": "13.250.0.0/15", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "3.16.0.0/14", + "region": "us-east-2", + "service": "EC2" + }, + { + "ip_prefix": "18.130.0.0/16", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.72.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.82.180.0/22", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ip_prefix": "18.136.0.0/16", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ip_prefix": "50.112.0.0/16", + "region": "us-west-2", + "service": "EC2" + }, + { + "ip_prefix": "52.95.255.80/28", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "52.95.250.0/24", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ip_prefix": "50.19.0.0/16", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "99.79.0.0/16", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ip_prefix": "13.57.0.0/16", + "region": "us-west-1", + "service": "EC2" + }, + { + "ip_prefix": "13.126.0.0/15", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ip_prefix": "54.172.0.0/15", + "region": "us-east-1", + "service": "EC2" + }, + { + "ip_prefix": "176.34.64.0/18", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ip_prefix": "54.233.128.0/17", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ip_prefix": "205.251.192.0/21", + "region": "GLOBAL", + "service": "ROUTE53" + }, + { + "ip_prefix": "52.95.110.0/24", + "region": "GLOBAL", + "service": "ROUTE53" + }, + { + "ip_prefix": "13.124.199.0/24", + "region": "ap-northeast-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "34.226.14.0/24", + "region": "us-east-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.124.128.0/17", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.230.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.239.128.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.82.128.0/19", + "region": "cn-northwest-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "99.84.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.15.127.128/26", + "region": "us-east-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "35.158.136.0/24", + "region": "eu-central-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.57.254.0/24", + "region": "eu-central-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "18.216.170.128/25", + "region": "us-east-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.54.63.128/26", + "region": "ap-southeast-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.59.250.0/26", + "region": "us-east-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.210.67.128/26", + "region": "ap-southeast-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "35.167.191.128/26", + "region": "us-west-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.47.139.0/24", + "region": "eu-west-3", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.199.127.192/26", + "region": "ap-northeast-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.212.248.0/26", + "region": "eu-west-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "205.251.192.0/19", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.66.194.128/26", + "region": "ap-south-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.239.192.0/19", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "70.132.0.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.32.0.0/15", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.113.203.0/24", + "region": "ap-northeast-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "34.195.252.0/24", + "region": "us-east-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "35.162.63.192/26", + "region": "us-west-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "34.223.12.224/27", + "region": "us-west-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.35.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "204.246.172.0/23", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "204.246.164.0/22", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.56.127.0/25", + "region": "eu-west-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "204.246.168.0/22", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.228.69.0/24", + "region": "ap-southeast-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "34.216.51.0/25", + "region": "us-west-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "71.152.0.0/17", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "216.137.32.0/19", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "205.251.249.0/24", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "99.86.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.46.0.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.84.0.0/15", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.233.255.128/26", + "region": "sa-east-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "64.252.64.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.52.191.128/26", + "region": "us-west-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "204.246.174.0/23", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "64.252.128.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "205.251.254.0/24", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "143.204.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "205.251.252.0/23", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.78.247.128/26", + "region": "ap-northeast-2", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "204.246.176.0/20", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.220.191.0/26", + "region": "ap-southeast-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "13.249.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.240.128.0/18", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "205.251.250.0/23", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.222.128.0/17", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.182.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "54.192.0.0/16", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "34.232.163.208/29", + "region": "us-east-1", + "service": "CLOUDFRONT" + }, + { + "ip_prefix": "52.47.73.72/29", + "region": "eu-west-3", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.55.255.216/29", + "region": "ap-southeast-2", + "service": "CODEBUILD" + }, + { + "ip_prefix": "52.15.247.208/29", + "region": "us-east-2", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.112.191.184/29", + "region": "ap-northeast-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "34.250.63.248/29", + "region": "eu-west-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "52.221.221.128/29", + "region": "ap-southeast-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.127.70.136/29", + "region": "ap-south-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "52.82.1.0/29", + "region": "cn-northwest-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "177.71.207.16/29", + "region": "sa-east-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.124.145.16/29", + "region": "ap-northeast-2", + "service": "CODEBUILD" + }, + { + "ip_prefix": "35.157.127.248/29", + "region": "eu-central-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "35.182.14.48/29", + "region": "ca-central-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "35.176.92.32/29", + "region": "eu-west-2", + "service": "CODEBUILD" + }, + { + "ip_prefix": "52.43.76.88/29", + "region": "us-west-2", + "service": "CODEBUILD" + }, + { + "ip_prefix": "18.231.194.8/29", + "region": "sa-east-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "52.80.198.136/29", + "region": "cn-north-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.56.32.200/29", + "region": "us-west-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "34.228.4.208/28", + "region": "us-east-1", + "service": "CODEBUILD" + }, + { + "ip_prefix": "13.248.99.0/24", + "region": "us-west-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.174.0/24", + "region": "ca-central-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "13.248.128.0/17", + "region": "GLOBAL", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "76.223.0.0/17", + "region": "GLOBAL", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.160.0/24", + "region": "ap-south-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "13.248.97.0/24", + "region": "eu-central-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "13.248.98.0/24", + "region": "ap-northeast-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.161.0/24", + "region": "eu-west-3", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.171.0/24", + "region": "us-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.162.0/24", + "region": "eu-west-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.173.0/24", + "region": "ap-southeast-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.163.0/24", + "region": "eu-central-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.166.0/24", + "region": "us-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "75.2.0.0/17", + "region": "GLOBAL", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.175.0/24", + "region": "us-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.164.0/24", + "region": "sa-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.168.0/24", + "region": "ap-northeast-2", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.83.128.0/17", + "region": "GLOBAL", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.167.0/24", + "region": "us-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.156.0/22", + "region": "GLOBAL", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.172.0/24", + "region": "us-west-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "13.248.96.0/24", + "region": "eu-west-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.169.0/24", + "region": "eu-west-2", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.165.0/24", + "region": "us-east-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "99.82.170.0/24", + "region": "ap-northeast-1", + "service": "GLOBALACCELERATOR" + }, + { + "ip_prefix": "13.251.113.64/26", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.251.116.0/23", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ip_prefix": "13.210.2.192/26", + "region": "ap-southeast-2", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "13.236.8.0/25", + "region": "ap-southeast-2", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "18.182.96.64/26", + "region": "ap-northeast-1", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "18.184.2.128/25", + "region": "eu-central-1", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "18.233.213.128/25", + "region": "us-east-1", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "18.236.61.0/25", + "region": "us-west-2", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "35.158.127.64/26", + "region": "eu-central-1", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "52.55.191.224/27", + "region": "us-east-1", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "54.190.198.32/28", + "region": "us-west-2", + "service": "AMAZON_CONNECT" + }, + { + "ip_prefix": "13.250.186.128/27", + "region": "ap-southeast-1", + "service": "CLOUD9" + }, + { + "ip_prefix": "13.250.186.160/27", + "region": "ap-southeast-1", + "service": "CLOUD9" + }, + { + "ip_prefix": "18.188.9.0/27", + "region": "us-east-2", + "service": "CLOUD9" + }, + { + "ip_prefix": "18.188.9.32/27", + "region": "us-east-2", + "service": "CLOUD9" + }, + { + "ip_prefix": "34.217.141.224/27", + "region": "us-west-2", + "service": "CLOUD9" + }, + { + "ip_prefix": "34.218.119.32/27", + "region": "us-west-2", + "service": "CLOUD9" + }, + { + "ip_prefix": "34.245.205.0/27", + "region": "eu-west-1", + "service": "CLOUD9" + }, + { + "ip_prefix": "34.245.205.64/27", + "region": "eu-west-1", + "service": "CLOUD9" + }, + { + "ip_prefix": "35.172.155.192/27", + "region": "us-east-1", + "service": "CLOUD9" + }, + { + "ip_prefix": "35.172.155.96/27", + "region": "us-east-1", + "service": "CLOUD9" + } + ], + "ipv6_prefixes": [ + { + "ipv6_prefix": "2a05:d07c:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a300::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4860::/47", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da1a::/36", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:300f::/64", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07c:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da18::/36", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:ff00::/64", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a01:578:0:7000::/56", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80ff:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:0:7500::/56", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:48b0::/47", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4840::/47", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a600::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07c:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a500::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:0:7100::/56", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f14::/35", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7000::/56", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:100:7200::/56", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4820::/47", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:eee::/48", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:5::/64", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:0:7200::/56", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:aa00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4870::/47", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:108:d000::/44", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da16::/36", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7200::/56", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fe:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d016::/36", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7100::/56", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4810::/47", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f12::/36", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4830::/47", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d050:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:ab00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80a0:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:5000::/36", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:af00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a100::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f1c::/36", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:4000::/36", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d012::/36", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:ac00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fc:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f11::/36", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80f9:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07c:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:8014::/36", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80a0:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80f8:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:3000::/36", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:f000::/36", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2804:800:0:7000::/56", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4850::/47", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:48a0::/47", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:fff::/48", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fa:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80f9:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f1e::/36", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:108:7000::/44", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a400::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fc:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:48d0::/47", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a800::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d01e::/36", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6700:ff00::/64", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2403:b300:ff00::/64", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f16::/36", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:4000::/40", + "region": "us-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:2000::/36", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:0:7400::/56", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:1000::/36", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07f:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:8018::/36", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a01:578:13::/64", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:1000::/40", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4880::/47", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4007::/64", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07c:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a900::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7400::/56", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a01:578:0:7100::/56", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fa0:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:8000:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:0:7000::/56", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafa:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2400:6500:100:7100::/56", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:2000::/40", + "region": "us-gov-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f15::/32", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4800::/47", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:8000::/40", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da14::/36", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:8000::/40", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d078:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:2000::/40", + "region": "eu-west-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffe:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07c:c000::/40", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:ae00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07e:4000::/40", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:c000::/40", + "region": "us-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:ddd::/48", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da1c::/36", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf9:2000::/40", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2804:800:ff00::/64", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d079:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffa:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:8000:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:ad00::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d018::/36", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80ff:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:48c0::/47", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d01c::/36", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafc:8000::/40", + "region": "ap-southeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff9:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d000:6000::/40", + "region": "eu-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80f8:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a200::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7800::/56", + "region": "ca-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a01:578:0:7200::/56", + "region": "eu-west-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d014::/36", + "region": "eu-central-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daf8:4000::/40", + "region": "ap-northeast-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:c000::/40", + "region": "ap-southeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f18::/33", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ff8:e000::/40", + "region": "sa-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fe:8000::/40", + "region": "cn-north-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2620:107:4000:7700::/56", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daa0:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:dafe:a000::/40", + "region": "ap-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da12::/36", + "region": "ap-northeast-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f01:4890::/47", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:daff:6000::/40", + "region": "ap-northeast-3", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1f00:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2406:da00:ff00::/64", + "region": "us-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:5300::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:9000:a700::/40", + "region": "GLOBAL", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a05:d07a:e000::/40", + "region": "me-south-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1ffc:5000::/40", + "region": "us-gov-east-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2600:1fff:6000::/40", + "region": "us-east-2", + "service": "AMAZON" + }, + { + "ipv6_prefix": "240f:80fa:4000::/40", + "region": "cn-northwest-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2a01:578:3::/64", + "region": "eu-west-1", + "service": "AMAZON" + }, + { + "ipv6_prefix": "2804:800:ff00::b147:cf80/122", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2400:6700:ff00::36f8:dc00/122", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2403:b300:ff00::36fc:4f80/122", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da00:ff00::36f3:1fc0/122", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da14:fff:f800::/53", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2400:6500:ff00::36ff:fec0/122", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2a01:578:3::36e4:1000/122", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f14:fff:f800::/53", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f14:7ff:f800::/53", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da1c:7ff:f800::/53", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f18:7fff:f800::/53", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f18:3fff:f800::/53", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2804:800:ff00::36e8:2840/122", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2620:107:300f::36f1:2040/122", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2620:108:700f::36f4:34c0/122", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2620:107:300f::36b7:ff80/122", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2403:b300:ff00::36fc:fec0/122", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2a05:d018:7ff:f800::/53", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da00:ff00::6b17:ff00/122", + "region": "us-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2400:6700:ff00::36fa:fdc0/122", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da18:fff:f800::/53", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2620:108:700f::36f5:a800/122", + "region": "us-west-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f1c:7ff:f800::/53", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da1c:fff:f800::/53", + "region": "ap-southeast-2", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f1e:fff:f800::/53", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f1c:fff:f800::/53", + "region": "us-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da14:7ff:f800::/53", + "region": "ap-northeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2a05:d018:fff:f800::/53", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2400:6500:ff00::36fb:1f80/122", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:da18:7ff:f800::/53", + "region": "ap-southeast-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2600:1f1e:7ff:f800::/53", + "region": "sa-east-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2a01:578:3::b022:9fc0/122", + "region": "eu-west-1", + "service": "ROUTE53_HEALTHCHECKS" + }, + { + "ipv6_prefix": "2406:daf8:c000::/40", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:6000::/40", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d050:2000::/40", + "region": "eu-west-3", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:8000::/40", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:2000::/40", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:8000::/40", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d050:e000::/40", + "region": "me-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d050:c000::/40", + "region": "eu-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:6000::/40", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:a000::/40", + "region": "ap-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:c000::/40", + "region": "eu-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:4000::/40", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:a000::/40", + "region": "ap-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:2000::/40", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:6000::/40", + "region": "us-east-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:4000::/40", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:4000::/40", + "region": "us-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d050:8000::/40", + "region": "eu-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:6000::/40", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:1000::/40", + "region": "ca-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:c000::/40", + "region": "us-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:e000::/40", + "region": "me-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:4000::/40", + "region": "us-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d050:4000::/40", + "region": "eu-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:8000::/40", + "region": "us-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:c000::/40", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:c000::/40", + "region": "us-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:c000::/40", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:e000::/40", + "region": "sa-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:8000::/40", + "region": "eu-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf8:8000::/40", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:4000::/40", + "region": "us-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80a0:8000::/40", + "region": "cn-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:c000::/40", + "region": "ap-southeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:2000::/40", + "region": "eu-west-3", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:5000::/36", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80f9:8000::/40", + "region": "cn-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80a0:4000::/40", + "region": "cn-northwest-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:4000::/40", + "region": "us-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:8000::/40", + "region": "eu-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:4000::/40", + "region": "eu-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80f8:4000::/40", + "region": "cn-northwest-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80fa:8000::/40", + "region": "cn-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:e000::/40", + "region": "sa-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80f9:4000::/40", + "region": "cn-northwest-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:2000::/40", + "region": "eu-west-3", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:8000::/40", + "region": "us-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:6000::/40", + "region": "us-east-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:c000::/40", + "region": "eu-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:c000::/40", + "region": "us-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:2000::/40", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:c000::/40", + "region": "eu-west-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:2000::/40", + "region": "eu-west-3", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:6000::/40", + "region": "eu-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:2000::/40", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:e000::/40", + "region": "me-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:1000::/40", + "region": "ca-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf8:2000::/40", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:6000::/40", + "region": "us-east-2", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf8:a000::/40", + "region": "ap-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:1000::/40", + "region": "ca-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:5000::/40", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:1000::/40", + "region": "ca-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:2000::/40", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:4000::/40", + "region": "eu-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1fa0:5000::/40", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf8:6000::/40", + "region": "ap-northeast-3", + "service": "S3" + }, + { + "ipv6_prefix": "2406:dafa:8000::/40", + "region": "ap-southeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:5000::/40", + "region": "us-gov-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:8000::/40", + "region": "us-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:2000::/40", + "region": "us-gov-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:4000::/40", + "region": "eu-central-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:8000::/40", + "region": "eu-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:8000::/40", + "region": "us-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d078:6000::/40", + "region": "eu-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:c000::/40", + "region": "us-west-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:4000::/40", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf9:2000::/40", + "region": "ap-northeast-2", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d079:6000::/40", + "region": "eu-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ffa:e000::/40", + "region": "sa-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff9:6000::/40", + "region": "us-east-2", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80f8:8000::/40", + "region": "cn-north-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daf8:4000::/40", + "region": "ap-northeast-1", + "service": "S3" + }, + { + "ipv6_prefix": "2600:1ff8:e000::/40", + "region": "sa-east-1", + "service": "S3" + }, + { + "ipv6_prefix": "2406:daa0:a000::/40", + "region": "ap-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d07a:e000::/40", + "region": "me-south-1", + "service": "S3" + }, + { + "ipv6_prefix": "240f:80fa:4000::/40", + "region": "cn-northwest-1", + "service": "S3" + }, + { + "ipv6_prefix": "2a05:d000:8000::/40", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:8000::/40", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da1a::/36", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d000:4000::/40", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2620:107:300f::/64", + "region": "us-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da18::/36", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2400:6500:ff00::/64", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:80ff:4000::/40", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:c000::/40", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f14::/35", + "region": "us-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:e000::/40", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d000:c000::/40", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:e000::/40", + "region": "me-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:1000::/40", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:4000::/40", + "region": "us-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:4000::/40", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:4000::/40", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:1000::/40", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d000:e000::/40", + "region": "me-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da16::/36", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:2000::/40", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d016::/36", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:8000::/40", + "region": "ap-southeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:c000::/40", + "region": "us-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f12::/36", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:6000::/40", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:e000::/40", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:c000::/40", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:2000::/40", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:8000::/40", + "region": "us-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f1c::/36", + "region": "us-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d012::/36", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:6000::/40", + "region": "us-east-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2620:108:700f::/64", + "region": "us-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f11::/36", + "region": "ca-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:2000::/40", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:8014::/36", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:8000::/40", + "region": "us-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f1e::/36", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d01e::/36", + "region": "me-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:c000::/40", + "region": "us-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:2000::/40", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2400:6700:ff00::/64", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2403:b300:ff00::/64", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f16::/36", + "region": "us-east-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:a000::/40", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:4000::/40", + "region": "us-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:2000::/40", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d07f:8000::/40", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:8018::/36", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a01:578:13::/64", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:a000::/40", + "region": "ap-south-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2620:107:4007::/64", + "region": "us-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:8000:4000::/40", + "region": "cn-northwest-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f15::/32", + "region": "us-gov-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:c000::/40", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da14::/36", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d000:2000::/40", + "region": "eu-west-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2620:108:d00f::/64", + "region": "us-gov-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da1c::/36", + "region": "ap-southeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:6000::/40", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2804:800:ff00::/64", + "region": "sa-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:4000::/40", + "region": "ap-northeast-1", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:8000:8000::/40", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d018::/36", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "240f:80ff:8000::/40", + "region": "cn-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d01c::/36", + "region": "eu-west-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d000:6000::/40", + "region": "eu-north-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2a05:d014::/36", + "region": "eu-central-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f18::/33", + "region": "us-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:5000::/40", + "region": "us-gov-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da12::/36", + "region": "ap-northeast-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:daff:6000::/40", + "region": "ap-northeast-3", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1f00:5000::/40", + "region": "us-gov-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2406:da00:ff00::/64", + "region": "us-east-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:1fff:6000::/40", + "region": "us-east-2", + "service": "EC2" + }, + { + "ipv6_prefix": "2a01:578:3::/64", + "region": "eu-west-1", + "service": "EC2" + }, + { + "ipv6_prefix": "2600:9000:eee::/48", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:4000::/36", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:3000::/36", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:f000::/36", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:fff::/48", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:2000::/36", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:1000::/36", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:ddd::/48", + "region": "GLOBAL", + "service": "CLOUDFRONT" + }, + { + "ipv6_prefix": "2600:9000:5300::/40", + "region": "GLOBAL", + "service": "CLOUDFRONT" + } + ] +} \ No newline at end of file diff --git a/lib/markup.py b/lib/markup.py new file mode 100644 index 00000000..0891d7b2 --- /dev/null +++ b/lib/markup.py @@ -0,0 +1,559 @@ +# This code is in the public domain, it comes with absolutely no +# warranty and you can do absolutely whatever you want with it. + +__date__ = '17 May 2007' +__version__ = '1.7' +__doc__ = """ +This is markup.py - a Python module that attempts to +make it easier to generate HTML/XML from a Python program +in an intuitive, lightweight, customizable and pythonic way. + +The code is in the public domain. + +Version: %s as of %s. + +Documentation and further info is at http://markup.sourceforge.net/ + +Please send bug reports, feature requests, enhancement +ideas or questions to nogradi at gmail dot com. + +Installation: drop markup.py somewhere into your Python path. +""" % ( __version__, __date__ ) + + +class element: + + """This class handles the addition of a new element.""" + + def __init__(self, tag, case='lower', parent=None): + self.parent = parent + + if case == 'lower': + self.tag = tag.lower() + else: + self.tag = tag.upper() + + def __call__(self, *args, **kwargs): + if len(args) > 1: + raise ArgumentError(self.tag) + + # If class_ was defined in parent, it should be added to every element. + if self.parent is not None and self.parent.class_ is not None: + if 'class_' not in kwargs: + kwargs['class_'] = self.parent.class_ + + if self.parent is None and len(args) == 1: + x = [self.render(self.tag, False, myarg, mydict) + for myarg, mydict in _argsdicts(args, kwargs)] + return '\n'.join(x) + elif self.parent is None and len(args) == 0: + x = [self.render(self.tag, True, myarg, mydict) + for myarg, mydict in _argsdicts(args, kwargs)] + return '\n'.join(x) + + if self.tag in self.parent.twotags: + for myarg, mydict in _argsdicts(args, kwargs): + self.render(self.tag, False, myarg, mydict) + elif self.tag in self.parent.onetags: + if len(args) == 0: + for myarg, mydict in _argsdicts(args, kwargs): + # Here myarg is always None, because len( args ) = 0. + self.render(self.tag, True, myarg, mydict) + else: + raise ClosingError(self.tag) + elif self.parent.mode == 'strict_html' and self.tag in self.parent.deptags: + raise DeprecationError(self.tag) + else: + raise InvalidElementError(self.tag, self.parent.mode) + + def render(self, tag, single, between, kwargs): + """Append the actual tags to content.""" + + out = "<%s" % tag + for key, value in kwargs.items(): + # When value is None, that means stuff like <... checked>. + if value is not None: + # Strip this so class_ will mean class, etc. + key = key.strip('_') + # Special cases, maybe change _ to - overall? + if key == 'http_equiv': + key = 'http-equiv' + elif key == 'accept_charset': + key = 'accept-charset' + out = "%s %s=\"%s\"" % (out, key, escape(value)) + else: + out = "%s %s" % (out, key) + if between is not None: + out = "%s>%s" % (out, between, tag) + else: + if single: + out = "%s />" % out + else: + out = "%s>" % out + if self.parent is not None: + self.parent.content.append(out) + else: + return out + + def close(self): + """Append a closing tag unless element has only opening tag.""" + + if self.tag in self.parent.twotags: + self.parent.content.append("" % self.tag) + elif self.tag in self.parent.onetags: + raise ClosingError(self.tag) + elif self.parent.mode == 'strict_html' and self.tag in self.parent.deptags: + raise DeprecationError(self.tag) + + def open(self, **kwargs): + """Append an opening tag.""" + + if self.tag in self.parent.twotags or self.tag in self.parent.onetags: + self.render(self.tag, False, None, kwargs) + elif self.mode == 'strict_html' and self.tag in self.parent.deptags: + raise DeprecationError(self.tag) + + +class page: + + """This is our main class representing a document. Elements are added as + attributes of an instance of this class.""" + + def __init__(self, mode='strict_html', case='lower', + onetags=None, twotags=None, separator='\n', class_=None): + """Stuff that effects the whole document. + + mode -- 'strict_html' for HTML 4.01 (default) + 'html' alias for 'strict_html' + 'loose_html' to allow some deprecated elements + 'xml' to allow arbitrary elements + + case -- 'lower' element names will be printed in lower case (default) + 'upper' they will be printed in upper case + + onetags -- list or tuple of valid elements with opening tags only + twotags -- list or tuple of valid elements with both opening and closing tags + these two keyword arguments may be used to select + the set of valid elements in 'xml' mode + invalid elements will raise appropriate exceptions + + separator -- string to place between added elements, defaults to newline + + class_ -- a class that will be added to every element if defined""" + + valid_onetags = [ + "AREA", + "BASE", + "BR", + "COL", + "FRAME", + "HR", + "IMG", + "INPUT", + "LINK", + "META", + "PARAM"] + valid_twotags = [ + "A", "ABBR", "ACRONYM", "ADDRESS", "B", "BDO", "BIG", "BLOCKQUOTE", "BODY", "BUTTON", + "CAPTION", "CITE", "CODE", "COLGROUP", "DD", "DEL", "DFN", "DIV", "DL", "DT", "EM", "FIELDSET", + "FORM", "FRAMESET", "H1", "H2", "H3", "H4", "H5", "H6", "HEAD", "HTML", "I", "IFRAME", "INS", + "KBD", "LABEL", "LEGEND", "LI", "MAP", "NOFRAMES", "NOSCRIPT", "OBJECT", "OL", "OPTGROUP", + "OPTION", "P", "PRE", "Q", "SAMP", "SCRIPT", "SELECT", "SMALL", "SPAN", "STRONG", "STYLE", + "SUB", "SUP", "TABLE", "TBODY", "TD", "TEXTAREA", "TFOOT", "TH", "THEAD", "TITLE", "TR", + "TT", "UL", "VAR"] + deprecated_onetags = ["BASEFONT", "ISINDEX"] + deprecated_twotags = [ + "APPLET", + "CENTER", + "DIR", + "FONT", + "MENU", + "S", + "STRIKE", + "U"] + + self.header = [] + self.content = [] + self.footer = [] + self.case = case + self.separator = separator + + # init( ) sets it to True so we know that has to be printed at the end. + self._full = False + self.class_ = class_ + + if mode == 'strict_html' or mode == 'html': + self.onetags = valid_onetags + self.onetags += [str.lower(x) for x in self.onetags] + self.twotags = valid_twotags + self.twotags += [str.lower(x) for x in self.twotags] + self.deptags = deprecated_onetags + deprecated_twotags + self.deptags += [str.lower(x) for x in self.deptags] + self.mode = 'strict_html' + elif mode == 'loose_html': + self.onetags = valid_onetags + deprecated_onetags + self.onetags += [str.lower(x) for x in self.onetags] + self.twotags = valid_twotags + deprecated_twotags + self.onetags += [str.lower(x) for x in self.twotags] + self.mode = mode + elif mode == 'xml': + if onetags and twotags: + self.onetags = onetags + self.twotags = twotags + elif (onetags and not twotags) or (twotags and not onetags): + raise CustomizationError() + else: + self.onetags = russell() + self.twotags = russell() + self.mode = mode + else: + raise ModeError(mode) + + def __getattr__(self, attr): + if attr.startswith("__") and attr.endswith("__"): + raise AttributeError(attr) + return element(attr, case=self.case, parent=self) + + def __str__(self): + + if self._full and (self.mode == 'strict_html' or self.mode == 'loose_html'): + end = ['', ''] + else: + end = [] + + return ( + self.separator.join( + self.header + + self.content + + self.footer + + end) + ) + + def __call__(self, escape=False): + """Return the document as a string. + + escape -- False print normally + True replace < and > by < and > + the default escape sequences in most browsers""" + + if escape: + return _escape(self.__str__()) + else: + return self.__str__() + + def add(self, text): + """This is an alias to addcontent.""" + self.addcontent(text) + + def addfooter(self, text): + """Add some text to the bottom of the document""" + self.footer.append(text) + + def addheader(self, text): + """Add some text to the top of the document""" + self.header.append(text) + + def addcontent(self, text): + """Add some text to the main part of the document""" + self.content.append(text) + + def init(self, lang='en', css=None, metainfo=None, title=None, header=None, + footer=None, charset=None, encoding=None, doctype=None, bodyattrs=None, script=None): + """This method is used for complete documents with appropriate + doctype, encoding, title, etc information. For an HTML/XML snippet + omit this method. + + lang -- language, usually a two character string, will appear + as in html mode (ignored in xml mode) + + css -- Cascading Style Sheet filename as a string or a list of + strings for multiple css files (ignored in xml mode) + + metainfo -- a dictionary in the form { 'name':'content' } to be inserted + into meta element(s) as + (ignored in xml mode) + + bodyattrs --a dictionary in the form { 'key':'value', ... } which will be added + as attributes of the element as + (ignored in xml mode) + + script -- dictionary containing src:type pairs, + + title -- the title of the document as a string to be inserted into + a title element as my title (ignored in xml mode) + + header -- some text to be inserted right after the element + (ignored in xml mode) + + footer -- some text to be inserted right before the element + (ignored in xml mode) + + charset -- a string defining the character set, will be inserted into a + + element (ignored in xml mode) + + encoding -- a string defining the encoding, will be put into to first line of + the document as in + xml mode (ignored in html mode) + + doctype -- the document type string, defaults to + + in html mode (ignored in xml mode)""" + + self._full = True + + if self.mode == 'strict_html' or self.mode == 'loose_html': + if doctype is None: + doctype = "" + self.header.append(doctype) + self.html(lang=lang) + self.head() + if charset is not None: + self.meta( + http_equiv='Content-Type', + content="text/html; charset=%s" % + charset) + if metainfo is not None: + self.metainfo(metainfo) + if css is not None: + self.css(css) + if title is not None: + self.title(title) + if script is not None: + self.scripts(script) + self.head.close() + if bodyattrs is not None: + self.body(**bodyattrs) + else: + self.body() + if header is not None: + self.content.append(header) + if footer is not None: + self.footer.append(footer) + + elif self.mode == 'xml': + if doctype is None: + if encoding is not None: + doctype = "" % encoding + else: + doctype = "" + self.header.append(doctype) + + def css(self, filelist): + """This convenience function is only useful for html. It adds CSS + stylesheet(s) to the document via the element.""" + + if isinstance(filelist, str): + self.link( + href=filelist, + rel='stylesheet', + type='text/css', + media='all') + else: + for file in filelist: + self.link( + href=file, + rel='stylesheet', + type='text/css', + media='all') + + def metainfo(self, mydict): + """This convenience function is only useful for html. It adds meta + information via the element, the argument is a dictionary of + the form { 'name':'content' }.""" + + if isinstance(mydict, dict): + for name, content in mydict.items(): + self.meta(name=name, content=content) + else: + raise TypeError( + "Metainfo should be called with a dictionary argument of name:content pairs.") + + def scripts(self, mydict): + """Only useful in html, mydict is dictionary of src:type pairs will + be rendered as """ + + if isinstance(mydict, dict): + for src, type in mydict.items(): + self.script('', src=src, type='text/%s' % type) + else: + raise TypeError( + "Script should be given a dictionary of src:type pairs.") + + +class _oneliner: + + """An instance of oneliner returns a string corresponding to one element. + This class can be used to write 'oneliners' that return a string + immediately so there is no need to instantiate the page class.""" + + def __init__(self, case='lower'): + self.case = case + + def __getattr__(self, attr): + if attr.startswith("__") and attr.endswith("__"): + raise AttributeError(attr) + return element(attr, case=self.case, parent=None) + + +oneliner = _oneliner(case='lower') +upper_oneliner = _oneliner(case='upper') + + +def _argsdicts(args, mydict): + """A utility generator that pads argument list and dictionary values, will + only be called with len( args ) = 0, 1.""" + + if len(args) == 0: + args = None, + elif len(args) == 1: + args = _totuple(args[0]) + else: + raise Exception("We should have never gotten here.") + + mykeys = list(mydict.keys()) + myvalues = list(map(_totuple, list(mydict.values()))) + maxlength = max(list(map(len, [args] + myvalues))) + for i in range(maxlength): + thisdict = {} + for key, value in zip(mykeys, myvalues): + try: + thisdict[key] = value[i] + except IndexError: + thisdict[key] = value[-1] + try: + thisarg = args[i] + except IndexError: + thisarg = args[-1] + + yield thisarg, thisdict + + +def _totuple(x): + """Utility stuff to convert string, int, float, None or anything to a usable tuple.""" + + if isinstance(x, str): + out = x, + elif isinstance(x, (int, float)): + out = str(x), + elif x is None: + out = None, + else: + out = tuple(x) + + return out + + +def escape(text, newline=False): + """Escape special html characters.""" + + if isinstance(text, str): + if '&' in text: + text = text.replace('&', '&') + if '>' in text: + text = text.replace('>', '>') + if '<' in text: + text = text.replace('<', '<') + if '\"' in text: + text = text.replace('\"', '"') + if '\'' in text: + text = text.replace('\'', '"') + if newline: + if '\n' in text: + text = text.replace('\n', '
') + + return text + + +_escape = escape + + +def unescape(text): + """Inverse of escape.""" + + if isinstance(text, str): + if '&' in text: + text = text.replace('&', '&') + if '>' in text: + text = text.replace('>', '>') + if '<' in text: + text = text.replace('<', '<') + if '"' in text: + text = text.replace('"', '\"') + + return text + + +class dummy: + + """A dummy class for attaching attributes.""" + pass + +doctype = dummy() +doctype.frameset = "" +doctype.strict = "" +doctype.loose = "" + + +class russell: + + """A dummy class that contains anything.""" + + def __contains__(self, item): + return True + + +class MarkupError(Exception): + + """All our exceptions subclass this.""" + + def __str__(self): + return self.message + + +class ClosingError(MarkupError): + + def __init__(self, tag): + self.message = "The element '%s' does not accept non-keyword arguments (has no closing tag)." % tag + + +class OpeningError(MarkupError): + + def __init__(self, tag): + self.message = "The element '%s' can not be opened." % tag + + +class ArgumentError(MarkupError): + + def __init__(self, tag): + self.message = "The element '%s' was called with more than one non-keyword argument." % tag + + +class InvalidElementError(MarkupError): + + def __init__(self, tag, mode): + self.message = "The element '%s' is not valid for your mode '%s'." % ( + tag, + mode) + + +class DeprecationError(MarkupError): + + def __init__(self, tag): + self.message = "The element '%s' is deprecated, instantiate markup.page with mode='loose_html' to allow it." % tag + + +class ModeError(MarkupError): + + def __init__(self, mode): + self.message = "Mode '%s' is invalid, possible values: strict_html, loose_html, xml." % mode + + +class CustomizationError(MarkupError): + + def __init__(self): + self.message = "If you customize the allowed elements, you must define both types 'onetags' and 'twotags'." + + +if __name__ == '__main__': + print(__doc__) diff --git a/lib/port_scanner.py b/lib/port_scanner.py new file mode 100644 index 00000000..e69de29b diff --git a/lib/reportgraph.py b/lib/reportgraph.py new file mode 100644 index 00000000..5b83016f --- /dev/null +++ b/lib/reportgraph.py @@ -0,0 +1,96 @@ +from datetime import datetime +from lib import stash +import plotly +import plotly.graph_objs as go +import plotly.plotly as py + +try: + db = stash.stash_manager() + db.do_init() +except Exception: + pass + + class GraphGenerator: + + def __init__(self, domain): + self.domain = domain + self.bardata = [] + self.barcolumns = [] + self.scatterxdata = [] + self.scattercountemails = [] + self.scattercounthosts = [] + self.scattercountips = [] + self.scattercountshodans = [] + self.scattercountvhosts = [] + + def drawlatestscangraph(self, domain, latestscandata): + try: + self.barcolumns = ['email', 'host', 'ip', 'shodan', 'vhost'] + self.bardata.append(latestscandata['email']) + self.bardata.append(latestscandata['host']) + self.bardata.append(latestscandata['ip']) + self.bardata.append(latestscandata['shodan']) + self.bardata.append(latestscandata['vhost']) + layout = dict(title='Latest scan - number of targets identified for ' + domain, + xaxis=dict(title='Targets'), + yaxis=dict(title='Hits'),) + barchartcode = plotly.offline.plot({ + 'data': [go.Bar(x=self.barcolumns, y=self.bardata)], + 'layout': layout, + }, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div') + return barchartcode + except Exception as e: + print(f'Error generating HTML bar graph code for domain: {e}') + + def drawscattergraphscanhistory(self, domain, scanhistorydomain): + try: + scandata = scanhistorydomain + for i in scandata: + self.scatterxdata.append(datetime.date(datetime.strptime(i['date'], '%Y-%m-%d'))) + self.scattercountemails.append(int(i['email'])) + self.scattercounthosts.append(int(i['hosts'])) + self.scattercountips.append(int(i['ip'])) + self.scattercountshodans.append(int(i['shodan'])) + self.scattercountvhosts.append(int(i['vhost'])) + + trace0 = go.Scatter( + x=self.scatterxdata, + y=self.scattercounthosts, + mode='lines+markers', + name='hosts') + + trace1 = go.Scatter( + x=self.scatterxdata, + y=self.scattercountips, + mode='lines+markers', + name='IP address') + + trace2 = go.Scatter( + x=self.scatterxdata, + y=self.scattercountvhosts, + mode='lines+markers', + name='vhost') + + trace3 = go.Scatter( + x=self.scatterxdata, + y=self.scattercountshodans, + mode='lines+markers', + name='shodan') + + trace4 = go.Scatter( + x=self.scatterxdata, + y=self.scattercountemails, + mode='lines+markers', + name='email') + + data = [trace0, trace1, trace2, trace3, trace4] + layout = dict(title='Scanning history for ' + domain, xaxis=dict(title='Date'), yaxis=dict(title='Results')) + scatterchartcode = plotly.offline.plot({ + 'data': data, + 'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div') + return scatterchartcode + except Exception as e: + print(f'Error generating HTML for the historical graph for domain: {e}') + +except Exception as e: + print(f'Error in the reportgraph module: {e}') diff --git a/lib/resolvers.txt b/lib/resolvers.txt new file mode 100644 index 00000000..d50a913d --- /dev/null +++ b/lib/resolvers.txt @@ -0,0 +1,2016 @@ +1.0.0.1 +1.1.1.1 +141.1.27.249 +194.190.225.2 +194.225.16.5 +91.185.6.10 +194.2.0.50 +66.187.16.5 +83.222.161.130 +69.60.160.196 +194.150.118.3 +84.8.2.11 +195.175.39.40 +193.239.159.37 +205.152.6.20 +82.151.90.1 +144.76.202.253 +103.3.46.254 +5.144.17.119 +195.129.12.122 +211.35.96.6 +202.138.120.4 +209.130.139.2 +64.81.127.2 +202.199.160.206 +195.66.68.2 +103.3.76.7 +202.219.177.121 +216.143.135.12 +141.211.144.17 +101.203.168.123 +217.73.17.110 +205.242.187.234 +62.192.160.39 +187.115.52.101 +122.155.167.38 +203.229.169.69 +69.25.1.1 +121.52.87.38 +209.51.161.58 +80.72.146.2 +195.245.76.6 +149.156.64.210 +195.74.128.6 +81.15.197.10 +213.0.77.5 +212.89.130.180 +91.194.112.10 +203.146.237.222 +1.2.4.8 +200.118.2.88 +213.131.178.10 +203.63.8.27 +62.168.59.67 +200.175.3.232 +205.151.222.250 +213.115.244.69 +81.200.80.11 +195.206.7.98 +213.201.230.20 +63.146.122.11 +188.94.19.10 +114.114.114.119 +203.189.89.29 +190.9.57.2 +193.52.218.19 +62.183.50.230 +129.7.1.6 +202.248.37.74 +141.211.125.15 +91.195.202.131 +146.94.1.3 +35.8.2.41 +206.13.29.12 +63.218.44.186 +83.242.139.11 +217.117.111.1 +66.250.7.154 +213.157.176.3 +38.98.10.132 +84.21.31.230 +213.144.3.210 +89.140.140.8 +195.67.27.18 +200.62.64.1 +212.57.190.166 +82.115.163.2 +207.91.130.4 +213.235.248.245 +67.90.152.122 +79.140.66.38 +208.67.220.220 +195.189.131.1 +212.30.96.211 +202.14.67.4 +205.134.162.209 +213.169.55.10 +217.169.242.2 +212.24.98.97 +209.55.0.110 +15.227.128.50 +159.90.200.8 +216.244.192.3 +212.16.72.254 +195.54.152.2 +147.29.10.6 +69.67.254.2 +110.170.117.15 +217.76.240.2 +202.43.178.244 +101.255.64.74 +85.185.6.35 +72.37.141.91 +129.219.13.81 +204.95.160.2 +103.9.124.89 +210.248.255.82 +205.151.222.251 +212.214.82.198 +82.212.67.100 +108.61.213.134 +213.55.96.166 +121.194.2.2 +93.188.152.3 +198.6.1.3 +64.215.98.148 +193.252.247.52 +164.124.101.82 +82.182.37.49 +212.37.208.3 +213.184.242.6 +212.236.250.4 +193.89.221.2 +194.39.185.10 +70.36.0.5 +91.189.0.5 +217.71.105.254 +203.238.227.100 +203.109.129.68 +115.68.45.3 +193.109.4.5 +134.60.1.111 +78.143.192.10 +212.97.32.2 +212.57.190.166 +200.175.3.30 +193.27.80.34 +165.194.1.1 +194.25.0.60 +203.189.89.36 +216.66.22.2 +213.143.96.1 +213.184.0.42 +62.24.228.202 +91.214.72.34 +194.169.244.33 +192.116.16.26 +95.85.9.86 +91.188.0.5 +211.60.155.5 +209.145.176.20 +210.131.113.123 +217.113.48.1 +131.191.7.12 +64.105.163.106 +203.189.89.82 +69.7.192.2 +110.76.151.254 +212.9.160.1 +216.184.96.5 +61.63.0.66 +103.20.188.35 +195.234.101.234 +62.231.76.49 +208.72.120.204 +209.213.64.2 +213.211.50.2 +83.137.41.9 +195.113.144.194 +66.163.0.173 +109.69.8.34 +202.180.160.1 +216.81.128.132 +103.9.124.145 +92.43.224.1 +63.105.204.164 +212.96.1.70 +213.157.196.130 +81.173.113.30 +216.185.64.6 +212.26.6.11 +64.79.224.3 +62.243.190.9 +194.1.154.37 +193.186.162.3 +212.66.0.1 +195.175.39.39 +198.6.1.5 +62.77.85.100 +178.212.102.76 +217.151.0.50 +212.53.35.20 +101.255.64.62 +203.189.88.148 +213.157.0.193 +217.30.50.100 +178.151.86.169 +193.33.114.2 +193.228.86.5 +195.170.55.1 +148.160.20.195 +194.132.119.151 +64.181.43.34 +203.133.1.8 +83.233.78.163 +62.76.76.62 +64.105.202.138 +217.197.84.69 +212.34.194.211 +202.91.8.219 +122.0.0.13 +216.17.128.2 +195.166.192.1 +200.95.144.4 +202.116.128.1 +193.255.146.53 +202.65.159.4 +216.47.160.13 +117.102.224.26 +64.85.177.11 +168.88.66.6 +195.234.101.234 +83.177.163.51 +84.45.85.23 +101.255.64.114 +198.60.22.2 +66.165.173.235 +50.9.119.3 +195.177.240.3 +194.169.205.1 +151.236.6.156 +194.28.223.2 +195.158.239.4 +178.161.146.10 +64.94.1.33 +216.81.96.68 +63.251.161.33 +199.44.194.2 +159.90.200.7 +217.18.206.22 +101.255.64.227 +217.77.223.114 +122.155.167.8 +194.246.126.68 +93.91.146.150 +205.211.206.141 +82.99.212.18 +80.66.0.30 +212.37.208.4 +203.189.89.209 +209.252.33.101 +212.85.128.2 +196.29.40.3 +61.31.233.1 +213.157.0.194 +203.115.225.25 +195.140.236.250 +62.243.190.7 +193.232.69.22 +87.204.12.134 +209.183.48.21 +85.185.144.136 +206.126.32.101 +217.149.17.1 +111.223.252.193 +200.85.0.105 +194.145.147.195 +194.226.48.12 +216.186.27.15 +216.21.128.22 +77.241.112.23 +89.146.204.5 +207.190.94.129 +211.78.130.10 +210.23.64.1 +95.86.129.42 +200.85.44.70 +83.170.69.2 +193.231.173.2 +193.142.218.3 +157.157.90.193 +213.88.195.147 +83.97.97.3 +194.150.168.168 +212.42.165.37 +217.168.40.198 +66.216.18.222 +194.141.45.4 +198.82.247.34 +216.254.141.2 +213.241.193.250 +202.130.97.65 +193.33.236.1 +42.62.176.38 +195.186.4.110 +69.88.0.17 +69.26.129.2 +212.76.68.200 +210.23.129.34 +198.6.1.195 +202.203.192.33 +66.118.80.5 +213.233.161.69 +206.13.31.12 +84.241.98.36 +218.232.110.36 +67.17.215.132 +193.169.32.1 +78.38.253.138 +177.19.48.144 +188.114.194.2 +209.0.205.50 +139.130.4.4 +80.254.79.157 +202.46.1.2 +195.216.64.144 +201.163.145.101 +212.36.24.3 +210.29.96.33 +89.107.210.172 +194.113.160.68 +195.189.130.1 +213.178.66.111 +62.148.228.2 +216.47.160.12 +195.5.125.3 +186.107.119.118 +209.145.150.10 +209.195.95.95 +187.115.53.162 +62.243.190.8 +77.59.224.11 +91.189.0.2 +93.191.32.131 +62.3.32.17 +209.244.0.4 +212.31.253.69 +62.122.184.81 +213.144.108.117 +80.84.72.20 +208.112.89.187 +217.24.112.2 +206.51.143.55 +213.128.194.2 +212.118.241.1 +81.189.212.129 +81.222.80.2 +165.21.83.88 +87.105.250.3 +212.87.29.6 +68.179.203.94 +213.144.3.210 +180.211.129.42 +200.49.160.35 +38.119.98.220 +104.45.88.179 +219.96.224.90 +193.252.247.52 +82.145.163.1 +93.157.14.65 +212.181.124.8 +154.15.245.2 +200.35.174.126 +193.43.17.4 +204.174.120.45 +212.19.128.4 +203.130.2.3 +117.102.224.118 +213.152.142.12 +217.174.252.116 +202.43.176.14 +89.235.9.9 +194.20.0.24 +213.171.220.209 +203.130.2.4 +91.207.164.4 +84.200.69.80 +195.128.252.4 +119.160.208.252 +212.31.32.131 +204.119.0.2 +114.114.114.114 +62.58.3.11 +209.191.129.65 +202.141.224.34 +80.74.253.18 +212.18.15.3 +67.214.64.6 +193.43.108.3 +208.79.56.204 +208.70.22.22 +218.49.29.140 +195.189.72.2 +88.147.158.1 +66.9.182.1 +212.98.160.65 +213.88.151.150 +195.68.193.10 +203.112.2.5 +58.97.113.158 +203.119.36.106 +63.171.232.38 +194.52.202.98 +212.94.162.33 +195.137.189.203 +199.5.47.164 +114.114.115.115 +83.166.8.18 +202.14.67.14 +82.144.181.1 +195.149.104.186 +85.174.190.2 +212.58.111.1 +195.228.254.165 +205.152.37.23 +194.117.245.2 +91.98.110.15 +213.0.77.8 +212.122.224.10 +194.152.241.2 +85.158.50.50 +64.91.92.22 +202.43.178.245 +85.233.82.86 +210.44.112.66 +200.49.160.31 +217.8.180.98 +208.67.222.222 +217.159.0.17 +69.60.160.203 +207.241.160.34 +94.142.161.73 +151.164.1.8 +216.17.128.1 +217.15.17.2 +212.91.184.2 +63.251.161.1 +220.227.60.12 +202.120.111.3 +195.14.50.21 +209.87.64.70 +195.178.60.2 +41.211.233.10 +217.69.160.18 +217.64.163.1 +208.69.84.9 +81.17.66.14 +209.90.160.220 +200.175.3.68 +213.244.72.31 +95.128.246.2 +66.92.64.2 +217.22.209.254 +193.26.6.130 +200.66.96.1 +83.242.140.10 +153.19.1.254 +8.3.48.20 +152.99.78.136 +79.141.81.250 +206.165.6.11 +148.243.65.16 +213.159.193.54 +195.153.19.10 +8.8.4.4 +188.227.48.254 +80.79.179.2 +203.189.89.15 +203.90.78.65 +217.107.10.254 +218.49.29.141 +195.96.208.1 +207.248.224.71 +89.191.149.2 +213.151.109.1 +216.52.126.1 +212.66.129.98 +77.88.8.2 +8.8.8.8 +203.189.89.134 +61.199.193.162 +93.186.161.211 +83.143.8.220 +194.54.66.242 +82.202.131.1 +194.158.206.206 +62.16.86.100 +195.137.162.149 +193.89.221.124 +219.163.55.74 +62.37.228.20 +193.151.93.3 +193.22.119.195 +151.236.29.92 +217.30.49.100 +217.28.113.13 +78.159.224.224 +122.155.12.215 +212.66.1.1 +212.116.76.76 +64.13.115.12 +62.140.239.1 +82.96.193.12 +212.9.64.12 +213.183.57.55 +193.243.128.91 +212.51.17.1 +62.141.38.230 +206.248.95.194 +194.226.211.11 +74.82.46.6 +213.184.16.1 +216.66.80.98 +158.43.192.1 +195.244.25.3 +213.136.40.32 +217.28.98.62 +212.230.255.1 +213.135.67.1 +212.118.0.2 +141.211.125.17 +195.214.240.136 +202.83.20.101 +193.111.34.18 +217.149.155.180 +142.77.2.85 +130.180.228.2 +89.233.250.137 +106.51.255.133 +91.194.211.134 +195.42.215.17 +64.105.199.76 +202.91.8.234 +193.45.139.20 +213.128.216.115 +217.66.226.8 +211.67.112.1 +129.219.17.5 +217.72.1.2 +213.251.133.164 +202.30.143.11 +213.183.65.31 +208.3.14.1 +207.17.190.5 +94.25.63.2 +217.79.225.8 +83.234.220.253 +198.6.1.1 +87.204.12.130 +200.88.127.23 +81.209.202.46 +210.2.4.8 +195.35.110.4 +213.141.72.250 +24.154.1.5 +194.145.147.194 +95.215.150.15 +205.134.162.209 +83.170.64.2 +81.28.128.34 +202.86.8.100 +207.44.226.173 +89.248.162.3 +82.216.111.122 +187.115.52.91 +200.194.67.214 +203.109.129.67 +194.50.10.2 +88.82.105.19 +213.140.34.65 +200.123.192.244 +141.50.161.12 +217.31.160.30 +192.190.173.40 +82.96.81.10 +37.235.1.174 +187.115.52.78 +207.17.190.7 +209.172.128.2 +219.252.48.67 +62.149.132.2 +91.203.188.1 +82.209.190.82 +194.8.53.1 +198.6.1.4 +200.175.3.69 +212.40.5.51 +195.26.96.2 +203.115.81.38 +8.3.48.30 +194.158.206.205 +212.87.132.53 +194.169.244.34 +63.251.129.33 +69.16.169.11 +31.47.189.170 +190.11.32.42 +202.130.97.65 +203.189.88.211 +193.226.61.1 +204.117.214.10 +83.69.77.2 +81.199.3.7 +35.8.2.45 +84.55.62.75 +213.158.72.1 +94.247.200.3 +210.94.0.7 +89.160.27.232 +120.50.44.141 +201.217.16.89 +196.41.225.11 +62.196.2.70 +203.253.64.1 +148.233.151.8 +194.141.44.130 +62.8.96.38 +202.51.96.5 +46.246.94.136 +91.194.178.5 +212.112.39.25 +203.210.142.132 +213.73.14.227 +209.130.136.2 +149.250.222.22 +212.69.161.100 +91.202.12.10 +213.129.120.3 +88.80.64.200 +220.233.0.1 +216.184.96.6 +212.15.128.1 +211.41.128.71 +194.14.0.6 +212.94.34.34 +216.229.0.25 +216.143.135.11 +216.143.135.12 +203.189.89.1 +195.161.115.3 +195.166.192.8 +8.15.12.5 +202.62.124.238 +212.40.5.50 +216.254.95.2 +62.58.3.11 +217.219.236.8 +80.190.248.146 +89.186.66.6 +194.54.128.232 +194.145.240.6 +62.149.33.134 +69.28.148.102 +79.141.83.250 +203.41.44.20 +208.38.1.15 +82.76.253.115 +91.196.8.2 +205.152.144.23 +200.9.115.2 +62.33.47.253 +188.114.193.254 +202.248.0.34 +91.207.40.2 +210.131.113.123 +202.73.36.135 +142.47.133.81 +204.116.57.2 +185.46.7.100 +217.115.16.2 +66.92.159.2 +217.31.204.130 +185.16.40.143 +220.128.173.228 +212.51.17.1 +81.23.144.250 +193.28.97.130 +89.107.16.2 +88.82.84.129 +91.98.132.60 +194.169.239.10 +42.62.178.65 +199.166.6.2 +62.3.32.16 +193.33.200.22 +90.189.109.2 +213.33.82.1 +199.103.16.5 +141.85.128.1 +209.216.160.2 +110.76.151.1 +193.230.161.4 +213.253.137.17 +222.124.249.115 +81.24.128.146 +194.18.231.5 +5.144.19.8 +62.20.17.205 +194.98.65.165 +194.102.106.1 +4.2.2.6 +101.255.64.134 +158.43.128.1 +212.58.3.2 +89.233.43.71 +193.16.209.2 +77.88.8.8 +62.73.100.4 +81.189.214.162 +158.43.128.72 +115.68.100.103 +69.146.17.3 +200.85.39.206 +64.91.92.21 +200.40.230.36 +90.183.74.1 +84.1.240.34 +83.243.39.61 +202.248.20.133 +81.27.135.50 +195.84.194.3 +195.182.110.132 +203.189.88.213 +80.190.200.10 +207.178.128.21 +212.94.162.33 +195.170.97.254 +77.247.176.114 +82.145.160.140 +152.99.1.10 +212.192.128.3 +142.77.2.36 +42.62.176.30 +195.225.36.16 +84.241.100.31 +217.78.80.74 +166.70.25.18 +216.21.129.22 +205.171.2.65 +195.46.48.22 +147.235.250.2 +130.85.1.3 +91.203.177.4 +178.151.86.169 +201.217.19.225 +204.119.0.2 +88.255.242.6 +91.135.110.132 +190.22.34.170 +213.244.5.67 +117.102.224.154 +91.149.108.10 +194.246.127.11 +194.67.74.2 +64.119.60.9 +216.184.96.4 +216.52.169.1 +83.136.56.52 +194.239.164.25 +216.116.96.3 +84.32.80.20 +216.66.38.58 +206.253.194.65 +61.31.1.1 +217.21.96.1 +91.198.154.133 +212.5.218.3 +78.31.96.2 +194.225.128.22 +76.73.18.50 +129.250.35.251 +161.53.128.16 +203.189.88.54 +89.208.10.10 +87.104.254.39 +66.250.192.11 +218.223.32.1 +213.178.66.2 +82.199.102.38 +193.22.110.251 +212.19.149.226 +213.144.108.117 +199.249.18.1 +69.67.97.18 +8.2.208.2 +212.96.130.140 +217.199.217.200 +195.67.127.137 +212.203.33.12 +64.91.3.46 +213.178.0.33 +121.52.87.56 +216.116.96.2 +212.59.199.6 +216.185.192.1 +110.76.151.241 +203.156.104.21 +61.56.211.185 +194.72.9.61 +209.0.205.11 +93.158.117.138 +84.200.70.40 +101.255.64.154 +212.85.112.32 +211.78.130.11 +81.23.144.250 +84.237.112.3 +83.137.193.83 +193.111.200.191 +207.230.202.28 +80.94.48.254 +66.242.160.5 +79.137.227.122 +217.116.53.13 +200.58.161.25 +66.203.72.10 +212.51.16.1 +93.88.151.138 +200.12.63.10 +203.242.200.15 +203.189.88.152 +64.132.61.131 +81.92.96.22 +139.134.5.51 +89.223.7.242 +95.158.129.2 +62.133.163.171 +202.44.55.193 +91.144.248.227 +81.17.72.70 +193.110.157.2 +203.189.88.54 +193.230.161.3 +64.72.224.34 +85.115.224.18 +193.77.33.18 +203.189.88.214 +212.214.82.194 +216.66.80.30 +194.120.55.3 +81.199.48.244 +212.66.1.1 +83.97.97.2 +202.180.64.2 +67.214.159.198 +213.157.0.194 +77.241.24.5 +195.190.17.6 +217.77.176.10 +72.11.150.74 +66.252.170.3 +94.155.91.8 +200.175.3.59 +194.12.224.34 +213.147.64.1 +84.241.98.37 +207.178.128.20 +202.180.64.9 +187.73.241.67 +195.67.15.102 +78.133.155.218 +194.183.88.41 +212.9.160.1 +208.48.253.106 +193.242.114.129 +85.219.142.1 +101.255.64.42 +82.96.86.20 +200.62.64.65 +220.68.64.1 +216.52.254.33 +66.81.0.252 +193.151.32.40 +63.251.62.1 +203.133.1.7 +202.148.202.4 +193.95.93.243 +212.82.226.212 +212.58.3.7 +62.20.57.226 +216.58.97.20 +170.56.58.53 +193.201.185.3 +62.177.42.174 +212.69.161.100 +64.212.106.85 +83.243.39.59 +62.233.128.17 +204.52.135.2 +217.78.80.70 +213.164.38.66 +62.129.252.215 +50.116.23.211 +80.94.32.240 +200.85.35.158 +200.175.3.58 +129.250.35.250 +91.220.187.3 +202.136.162.11 +115.85.69.162 +212.11.191.72 +213.172.33.34 +213.30.253.65 +202.148.202.3 +213.27.209.8 +198.6.1.2 +160.44.1.4 +216.237.221.42 +194.88.202.11 +212.19.96.2 +212.233.128.1 +141.211.144.15 +93.99.200.1 +62.20.76.35 +201.217.17.74 +101.255.64.90 +80.64.32.2 +114.130.11.66 +122.255.96.132 +203.119.8.106 +69.7.192.1 +216.52.129.1 +194.6.216.5 +203.250.129.214 +103.9.124.154 +193.231.80.7 +85.249.45.253 +208.122.23.23 +210.80.58.66 +196.207.15.42 +217.69.169.25 +200.113.185.227 +63.238.52.1 +64.119.80.100 +204.9.123.122 +206.124.64.1 +193.232.65.2 +193.111.238.5 +209.161.175.30 +166.102.165.32 +212.94.32.32 +129.7.1.1 +160.220.137.2 +95.173.193.3 +139.0.27.186 +66.119.93.10 +103.22.248.62 +206.248.79.244 +121.52.87.128 +91.143.20.6 +82.99.211.195 +66.92.224.2 +193.254.232.1 +216.131.95.20 +115.85.69.162 +83.143.154.234 +206.124.1.254 +101.255.64.241 +207.164.234.193 +222.124.8.50 +147.29.37.19 +199.2.252.10 +194.152.248.42 +83.69.77.6 +174.34.129.34 +207.130.95.40 +193.175.51.10 +87.197.40.58 +193.6.10.1 +209.63.0.18 +212.50.131.153 +80.94.52.254 +62.95.15.107 +80.78.162.2 +67.17.215.133 +213.139.190.3 +213.129.120.6 +217.168.144.127 +66.51.206.100 +193.200.68.230 +217.196.1.5 +212.71.98.250 +64.13.48.12 +170.51.255.100 +194.242.50.66 +216.235.1.3 +173.44.32.2 +128.199.248.105 +195.167.98.3 +119.252.20.75 +212.111.28.5 +217.21.48.1 +62.91.2.20 +206.74.254.2 +81.199.3.7 +165.87.13.129 +194.8.53.1 +64.140.243.112 +147.235.251.3 +212.82.225.7 +187.115.52.83 +101.255.64.150 +216.254.141.13 +213.27.209.53 +79.141.82.250 +194.213.193.5 +148.233.151.6 +200.85.60.210 +193.231.236.25 +62.177.42.174 +190.11.32.199 +207.179.3.25 +202.130.97.66 +199.101.98.178 +91.185.2.10 +217.18.90.105 +195.182.224.11 +69.28.97.4 +209.97.224.3 +94.124.19.16 +194.169.235.2 +87.229.99.1 +88.80.64.201 +62.181.119.131 +147.29.10.55 +194.73.96.50 +84.32.80.20 +216.146.35.230 +190.146.118.41 +110.76.151.17 +58.96.3.34 +193.16.255.2 +61.19.252.238 +208.92.9.21 +85.88.19.11 +83.241.175.98 +203.146.237.237 +64.91.89.2 +194.141.12.1 +194.54.181.90 +193.41.252.146 +201.131.4.9 +62.33.183.254 +119.160.208.251 +217.18.80.105 +202.86.216.1 +62.109.182.2 +64.105.189.26 +72.52.104.74 +81.92.97.12 +87.255.68.242 +134.48.1.32 +216.218.226.238 +85.214.132.203 +62.97.84.4 +210.220.163.82 +103.239.165.34 +213.218.117.85 +203.248.252.2 +65.183.98.90 +168.95.1.1 +209.213.223.18 +200.88.127.22 +217.32.105.66 +62.20.15.234 +149.211.153.51 +193.111.144.145 +203.89.226.26 +203.80.96.10 +193.78.240.12 +109.69.8.51 +78.142.133.43 +212.94.162.1 +77.240.144.164 +213.234.128.211 +91.209.108.17 +64.207.64.5 +213.137.73.254 +205.172.19.79 +83.219.241.2 +88.82.105.18 +209.55.1.220 +193.58.251.251 +206.253.33.130 +141.56.31.3 +161.53.129.139 +158.39.46.248 +122.210.229.161 +203.253.31.1 +195.60.70.5 +202.38.128.58 +62.134.11.4 +207.178.128.21 +195.166.13.4 +192.43.161.22 +200.69.193.2 +203.153.214.14 +81.24.128.146 +208.78.24.238 +211.172.241.54 +185.46.7.110 +198.188.2.69 +66.93.87.2 +194.33.15.3 +193.34.129.253 +91.212.56.5 +81.90.168.3 +216.198.139.68 +193.231.249.1 +195.70.237.42 +65.74.130.6 +91.210.24.22 +65.163.107.11 +202.181.224.2 +195.70.248.1 +208.122.23.22 +210.227.119.194 +79.99.224.24 +168.243.165.225 +202.83.30.5 +212.24.98.98 +194.176.190.2 +77.59.224.10 +80.190.200.55 +91.135.230.231 +212.209.194.170 +65.220.16.14 +66.207.160.111 +66.28.0.45 +216.185.192.2 +216.54.201.11 +68.179.203.94 +216.52.94.1 +193.33.220.3 +194.145.198.226 +212.14.253.242 +62.108.161.200 +66.81.1.252 +217.65.192.1 +122.155.167.70 +195.170.96.2 +198.6.1.146 +168.213.3.10 +64.85.177.10 +66.165.177.69 +85.94.224.1 +193.111.144.161 +64.61.99.2 +85.235.199.199 +193.33.174.3 +149.156.64.210 +115.68.62.222 +119.160.208.252 +216.58.97.21 +194.158.230.53 +202.138.120.6 +218.192.240.2 +152.99.200.6 +202.152.162.66 +173.241.133.178 +194.132.32.32 +193.231.238.1 +195.182.192.10 +212.66.160.2 +89.255.99.131 +212.85.128.2 +65.74.130.5 +63.251.62.33 +200.56.224.11 +103.3.76.82 +212.108.200.77 +194.250.223.1 +194.172.160.4 +195.140.236.253 +209.142.182.250 +106.186.17.181 +58.150.55.34 +103.9.124.154 +206.123.64.245 +87.104.254.135 +64.13.131.34 +148.243.65.17 +103.226.55.129 +81.180.201.99 +50.21.174.18 +216.175.203.51 +66.163.0.161 +66.146.0.1 +216.162.32.20 +89.208.120.10 +202.43.176.13 +77.241.25.3 +212.40.0.10 +206.53.177.3 +75.94.255.12 +93.90.82.50 +64.187.29.134 +217.144.144.211 +195.46.48.21 +4.2.2.1 +62.165.33.250 +212.87.130.92 +205.151.69.200 +198.6.1.142 +66.63.192.2 +82.198.129.146 +209.142.152.253 +103.9.124.90 +213.211.50.1 +212.31.32.130 +64.105.179.138 +190.248.153.98 +94.247.200.3 +206.13.30.12 +92.42.200.66 +212.73.65.40 +64.135.2.250 +69.28.97.4 +195.110.17.40 +158.43.240.3 +82.96.40.83 +164.2.255.241 +206.124.0.254 +216.52.94.33 +200.221.11.101 +216.52.161.33 +198.100.146.51 +203.189.88.133 +193.7.169.9 +212.118.241.33 +200.175.0.91 +164.33.1.4 +89.160.63.190 +212.41.4.1 +198.6.1.122 +65.39.139.53 +64.254.99.13 +64.132.94.250 +195.182.192.2 +81.7.200.80 +202.45.84.59 +212.118.241.33 +91.206.72.2 +206.252.187.110 +164.124.101.51 +38.112.17.138 +195.24.228.3 +195.221.20.10 +87.204.28.12 +217.198.161.1 +146.185.134.104 +193.142.115.131 +203.99.253.1 +81.18.242.100 +66.165.164.250 +103.3.213.210 +80.67.169.12 +193.17.213.10 +159.230.4.130 +203.189.88.156 +199.80.64.202 +212.230.255.129 +194.102.93.2 +93.88.148.138 +201.217.18.178 +77.109.138.45 +41.221.5.11 +203.189.88.212 +216.66.80.26 +12.127.16.67 +202.44.204.63 +203.189.88.11 +218.44.242.98 +85.94.224.2 +193.231.112.1 +195.110.16.40 +77.87.152.9 +94.155.90.7 +193.89.248.1 +207.91.5.32 +149.6.140.30 +208.66.232.66 +91.206.213.2 +213.157.176.2 +62.105.17.252 +213.23.108.129 +205.162.201.2 +193.28.100.200 +203.193.139.150 +212.102.225.2 +220.233.0.3 +217.117.0.38 +194.6.240.1 +173.241.133.189 +193.205.136.1 +4.2.2.4 +212.245.158.66 +193.16.48.66 +193.201.185.2 +212.1.118.3 +82.198.129.138 +193.239.60.19 +212.53.34.1 +209.87.79.232 +213.88.195.146 +216.52.41.1 +78.159.232.232 +89.255.96.3 +195.251.119.23 +82.199.32.36 +165.166.142.42 +38.112.17.142 +62.91.2.20 +142.46.1.130 +81.12.49.100 +4.79.132.219 +91.197.164.11 +79.132.192.2 +203.189.88.11 +203.115.130.74 +202.62.224.2 +217.18.206.12 +206.124.64.253 +195.198.214.72 +69.28.239.8 +84.32.112.202 +83.166.8.18 +195.153.19.5 +203.189.89.241 +85.172.0.250 +77.239.96.2 +59.12.239.70 +203.189.89.131 +212.84.181.99 +82.96.65.2 +216.52.190.33 +202.174.131.19 +213.157.196.132 +37.221.170.105 +190.249.175.122 +64.79.224.27 +83.240.154.200 +216.147.131.34 +200.85.61.90 +216.106.184.6 +204.97.212.10 +194.146.136.1 +194.145.198.6 +81.180.206.137 +218.102.23.228 +194.158.230.54 +85.132.32.41 +212.28.34.90 +101.255.64.82 +67.214.64.27 +211.172.208.2 +81.92.226.181 +210.34.0.18 +163.152.1.1 +91.200.113.1 +195.177.223.3 +217.170.1.1 +77.88.8.88 +62.77.85.98 +67.100.88.27 +103.20.188.83 +198.6.1.6 +213.172.33.35 +206.80.254.4 +193.226.128.129 +62.108.161.161 +217.196.1.6 +66.112.235.200 +194.105.32.2 +122.155.13.155 +83.228.65.52 +66.118.80.4 +209.142.136.85 +74.222.30.2 +193.34.129.253 +168.243.165.226 +164.115.2.132 +80.80.111.254 +195.198.127.20 +188.34.0.4 +62.119.70.3 +194.242.50.65 +195.88.84.100 +217.65.100.7 +193.252.247.53 +82.96.193.10 +195.234.230.67 +218.232.110.37 +213.73.91.35 +119.18.159.222 +200.57.7.61 +64.105.199.74 +216.81.128.132 +195.206.96.47 +213.33.82.2 +93.188.152.3 +89.249.224.1 +195.66.89.4 +216.138.119.6 +89.19.193.1 +200.221.11.100 +91.188.0.35 +202.86.216.2 +199.249.19.2 +194.25.15.11 +204.101.45.5 +217.72.168.34 +78.47.34.12 +83.142.192.2 +193.204.192.2 +195.128.252.7 +195.12.4.247 +61.208.115.242 +194.187.164.20 +101.255.64.138 +91.98.128.112 +122.155.12.91 +212.49.128.65 +42.62.176.150 +213.88.195.148 +194.164.181.2 +193.95.93.77 +190.186.50.31 +142.46.128.130 +69.28.136.102 +194.113.160.68 +195.112.96.34 +203.153.214.26 +194.45.12.2 +101.255.64.58 +194.88.203.6 +212.5.220.252 +62.56.230.100 +194.237.202.250 +210.34.48.34 +195.20.193.11 +213.157.196.131 +203.198.7.66 +202.138.120.87 +62.22.102.5 +221.139.13.130 +69.25.1.33 +195.186.1.110 +212.233.128.2 +93.91.224.2 +80.149.86.20 +37.235.1.177 +194.2.0.20 +195.66.68.2 +209.68.1.11 +91.203.188.1 +216.54.2.11 +207.91.250.34 +203.189.89.65 +203.153.214.14 +80.88.171.16 +208.90.237.9 +216.81.96.67 +89.107.129.15 +194.1.148.1 +209.197.128.2 +77.246.144.5 +211.78.130.11 +192.43.161.22 +83.243.39.59 +62.40.32.34 +195.16.73.1 +166.70.25.18 +213.157.0.193 +62.77.94.72 +77.41.229.2 +203.112.2.4 +62.94.0.41 +81.21.112.130 +88.131.89.37 +62.36.225.150 +207.248.224.72 +200.95.144.3 +62.149.128.2 +216.218.221.6 +64.94.33.33 +101.203.168.123 +212.58.3.8 +81.200.5.165 +212.15.86.12 +115.68.45.3 +103.3.46.105 +216.147.131.33 +203.124.230.100 +61.8.0.113 +195.129.12.114 +205.236.148.130 +209.51.161.14 +12.127.17.72 +203.189.89.210 +164.115.2.132 +209.142.152.254 +194.102.44.130 +94.199.201.199 +217.115.16.3 +77.109.139.29 +202.43.160.50 +90.183.74.2 +164.124.101.47 +88.255.96.196 +203.112.194.243 +86.59.41.180 +82.141.136.2 +194.67.74.3 +115.68.62.210 +203.189.89.117 +91.192.56.2 +193.102.59.190 +216.136.95.2 +89.207.72.138 +208.196.63.2 +111.223.252.161 +193.16.208.114 +203.2.193.67 +207.230.192.254 +160.7.240.20 +195.22.192.252 +83.137.41.8 +194.187.148.1 +72.11.150.10 +60.32.112.42 +216.52.41.33 +212.54.160.7 +193.41.10.1 +202.125.132.154 +65.107.59.67 +194.73.96.62 +203.196.0.6 +69.28.104.5 +207.15.68.36 +66.80.130.18 +122.155.3.119 +209.244.0.53 +212.230.255.129 +212.41.3.147 +165.194.1.1 +216.37.1.19 +122.155.12.41 +213.253.136.17 +80.66.1.42 +195.186.1.111 +69.54.70.15 +198.32.2.10 +212.38.95.254 +187.110.170.74 +217.77.176.11 +201.131.4.5 +193.43.108.62 +211.61.13.227 +194.116.170.66 +5.144.12.202 +194.30.163.5 +213.178.66.112 +195.137.246.17 +78.143.192.20 +207.164.234.129 +95.215.149.5 +94.236.199.8 +82.209.213.60 +61.60.224.5 +94.23.222.19 +206.253.33.131 +211.61.13.126 +202.133.99.11 +213.253.193.2 +194.149.156.140 +193.78.240.12 +58.68.121.230 +210.180.98.69 +216.52.65.1 +216.27.175.2 +193.230.230.1 +211.41.128.70 +211.78.130.10 +62.37.225.56 +62.165.32.250 +211.161.46.84 +83.143.12.246 +220.110.92.202 +4.2.2.2 +209.216.160.131 +193.138.78.117 +209.143.22.182 +203.89.226.24 +217.29.16.250 +66.182.208.5 +201.217.51.45 +217.173.198.3 +147.29.37.20 +69.24.112.10 +88.82.84.129 +195.243.214.4 +195.54.152.3 +193.171.4.60 +81.20.240.34 +69.24.112.11 +93.88.16.66 +221.186.85.74 +80.254.77.39 +193.228.86.5 +194.25.0.52 +91.98.234.4 +89.187.240.60 +129.219.17.200 +194.77.8.1 +62.122.208.68 +74.84.4.139 +160.220.137.2 +203.189.88.151 +193.231.236.30 +63.238.52.2 +87.250.77.204 +91.98.30.222 +69.67.97.18 +168.215.165.186 +205.152.132.23 +119.252.20.75 +208.59.89.20 +208.54.220.20 +66.7.160.122 +61.63.0.66 +64.94.1.1 +85.114.105.3 +146.66.19.238 +217.77.223.114 +200.53.250.1 +66.232.139.10 +193.86.86.2 +121.52.206.130 +216.52.254.1 +115.68.100.102 +70.36.0.6 +212.65.160.43 +193.42.81.68 +212.112.39.22 +87.230.13.136 +194.126.181.47 +64.212.106.84 +193.47.72.17 +24.248.137.39 +83.149.244.194 +91.214.72.33 +111.223.252.225 +89.107.210.171 +141.1.1.1 +62.33.203.33 +194.218.25.250 +80.73.1.1 +23.226.230.72 +195.178.123.130 +165.194.128.1 +213.128.194.2 +95.158.128.2 +212.203.32.11 +208.71.147.74 +69.28.239.9 +210.80.58.3 +203.77.161.12 +202.28.162.1 +62.128.1.42 +46.163.72.207 +67.214.159.199 +202.62.31.18 +207.248.57.10 +24.154.1.4 +65.210.29.34 +192.76.144.66 +217.64.167.1 +14.139.223.100 +41.221.6.38 +66.218.245.13 +192.172.250.8 +194.44.211.194 +195.251.123.232 +213.0.76.5 +117.102.224.230 +212.4.96.22 +89.187.240.59 +64.135.1.20 +189.90.16.20 +201.161.6.46 +42.62.176.74 +203.242.200.5 +64.81.159.2 +208.67.220.222 +195.186.4.111 +80.94.32.240 +213.8.145.133 +194.187.100.2 +212.9.161.2 +194.126.130.6 +209.161.175.29 +66.203.66.203 +158.43.240.4 +91.239.100.100 +202.0.107.125 +211.78.130.3 +216.52.97.33 +212.67.131.4 +211.175.82.66 +203.124.230.21 +80.64.32.2 +193.230.183.201 +217.151.0.195 +208.67.222.220 +124.107.135.126 +103.20.188.82 +61.19.130.42 +64.119.60.5 +149.250.222.21 +195.69.65.98 +210.104.1.3 +213.235.248.228 +194.153.232.17 +164.124.101.2 +194.149.146.2 +83.143.12.249 +66.119.93.4 +62.37.225.57 +217.20.96.100 +91.211.16.6 +122.0.0.12 +64.91.3.60 +81.25.152.2 +205.236.148.131 +142.103.1.1 +193.178.124.1 +168.215.210.50 +80.74.160.11 +211.237.65.31 +173.241.133.190 +219.250.36.130 +203.189.88.10 +211.237.65.21 +216.131.94.5 +216.52.1.1 +103.20.184.62 +83.142.9.30 +195.145.22.37 +207.15.68.164 +200.57.2.108 +216.52.1.33 +217.27.240.20 +216.194.28.33 +213.241.193.250 +77.72.17.17 +220.233.0.4 +205.172.19.193 +85.119.72.2 +217.107.11.35 +195.114.173.153 +121.152.231.196 +194.149.133.11 +62.29.160.228 +206.80.254.68 +216.181.31.11 +208.86.117.40 +211.63.64.11 +202.180.64.9 +195.66.156.26 +189.38.95.96 +62.231.100.14 +208.48.253.106 +81.180.201.98 +219.252.2.100 +217.14.128.50 +212.216.172.222 +195.149.138.3 +193.58.204.59 +213.235.248.228 +213.16.104.61 +195.27.1.1 +50.116.28.138 +211.115.194.2 +217.144.6.6 +194.54.148.129 +212.85.32.3 +164.124.107.9 +61.70.87.96 +203.176.144.20 +168.213.3.11 +206.104.144.62 +85.88.19.10 +212.59.199.2 +111.223.252.27 +194.105.156.2 +81.90.168.3 +193.46.84.2 +207.15.68.36 +195.146.81.130 +82.216.111.121 +151.11.85.5 +217.20.82.4 +216.22.81.60 +62.94.0.42 +208.116.30.21 +94.247.200.2 +203.239.131.1 +211.115.194.3 +83.228.65.52 +193.95.93.77 +216.106.1.2 +72.52.104.74 +212.110.122.132 +64.105.97.90 +62.133.163.171 +204.9.122.102 +66.165.183.87 +194.20.8.1 +193.15.251.65 +62.128.1.53 +193.148.29.100 +212.85.32.2 +203.124.250.70 +72.46.0.2 +209.142.136.220 +193.148.29.103 +203.115.71.66 +217.156.106.1 +114.114.115.119 +213.159.0.55 +212.62.98.10 +193.7.168.1 +209.206.136.8 +217.148.122.40 +66.9.5.15 +42.62.176.125 +193.111.212.5 +196.29.40.4 +67.214.64.7 +63.171.232.39 +63.105.204.164 +212.73.209.34 +88.216.8.69 +80.78.208.2 +85.249.40.8 +203.113.11.37 +62.233.181.26 +187.115.53.163 +193.41.59.151 +202.62.120.4 +203.189.88.154 +139.175.55.244 +193.34.170.162 +210.204.251.22 +85.124.252.33 +213.158.72.44 +218.248.240.23 +89.186.66.7 +77.72.192.3 +77.73.104.3 +193.226.145.2 +64.56.129.2 +194.95.141.1 +77.72.178.77 +80.92.178.98 +63.246.63.142 +64.135.1.22 +213.211.50.2 +49.0.124.46 +213.27.209.55 +82.115.23.3 +216.52.65.33 +87.241.63.4 +178.254.21.113 +69.51.76.26 +195.138.160.3 +46.246.46.246 +81.27.133.50 +61.72.225.1 +65.203.109.2 +203.153.41.28 +194.183.88.40 +85.132.32.42 +192.121.170.170 +209.251.33.2 +74.207.242.213 +194.126.159.20 +193.189.114.254 +194.250.223.2 +103.20.188.82 +89.185.75.244 +213.133.224.2 +213.159.0.70 +190.41.153.24 +212.214.229.170 +66.218.44.5 +195.7.64.3 +195.18.161.132 +207.249.163.155 +203.176.144.12 +216.244.192.32 +213.146.65.11 +83.151.112.193 +66.92.64.2 +93.157.233.3 +77.88.8.1 +195.67.15.73 +121.52.87.65 +194.20.8.4 +217.20.240.5 +82.212.67.101 +203.189.89.210 +217.24.113.214 +193.254.22.13 +62.129.252.252 +76.10.192.201 +193.101.111.10 +62.192.128.60 +193.43.181.62 +194.242.50.65 +64.105.172.26 +193.109.53.2 +37.19.5.135 +94.153.224.74 +91.199.139.1 +101.255.64.86 +165.87.201.244 +217.159.1.126 +62.116.30.200 +195.129.12.83 +221.151.200.206 +119.252.167.229 +168.126.63.1 +200.85.61.90 +117.102.224.190 +195.67.160.3 +212.73.154.2 +131.155.140.130 +216.218.221.6 +208.38.1.15 +66.28.0.45 +212.9.64.11 +63.251.129.33 +35.8.98.43 +221.156.218.31 +94.155.91.4 +203.113.25.71 +211.61.13.227 +195.13.38.3 +80.78.66.66 +193.22.119.22 +194.42.108.135 +193.67.79.39 +62.72.87.4 +80.93.177.182 +206.13.28.12 +8.5.244.5 +209.183.52.21 +35.8.2.42 +81.18.97.50 +178.212.102.76 +213.239.204.35 +212.98.160.50 +194.126.130.7 +200.123.192.251 +87.103.133.167 +196.2.45.101 +212.24.97.97 +173.241.133.172 +212.211.132.4 +85.119.74.2 +101.255.64.210 +64.91.92.21 +85.119.136.158 +212.96.128.140 +207.230.202.29 +193.2.64.45 +187.115.52.142 +137.82.1.1 +101.255.64.34 +194.1.185.122 +194.179.109.10 +217.28.96.190 +217.17.34.68 +87.106.220.85 +12.173.168.201 +217.198.160.130 +194.179.1.100 +89.140.186.3 +195.99.66.220 +165.21.100.88 +149.211.153.50 +81.189.121.68 +209.142.152.253 +195.2.195.1 +203.229.169.1 +66.28.0.61 +69.16.170.11 +81.95.128.218 +209.143.0.10 +193.27.192.98 +194.75.147.212 +217.148.0.17 +81.196.170.20 +168.188.1.1 \ No newline at end of file diff --git a/lib/stash.py b/lib/stash.py new file mode 100644 index 00000000..2bf751c4 --- /dev/null +++ b/lib/stash.py @@ -0,0 +1,291 @@ +import datetime +import sqlite3 + + +class stash_manager: + + def __init__(self): + self.db = "stash.sqlite" + self.results = "" + self.totalresults = "" + self.latestscandomain = {} + self.domainscanhistory = [] + #self.scanboarddata = [] + self.scanboarddata = {} + self.scanstats = [] + self.latestscanresults = [] + self.previousscanresults = [] + + def do_init(self): + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('CREATE TABLE results (domain text, resource text, type text, find_date date, source text)') + conn.commit() + conn.close() + return + + def store(self, domain, resource, res_type, source): + self.domain = domain + self.resource = resource + self.type = res_type + self.source = source + self.date = datetime.date.today() + try: + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('INSERT INTO results (domain,resource, type, find_date, source) VALUES (?,?,?,?,?)', + (self.domain, self.resource, self.type, self.date, self.source)) + conn.commit() + conn.close() + except Exception as e: + print(e) + return + + def store_all(self, domain, all, res_type, source): + self.domain = domain + self.all = all + self.type = res_type + self.source = source + self.date = datetime.date.today() + for x in self.all: + try: + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('INSERT INTO results (domain,resource, type, find_date, source) VALUES (?,?,?,?,?)', + (self.domain, x, self.type, self.date, self.source)) + conn.commit() + conn.close() + except Exception as e: + print(e) + return + + def generatedashboardcode(self, domain): + try: + self.latestscandomain["domain"] = domain + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host"''', (domain,)) + data = c.fetchone() + self.latestscandomain["host"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email"''', (domain,)) + data = c.fetchone() + self.latestscandomain["email"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip"''', (domain,)) + data = c.fetchone() + self.latestscandomain["ip"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost"''', (domain,)) + data = c.fetchone() + self.latestscandomain["vhost"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan"''', (domain,)) + data = c.fetchone() + self.latestscandomain["shodan"] = data[0] + c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) + data = c.fetchone() + self.latestscandomain["latestdate"] = data[0] + latestdate = data[0] + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="host"''', (domain, latestdate,)) + scandetailshost = c.fetchall() + self.latestscandomain["scandetailshost"] = scandetailshost + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="email"''', + (domain, latestdate,)) + scandetailsemail = c.fetchall() + self.latestscandomain["scandetailsemail"] = scandetailsemail + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="ip"''', (domain, latestdate,)) + scandetailsip = c.fetchall() + self.latestscandomain["scandetailsip"] = scandetailsip + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="vhost"''', + (domain, latestdate,)) + scandetailsvhost = c.fetchall() + self.latestscandomain["scandetailsvhost"] = scandetailsvhost + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="shodan"''', + (domain, latestdate,)) + scandetailsshodan = c.fetchall() + self.latestscandomain["scandetailsshodan"] = scandetailsshodan + return self.latestscandomain + except Exception as e: + print(e) + finally: + conn.close() + + def getlatestscanresults(self, domain, previousday=False): + try: + conn = sqlite3.connect(self.db) + if previousday: + try: + c = conn.cursor() + c.execute(''' + SELECT DISTINCT(find_date) + FROM results + WHERE find_date=date('now', '-1 day') and domain=?''', (domain,)) + previousscandate = c.fetchone() + if not previousscandate: # When theHarvester runs first time/day this query will return. + self.previousscanresults = ["No results", "No results", "No results", "No results", "No results"] + else: + c = conn.cursor() + c.execute(''' + SELECT find_date, domain, source, type, resource + FROM results + WHERE find_date=? and domain=? + ORDER BY source,type + ''', (previousscandate[0], domain,)) + results = c.fetchall() + self.previousscanresults = results + return self.previousscanresults + except Exception as e: + print('Error in getting the previous scan results from the database: ' + str(e)) + else: + try: + c = conn.cursor() + c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) + latestscandate = c.fetchone() + c = conn.cursor() + c.execute(''' + SELECT find_date, domain, source, type, resource + FROM results + WHERE find_date=? and domain=? + ORDER BY source,type + ''', (latestscandate[0], domain,)) + results = c.fetchall() + self.latestscanresults = results + return self.latestscanresults + except Exception as e: + print('Error in getting the latest scan results from the database: ' + str(e)) + except Exception as e: + print('Error connecting to theHarvester database: ' + str(e)) + finally: + conn.close() + + def getscanboarddata(self): + try: + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE type="host"''') + data = c.fetchone() + self.scanboarddata["host"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE type="email"''') + data = c.fetchone() + self.scanboarddata["email"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE type="ip"''') + data = c.fetchone() + self.scanboarddata["ip"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE type="vhost"''') + data = c.fetchone() + self.scanboarddata["vhost"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE type="shodan"''') + data = c.fetchone() + self.scanboarddata["shodan"] = data[0] + c.execute('''SELECT COUNT(DISTINCT(domain)) FROM results ''') + data = c.fetchone() + self.scanboarddata["domains"] = data[0] + return self.scanboarddata + except Exception as e: + print(e) + finally: + conn.close() + + def getscanhistorydomain(self, domain): + try: + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('''SELECT DISTINCT(find_date) FROM results WHERE domain=?''', (domain,)) + dates = c.fetchall() + for date in dates: + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host" AND find_date=?''', + (domain, date[0])) + counthost = c.fetchone() + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email" AND find_date=?''', + (domain, date[0])) + countemail = c.fetchone() + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip" AND find_date=?''', + (domain, date[0])) + countip = c.fetchone() + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost" AND find_date=?''', + (domain, date[0])) + countvhost = c.fetchone() + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan" AND find_date=?''', + (domain, date[0])) + countshodan = c.fetchone() + results = { + "date": str(date[0]), + "hosts": str(counthost[0]), + "email": str(countemail[0]), + "ip": str(countip[0]), + "vhost": str(countvhost[0]), + "shodan": str(countshodan[0]) + } + self.domainscanhistory.append(results) + return self.domainscanhistory + except Exception as e: + print(e) + finally: + conn.close() + + def getpluginscanstatistics(self): + try: + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute(''' + SELECT domain,find_date, type, source, count(*) + FROM results + GROUP BY domain, find_date, type, source + ''') + results = c.fetchall() + self.scanstats = results + return self.scanstats + except Exception as e: + print(e) + finally: + conn.close() + + def latestscanchartdata(self, domain): + try: + self.latestscandomain["domain"] = domain + conn = sqlite3.connect(self.db) + c = conn.cursor() + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host"''', (domain,)) + data = c.fetchone() + self.latestscandomain["host"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email"''', (domain,)) + data = c.fetchone() + self.latestscandomain["email"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip"''', (domain,)) + data = c.fetchone() + self.latestscandomain["ip"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost"''', (domain,)) + data = c.fetchone() + self.latestscandomain["vhost"] = data[0] + c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan"''', (domain,)) + data = c.fetchone() + self.latestscandomain["shodan"] = data[0] + c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) + data = c.fetchone() + self.latestscandomain["latestdate"] = data[0] + latestdate = data[0] + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="host"''', (domain, latestdate,)) + scandetailshost = c.fetchall() + self.latestscandomain["scandetailshost"] = scandetailshost + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="email"''', + (domain, latestdate,)) + scandetailsemail = c.fetchall() + self.latestscandomain["scandetailsemail"] = scandetailsemail + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="ip"''', (domain, latestdate,)) + scandetailsip = c.fetchall() + self.latestscandomain["scandetailsip"] = scandetailsip + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="vhost"''', + (domain, latestdate,)) + scandetailsvhost = c.fetchall() + self.latestscandomain["scandetailsvhost"] = scandetailsvhost + c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="shodan"''', + (domain, latestdate,)) + scandetailsshodan = c.fetchall() + self.latestscandomain["scandetailsshodan"] = scandetailsshodan + return self.latestscandomain + except Exception as e: + print(e) + finally: + conn.close() diff --git a/lib/statichtmlgenerator.py b/lib/statichtmlgenerator.py new file mode 100644 index 00000000..cf9a5953 --- /dev/null +++ b/lib/statichtmlgenerator.py @@ -0,0 +1,176 @@ +class htmlgenerator: + + def __init__(self, word): + self.domain = word + + def generatepreviousscanresults(self, previousscanresults): + try: + if previousscanresults[0]=='No results': + html=''' +

Previous scan report

+

 

+ + + + + + + + + + +''' + for i in previousscanresults: + html += '" + html += '" + html += '" + html += '" + html += '" + html += '' + else: + html = ''' +

Previous scan report

+

 

+
DateDomainPluginRecord typeResult
' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "
+ + + + + + + + + +''' + for i in previousscanresults: + html += '" + html += '" + html += '" + html += '" + html += '" + html += '' + html += ''' + +
DateDomainPluginRecord typeResult
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
+

 

+

 

+

 

+

 

+''' + return html + except Exception as e: + print('Error generating the previous scan results HTML code: ' + str(e)) + + def generatelatestscanresults(self, latestscanresults): + try: + html=''' +

Latest scan report

+

 

+ + + + + + + + + + +''' + for i in latestscanresults: + html += '" + html += '" + html += '" + html += '" + html += '" + html += '' + html += ''' + +
DateDomainPluginRecord typeResult
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
+

 

+

 

+

 

+

 

+''' + return html + except Exception as e: + print('Error generating the latest scan results HTML code: ' + str(e)) + + def beginhtml(self): + html = ''' + + + +

theHarvester Scan Report

+ ''' + return html + + def generatedashboardcode(self, scanboarddata): + try: + totalnumberofdomains = scanboarddata['domains'] + totalnumberofhosts = scanboarddata['host'] + totalnumberofip = scanboarddata['ip'] + totalnumberofvhost= scanboarddata['vhost'] + totalnumberofemail= scanboarddata['email'] + totalnumberofshodan= scanboarddata['shodan'] + html=''' +

Scan dashboard

+ + + + + + + + + + + + + + + + + + + +

Domains

Hosts

IP Addresses

Vhosts

Emails

Shodan

'''+str(totalnumberofdomains)+'''

'''+str(totalnumberofhosts)+'''

'''+str(totalnumberofip)+'''

'''+str(totalnumberofvhost)+'''

'''+str(totalnumberofemail)+'''

'''+str(totalnumberofshodan)+'''

+

 

+

 

+''' + return html + except Exception as e: + print('Error generating dashboard HTML code: ' + str(e)) + + def generatepluginscanstatistics(self, scanstatistics): + try: + html = ''' +

theHarvester plugin statistics

+

 

+ + + + + + + + + + +''' + for i in scanstatistics: + html += '" + html += '" + html += '" + html += '" + html += '" + html += '' + html += ''' + +
DomainDateRecordtypeSourceTotal results
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
+

 

+

 

+''' + return html + except Exception as e: + print('Error generating scan statistics HTML code: ' + str(e)) diff --git a/parsers/__init__.py b/parsers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/parsers/censysparser.py b/parsers/censysparser.py new file mode 100644 index 00000000..e4662298 --- /dev/null +++ b/parsers/censysparser.py @@ -0,0 +1,67 @@ +from bs4 import BeautifulSoup +import re + + +class Parser: + + def __init__(self, resultstoparse): + self.ipaddresses = [] + self.souphosts = BeautifulSoup(resultstoparse.total_resultshosts, features='html.parser') + self.soupcerts = BeautifulSoup(resultstoparse.total_resultscerts, features='html.parser') + self.hostnames = [] + self.hostnamesfromcerts = [] + self.urls = [] + self.numberofpageshosts = 0 + self.numberofpagescerts = 0 + self.domain = resultstoparse.word + + def search_hostnamesfromcerts(self): + try: + hostnamelist = self.soupcerts.findAll('i', 'fa fa-fw fa-home') + for hostnameitem in hostnamelist: + hostitems = hostnameitem.next_sibling + hostnames = str(hostitems) + hostnamesclean = re.sub('[ \'\[\]]', '', hostnames) + hostnamesclean = re.sub(r'\.\.\.', r'', hostnamesclean) + self.hostnamesfromcerts.extend(hostnamesclean.split(',')) + self.hostnamesfromcerts = list(filter(None, self.hostnamesfromcerts)) + matchingdomains = [s for s in self.hostnamesfromcerts if str(self.domain) in s] # filter out domains issued to other sites + self.hostnamesfromcerts = matchingdomains + return self.hostnamesfromcerts + except Exception as e: + print('Error occurred in the Censys module: certificate hostname parser: ' + str(e)) + + def search_ipaddresses(self): + try: + ipaddresslist = self.souphosts.findAll('a', 'SearchResult__title-text') + for ipaddressitem in ipaddresslist: + self.ipaddresses.append(ipaddressitem.text.strip()) + return self.ipaddresses + except Exception as e: + print('Error occurred in the Censys module: IP address parser: ' + str(e)) + + def search_totalpageshosts(self): + try: + items = self.souphosts.findAll('span', 'SearchResultSectionHeader__statistic') + if items == [] or items is None: + self.numberofpageshosts = 0 + return self.numberofpageshosts + numbers = re.findall(r"/\d*", items[0].text) + pagenumber = numbers[0].replace('/', '') + self.numberofpageshosts = int(pagenumber) + return self.numberofpageshosts + except Exception as e: + print('Error occurred in the Censys module IP search: page parser: ' + str(e)) + + def search_totalpagescerts(self): + try: + items = self.soupcerts.findAll('span', 'SearchResultSectionHeader__statistic') + if items == [] or items is None: + self.numberofpageshosts = 0 + return self.numberofpageshosts + numbers = re.findall(r"/\d*", items[0].text) + pagenumber = numbers[0].replace('/', '') + self.numberofpagescerts = int(pagenumber) + return self.numberofpagescerts + except Exception as e: + print('Error occurred in the Censys module IP search: page parser: ' + str(e)) diff --git a/parsers/cymonparser.py b/parsers/cymonparser.py new file mode 100644 index 00000000..f424e97b --- /dev/null +++ b/parsers/cymonparser.py @@ -0,0 +1,19 @@ +import re +from bs4 import BeautifulSoup + + +class Parser: + + def __init__(self, results): + self.results = results + self.ipaddresses = [] + self.soup = BeautifulSoup(results.results, features='html.parser') + + def search_ipaddresses(self): + try: + tags = self.soup.findAll('td') + allip = re.findall(r'[0-9]+(?:\.[0-9]+){3}', str(tags)) + self.ipaddresses = set(allip) + return self.ipaddresses + except Exception as e: + print('Error occurred: ' + str(e)) diff --git a/parsers/intelxparser.py b/parsers/intelxparser.py new file mode 100644 index 00000000..8c12b969 --- /dev/null +++ b/parsers/intelxparser.py @@ -0,0 +1,27 @@ +class Parser: + + def __init__(self): + self.emails = set() + self.hosts = set() + + def parse_dictionaries(self, results): + """ + Parse method to parse json results + :param results: Dictionary containing a list of dictionaries known as selectors + :return: tuple of emails and hosts + """ + if results is not None: + for dictionary in results["selectors"]: + field = dictionary['selectorvalue'] + if '@' in field: + self.emails.add(field) + else: + field = str(field) + if 'http' in field or 'https' in field: + if field[:5] == 'https': + field = field[8:] + else: + field = field[7:] + self.hosts.add(field.replace(')', '').replace(',', '')) + return self.emails, self.hosts + return None, None diff --git a/parsers/myparser.py b/parsers/myparser.py new file mode 100644 index 00000000..a63b0612 --- /dev/null +++ b/parsers/myparser.py @@ -0,0 +1,158 @@ +import re + + +class Parser: + + def __init__(self, results, word): + self.results = results + self.word = word + self.temp = [] + + def genericClean(self): + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('%2f', ' ', self.results) + self.results = re.sub('%3a', ' ', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + + for e in ('<', '>', ':', '=', ';', '&', '%3A', '%3D', '%3C', '/', '\\'): + self.results = self.results.replace(e, ' ') + + def urlClean(self): + self.results = re.sub('', '', self.results) + self.results = re.sub('', '', self.results) + self.results = re.sub('%2f', ' ', self.results) + self.results = re.sub('%3a', ' ', self.results) + + for e in ('<', '>', ':', '=', ';', '&', '%3A', '%3D', '%3C'): + self.results = self.results.replace(e, ' ') + + def emails(self): + self.genericClean() + reg_emails = re.compile( + # Local part is required, charset is flexible. + # https://tools.ietf.org/html/rfc6531 (removed * and () as they provide FP mostly) + r'[a-zA-Z0-9.\-_+#~!$&\',;=:]+' + + '@' + + '[a-zA-Z0-9.-]*' + + self.word) + self.temp = reg_emails.findall(self.results) + emails = self.unique() + return emails + + def fileurls(self, file): + urls = [] + reg_urls = re.compile('', '', self.results) + self.results = re.sub('', '', self.results) + reg_people = re.compile(r'>[a-zA-Z0-9._ ]* - Google\+') + self.temp = reg_people.findall(self.results) + resul = [] + for x in self.temp: + y = x.replace(' | LinkedIn', '') + y = y.replace(' profiles ', '') + y = y.replace('LinkedIn', '') + y = y.replace('"', '') + y = y.replace('>', '') + if y != " ": + resul.append(y) + return resul + + def hostnames_all(self): + reg_hosts = re.compile('(.*?)') + temp = reg_hosts.findall(self.results) + for x in temp: + if x.count(':'): + res = x.split(':')[1].split('/')[2] + else: + res = x.split('/')[0] + self.temp.append(res) + hostnames = self.unique() + return hostnames + + def people_linkedin(self): + reg_people = re.compile(r'">[a-zA-Z0-9._ -]* \| LinkedIn') + self.temp = reg_people.findall(self.results) + resul = [] + for x in self.temp: + y = x.replace(' | LinkedIn', '') + y = y.replace(' profiles ', '') + y = y.replace('LinkedIn', '') + y = y.replace('"', '') + y = y.replace('>', '') + if y != " ": + resul.append(y) + return resul + + def people_twitter(self): + reg_people = re.compile(r'(@[a-zA-Z0-9._ -]*)') + self.temp = reg_people.findall(self.results) + users = self.unique() + resul = [] + for x in users: + y = x.replace(' | LinkedIn', '') + y = y.replace(' profiles ', '') + y = y.replace('LinkedIn', '') + y = y.replace('"', '') + y = y.replace('>', '') + if y != " ": + resul.append(y) + return resul + + def profiles(self): + reg_people = re.compile(r'">[a-zA-Z0-9._ -]* - Google Profile') + self.temp = reg_people.findall(self.results) + resul = [] + for x in self.temp: + y = x.replace(' Google Profile', '') + y = y.replace('-', '') + y = y.replace('">', '') + if y != " ": + resul.append(y) + return resul + + def set(self): + reg_sets = re.compile(r'>[a-zA-Z0-9]*') + self.temp = reg_sets.findall(self.results) + sets = [] + for x in self.temp: + y = x.replace('>', '') + y = y.replace(' 0: + if ']' in line: + sub_domain_flag = 0 + else: + if 'www' in self.word: + self.word = str(self.word).replace('www.', '').replace('www', '') + # Remove www from word if entered + self.hostnames.add(str(line).replace('"', '').replace(',', '') + '.' + self.word) + else: + continue + return list(self.ips), list(self.hostnames) From 8bbcbbad202b5a90f1b421a877ff35e1dbefa12b Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 00:35:21 -0400 Subject: [PATCH 09/16] Updated main to fix crtsh --- theHarvester/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index b3f5452e..9932fef3 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -433,6 +433,8 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() + hosts = filter(search.get_data()) + all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') From ed9936adf6ad2369c68ff33754162811a4bcb298 Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 12:26:54 -0400 Subject: [PATCH 10/16] Updated crtsh for when user chooses all search engines to work properly. --- theHarvester/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index b3f5452e..9932fef3 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -433,6 +433,8 @@ def start(): print('\033[94m[*] Searching CRT.sh. \033[0m') search = crtsh.SearchCrtsh(word) search.process() + hosts = filter(search.get_data()) + all_hosts.extend(hosts) db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'CRTsh') From 8df15e3f849f48212f08acadfdccb2c05c546811 Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 16:35:22 -0400 Subject: [PATCH 11/16] Removed unused directory. --- discovery/DNS/Base.py | 363 ------- discovery/DNS/Class.py | 58 - discovery/DNS/Lib.py | 764 ------------- discovery/DNS/Opcode.py | 52 - discovery/DNS/Status.py | 67 -- discovery/DNS/Type.py | 80 -- discovery/DNS/__init__.py | 60 -- discovery/DNS/lazy.py | 53 - discovery/DNS/win32dns.py | 143 --- discovery/IPy.py | 1650 ----------------------------- discovery/__init__.py | 25 - discovery/baidusearch.py | 41 - discovery/bingsearch.py | 89 -- discovery/censys.py | 130 --- discovery/constants.py | 50 - discovery/crtsh.py | 67 -- discovery/cymon.py | 38 - discovery/dnsdumpster.py | 43 - discovery/dnssearch.py | 233 ---- discovery/dogpilesearch.py | 48 - discovery/duckduckgosearch.py | 93 -- discovery/exaleadsearch.py | 81 -- discovery/googlecertificates.py | 38 - discovery/googlesearch.py | 147 --- discovery/huntersearch.py | 42 - discovery/intelxsearch.py | 56 - discovery/linkedinsearch.py | 42 - discovery/netcraft.py | 72 -- discovery/port_scanner.py | 32 - discovery/s3_scanner.py | 46 - discovery/securitytrailssearch.py | 62 -- discovery/shodansearch.py | 43 - discovery/takeover.py | 44 - discovery/threatcrowd.py | 36 - discovery/trello.py | 61 -- discovery/twittersearch.py | 64 -- discovery/virustotal.py | 36 - discovery/wfuzz_search.py | 32 - discovery/yahoosearch.py | 49 - discovery/yandexsearch.py | 73 -- 40 files changed, 5203 deletions(-) delete mode 100644 discovery/DNS/Base.py delete mode 100644 discovery/DNS/Class.py delete mode 100644 discovery/DNS/Lib.py delete mode 100644 discovery/DNS/Opcode.py delete mode 100644 discovery/DNS/Status.py delete mode 100644 discovery/DNS/Type.py delete mode 100644 discovery/DNS/__init__.py delete mode 100644 discovery/DNS/lazy.py delete mode 100644 discovery/DNS/win32dns.py delete mode 100644 discovery/IPy.py delete mode 100644 discovery/__init__.py delete mode 100644 discovery/baidusearch.py delete mode 100644 discovery/bingsearch.py delete mode 100644 discovery/censys.py delete mode 100644 discovery/constants.py delete mode 100644 discovery/crtsh.py delete mode 100644 discovery/cymon.py delete mode 100644 discovery/dnsdumpster.py delete mode 100644 discovery/dnssearch.py delete mode 100644 discovery/dogpilesearch.py delete mode 100644 discovery/duckduckgosearch.py delete mode 100644 discovery/exaleadsearch.py delete mode 100644 discovery/googlecertificates.py delete mode 100644 discovery/googlesearch.py delete mode 100644 discovery/huntersearch.py delete mode 100644 discovery/intelxsearch.py delete mode 100644 discovery/linkedinsearch.py delete mode 100644 discovery/netcraft.py delete mode 100644 discovery/port_scanner.py delete mode 100644 discovery/s3_scanner.py delete mode 100644 discovery/securitytrailssearch.py delete mode 100644 discovery/shodansearch.py delete mode 100644 discovery/takeover.py delete mode 100644 discovery/threatcrowd.py delete mode 100644 discovery/trello.py delete mode 100644 discovery/twittersearch.py delete mode 100644 discovery/virustotal.py delete mode 100644 discovery/wfuzz_search.py delete mode 100644 discovery/yahoosearch.py delete mode 100644 discovery/yandexsearch.py diff --git a/discovery/DNS/Base.py b/discovery/DNS/Base.py deleted file mode 100644 index 9f0af7af..00000000 --- a/discovery/DNS/Base.py +++ /dev/null @@ -1,363 +0,0 @@ -""" -$Id: Base.py,v 1.12.2.4 2007/05/22 20:28:31 customdesigned Exp $ - -This file is part of the pydns project. -Homepage: http://pydns.sourceforge.net - -This code is covered by the standard Python License. - - Base functionality. Request and Response classes, that sort of thing. -""" - -import socket -import time - -from discovery.DNS import Type, Class, Opcode -import asyncore - -class DNSError(Exception): - pass - -defaults = {'protocol': 'udp', 'port': 53, 'opcode': Opcode.QUERY, - 'qtype': Type.A, 'rd': 1, 'timing': 1, 'timeout': 30} - -defaults['server'] = [] - - -def ParseResolvConf(resolv_path): - global defaults - try: - lines = open(resolv_path).readlines() - except: - print('error in path' + resolv_path) - for line in lines: - line = line.strip() - if not line or line[0] == ';' or line[0] == '#': - continue - fields = line.split() - if len(fields) < 2: - continue - if fields[0] == 'domain' and len(fields) > 1: - defaults['domain'] = fields[1] - if fields[0] == 'search': - pass - if fields[0] == 'options': - pass - if fields[0] == 'sortlist': - pass - if fields[0] == 'nameserver': - defaults['server'].append(fields[1]) - - -def DiscoverNameServers(): - import sys - if sys.platform in ('win32', 'nt'): - import win32dns - defaults['server'] = win32dns.RegistryResolve() - else: - return ParseResolvConf() - - -class DnsRequest: - - """ high level Request object """ - - def __init__(self, *name, **args): - self.donefunc = None - #fix maybe? - self.asyn = False - #self.async = None #TODO FIX async is a keyword - self.defaults = {} - self.argparse(name, args) - self.defaults = self.args - - def argparse(self, name, args): - if not name and 'name' in self.defaults: - args['name'] = self.defaults['name'] - if isinstance(name, str): - args['name'] = name - else: - if len(name) == 1: - if name[0]: - args['name'] = name[0] - for i in defaults.keys(): - if i not in args: - if i in self.defaults: - args[i] = self.defaults[i] - else: - args[i] = defaults[i] - if isinstance(args['server'], str): - args['server'] = [args['server']] - self.args = args - - def socketInit(self, a, b): - self.s = socket.socket(a, b) - - def processUDPReply(self): - import time - import select - if self.args['timeout'] > 0: - r, w, e = select.select([self.s], [], [], self.args['timeout']) - if not len(r): - raise DNSError('Timeout') - self.reply = self.s.recv(1024) - self.time_finish = time.time() - self.args['server'] = self.ns - return self.processReply() - - def processTCPReply(self): - import time - from discovery.DNS import Lib - self.f = self.s.makefile('r') - header = self.f.read(2) - if len(header) < 2: - raise DNSError('EOF') - count = Lib.unpack16bit(header) - self.reply = self.f.read(count) - if len(self.reply) != count: - raise DNSError('incomplete reply') - self.time_finish = time.time() - self.args['server'] = self.ns - return self.processReply() - - def processReply(self): - from discovery.DNS import Lib - self.args['elapsed'] = (self.time_finish - self.time_start) * 1000 - u = Lib.Munpacker(self.reply) - r = Lib.DnsResult(u, self.args) - r.args = self.args - # self.args=None # mark this DnsRequest object as used. - return r - #### TODO TODO TODO #### -# if protocol == 'tcp' and qtype == Type.AXFR: -# while 1: -# header = f.read(2) -# if len(header) < 2: -# print '========== EOF ==========' -# break -# count = Lib.unpack16bit(header) -# if not count: -# print '========== ZERO COUNT ==========' -# break -# print '========== NEXT ==========' -# reply = f.read(count) -# if len(reply) != count: -# print '*** Incomplete reply ***' -# break -# u = Lib.Munpacker(reply) -# Lib.dumpM(u) - - def conn(self): - self.s.connect((str(self.ns), self.port)) - - - def req(self, *name, **args): - " needs a refactoring " - import time - from discovery.DNS import Lib - self.argparse(name, args) - # if not self.args: - # raise DNSError,'reinitialize request before reuse' - protocol = self.args['protocol'] - self.port = self.args['port'] - opcode = self.args['opcode'] - rd = self.args['rd'] - server = self.args['server'] - if isinstance(self.args['qtype'], str): - try: - qtype = getattr(Type, str.upper(self.args['qtype'])) - except AttributeError: - raise DNSError('unknown query type') - else: - qtype = self.args['qtype'] - if 'name' not in self.args: - print(self.args) - raise DNSError('nothing to lookup') - qname = self.args['name'] - if qtype == Type.AXFR: - print('Query type AXFR, protocol forced to TCP') - protocol = 'tcp' - # print 'QTYPE %d(%s)' % (qtype, Type.typestr(qtype)) - m = Lib.Mpacker() - # jesus. keywords and default args would be good. TODO. - m.addHeader(0, - 0, opcode, 0, 0, rd, 0, 0, 0, - 1, 0, 0, 0) - m.addQuestion(qname, qtype, Class.IN) - self.request = m.getbuf() - try: - if protocol == 'udp': - self.sendUDPRequest(server) - else: - self.sendTCPRequest(server) - except socket.error as reason: - raise DNSError(reason) - if self.asyn: - return None - else: - return self.response - - def sendUDPRequest(self, server): - "refactor me" - self.response = None - self.socketInit(socket.AF_INET, socket.SOCK_DGRAM) - for self.ns in server: - try: - # TODO. Handle timeouts &c correctly (RFC) - #self.s.connect((self.ns, self.port)) - self.conn() - self.time_start = time.time() - if not self.asyn: - self.s.send(self.request) - self.response = self.processUDPReply() - # except socket.error: - except Exception as e: - print(e) - continue - break - if not self.response: - if not self.asyn: - raise DNSError('no working nameservers found') - - def sendTCPRequest(self, server): - " do the work of sending a TCP request " - import time - import discovery.DNS.Lib as Lib - self.response = None - for self.ns in server: - try: - self.socketInit(socket.AF_INET, socket.SOCK_STREAM) - self.time_start = time.time() - self.conn() - self.s.send(Lib.pack16bit(len(self.request)) + self.request) - self.s.shutdown(1) - self.response = self.processTCPReply() - except socket.error: - continue - break - if not self.response: - raise DNSError('no working nameservers found') -# class DnsAsyncRequest(DnsRequest): - - -class DnsAsyncRequest(DnsRequest, asyncore.dispatcher_with_send): - - " an asynchronous request object. out of date, probably broken " - - def __init__(self, *name, **args): - DnsRequest.__init__(self, *name, **args) - # XXX todo - if 'done' in args and args['done']: - self.donefunc = args['done'] - else: - self.donefunc = self.showResult - # self.realinit(name,args) # XXX todo - self.asyn = True - - def conn(self): - import time - self.connect((self.ns, self.port)) - self.time_start = time.time() - if 'start' in self.args and self.args['start']: - asyncore.dispatcher.go(self) - - def socketInit(self, a, b): - self.create_socket(a, b) - asyncore.dispatcher.__init__(self) - self.s = self - - def handle_read(self): - if self.args['protocol'] == 'udp': - self.response = self.processUDPReply() - if self.donefunc: - self.donefunc(*(self,)) - - def handle_connect(self): - self.send(self.request) - - def handle_write(self): - pass - - def showResult(self, *s): - self.response.show() - -# -# $Log: Base.py,v $ -# Revision 1.12.2.4 2007/05/22 20:28:31 customdesigned -# Missing import Lib -# -# Revision 1.12.2.3 2007/05/22 20:25:52 customdesigned -# Use socket.inetntoa,inetaton. -# -# Revision 1.12.2.2 2007/05/22 20:21:46 customdesigned -# Trap socket error -# -# Revision 1.12.2.1 2007/05/22 20:19:35 customdesigned -# Skip bogus but non-empty lines in resolv.conf -# -# Revision 1.12 2002/04/23 06:04:27 anthonybaxter -# attempt to refactor the DNSRequest.req method a little. after doing a bit -# of this, I've decided to bite the bullet and just rewrite the puppy. will -# be checkin in some design notes, then unit tests and then writing the sod. -# -# Revision 1.11 2002/03/19 13:05:02 anthonybaxter -# converted to class based exceptions (there goes the python1.4 compatibility :) -# -# removed a quite gross use of 'eval()'. -# -# Revision 1.10 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.9 2002/03/19 12:26:13 anthonybaxter -# death to leading tabs. -# -# Revision 1.8 2002/03/19 10:30:33 anthonybaxter -# first round of major bits and pieces. The major stuff here (summarised -# from my local, off-net CVS server :/ this will cause some oddities with -# the -# -# tests/testPackers.py: -# a large slab of unit tests for the packer and unpacker code in DNS.Lib -# -# DNS/Lib.py: -# placeholder for addSRV. -# added 'klass' to addA, make it the same as the other A* records. -# made addTXT check for being passed a string, turn it into a length 1 list. -# explicitly check for adding a string of length > 255 (prohibited). -# a bunch of cleanups from a first pass with pychecker -# new code for pack/unpack. the bitwise stuff uses struct, for a smallish -# (disappointly small, actually) improvement, while addr2bin is much -# much faster now. -# -# DNS/Base.py: -# added DiscoverNameServers. This automatically does the right thing -# on unix/ win32. No idea how MacOS handles this. *sigh* -# Incompatible change: Don't use ParseResolvConf on non-unix, use this -# function, instead! -# a bunch of cleanups from a first pass with pychecker -# -# Revision 1.5 2001/08/09 09:22:28 anthonybaxter -# added what I hope is win32 resolver lookup support. I'll need to try -# and figure out how to get the CVS checkout onto my windows machine to -# make sure it works (wow, doing something other than games on the -# windows machine :) -# -# Code from Wolfgang.Strobl@gmd.de -# win32dns.py from -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66260 -# -# Really, ParseResolvConf() should be renamed "FindNameServers" or -# some such. -# -# Revision 1.4 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.3 2001/07/19 07:20:12 anthony -# Handle blank resolv.conf lines. -# Patch from Bastian Kleineidam -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/Class.py b/discovery/DNS/Class.py deleted file mode 100644 index cca4c3ef..00000000 --- a/discovery/DNS/Class.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -$Id: Class.py,v 1.6 2002/04/23 12:52:19 anthonybaxter Exp $ - - This file is part of the pydns project. - Homepage: http://pydns.sourceforge.net - - This code is covered by the standard Python License. - - CLASS values (section 3.2.4) -""" - - -IN = 1 # the Internet -CS = 2 # the CSNET class (Obsolete - used only for examples in - # some obsolete RFCs) -CH = 3 # the CHAOS class. When someone shows me python running on - # a Symbolics Lisp machine, I'll look at implementing this. -HS = 4 # Hesiod [Dyer 87] - -# QCLASS values (section 3.2.5) - -ANY = 255 # any class - - -# Construct reverse mapping dictionary - -_names = dir() -classmap = {} -for _name in _names: - if _name[0] != '_': - classmap[eval(_name)] = _name - - -def classstr(klass): - if klass in classmap: - return classmap[klass] - else: - return repr(klass) - -# -# $Log: Class.py,v $ -# Revision 1.6 2002/04/23 12:52:19 anthonybaxter -# cleanup whitespace. -# -# Revision 1.5 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.4 2002/03/19 12:26:13 anthonybaxter -# death to leading tabs. -# -# Revision 1.3 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/Lib.py b/discovery/DNS/Lib.py deleted file mode 100644 index d0fa14f8..00000000 --- a/discovery/DNS/Lib.py +++ /dev/null @@ -1,764 +0,0 @@ -# -*- encoding: utf-8 -*- -""" - $Id: Lib.py,v 1.11.2.3 2007/05/22 20:27:40 customdesigned Exp $ - - This file is part of the pydns project. - Homepage: http://pydns.sourceforge.net - - This code is covered by the standard Python License. - - Library code. Largely this is packers and unpackers for various types. -""" - -# -# -# See RFC 1035: -# ------------------------------------------------------------------------ -# Network Working Group P. Mockapetris -# Request for Comments: 1035 ISI -# November 1987 -# Obsoletes: RFCs 882, 883, 973 -# -# DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION -# ------------------------------------------------------------------------ - -from discovery.DNS import Type, Class, Opcode, Status -from discovery.DNS.Base import DNSError - -class UnpackError(DNSError): - pass - - -class PackError(DNSError): - pass - -# Low-level 16 and 32 bit integer packing and unpacking - -from struct import pack as struct_pack -from struct import unpack as struct_unpack -from socket import inet_ntoa, inet_aton - - -def pack16bit(n): - return struct_pack('!H', n) - - -def pack32bit(n): - return struct_pack('!L', n) - - -def unpack16bit(s): - return struct_unpack('!H', s)[0] - - -def unpack32bit(s): - return struct_unpack('!L', s)[0] - - -def addr2bin(addr): - return struct_unpack('!l', inet_aton(addr))[0] - - -def bin2addr(n): - return inet_ntoa(struct_pack('!L', n)) - -# Packing class - - -class Packer: - - " packer base class. supports basic byte/16bit/32bit/addr/string/name " - - def __init__(self): - self.buf = b'' - self.index = {} - - def getbuf(self): - return self.buf - - def addbyte(self, c): - if len(c) != 1: - raise TypeError('one character expected') - self.buf = self.buf + c - - def addbytes(self, bytes): - self.buf = self.buf + bytes - - def add16bit(self, n): - self.buf = self.buf + pack16bit(n) - - def add32bit(self, n): - self.buf = self.buf + pack32bit(n) - - def addaddr(self, addr): - n = addr2bin(addr) - self.buf = self.buf + pack32bit(n) - - def addstring(self, s): - if len(s) > 255: - raise ValueError("Can't encode string of length " + - "%s (> 255)" % (len(s))) - self.addbyte(chr(len(s))) - self.addbytes(s) - - def addname(self, name): - # Domain name packing (section 4.1.4) - # Add a domain name to the buffer, possibly using pointers. - # The case of the first occurrence of a name is preserved. - # Redundant dots are ignored. - list = [] - for label in name.split('.'): - if label: - if len(label) > 63: - raise PackError('label too long') - list.append(label) - keys = [] - s = '' - for i in range(len(list)): - key = str.upper((s.join(list[i:]))) - keys.append(key) - if key in self.index: - pointer = self.index[key] - break - else: - i = len(list) - pointer = None - # Do it into temporaries first so exceptions don't - # mess up self.index and self.buf - buf = '' - offset = len(self.buf) - index = [] - for j in range(i): - label = list[j] - n = len(label) - if offset + len(buf) < 0x3FFF: - index.append((keys[j], offset + len(buf))) - else: - print('DNS.Lib.Packer.addname:',) - print('warning: pointer too big') - buf = buf + (chr(n) + label) - if pointer: - buf = buf + pack16bit(pointer | 0xC000) - else: - buf = buf + '\0' - self.buf = self.buf + bytes(buf, encoding='utf-8') - for key, value in index: - self.index[key] = value - - def dump(self): - keys = sorted(self.index.keys()) - print('-' * 40) - for key in keys: - print('%20s %3d' % (key, self.index[key])) - print('-' * 40) - space = 1 - for i in range(0, len(self.buf) + 1, 2): - if self.buf[i:i + 2] == '**': - if not space: - print() - space = 1 - continue - space = 0 - print('%4d' % i,) - for c in self.buf[i:i + 2]: - if ' ' < c < '\177': - print(' %c' % c,) - else: - print('%2d' % ord(c),) - print() - print('-' * 40) - - -# Unpacking class - - -class Unpacker: - - def __init__(self, buf): - self.buf = buf - self.offset = 0 - - def getbyte(self): - if self.offset >= len(self.buf): - raise UnpackError("Ran off end of data") - c = self.buf[self.offset] - self.offset = self.offset + 1 - return c - - def getbytes(self, n): - s = self.buf[self.offset: self.offset + n] - if len(s) != n: - raise UnpackError('not enough data left') - self.offset = self.offset + n - return s - - def get16bit(self): - return unpack16bit(self.getbytes(2)) - - def get32bit(self): - return unpack32bit(self.getbytes(4)) - - def getaddr(self): - return bin2addr(self.get32bit()) - - def getstring(self): - return self.getbytes(ord(self.getbyte())) - - def getname(self): - # Domain name unpacking (section 4.1.4) - c = self.getbyte() - i = ord(chr(c)) - if i & 0xC0 == 0xC0: - d = self.getbyte() - j = ord(chr(d)) - pointer = ((i << 8) | j) & ~0xC000 - save_offset = self.offset - try: - self.offset = pointer - domain = self.getname() - finally: - self.offset = save_offset - return domain - if i == 0: - return '' - domain = self.getbytes(i).decode('UTF-8') - remains = self.getname() - if not remains: - return domain - else: - return domain + '.' + remains - - -# Test program for packin/unpacking (section 4.1.4) - -def testpacker(): - N = 2500 - R = range(N) - import timing - # See section 4.1.4 of RFC 1035 - timing.start() - for i in R: - p = Packer() - p.addaddr('192.168.0.1') - p.addbytes('*' * 20) - p.addname('f.ISI.ARPA') - p.addbytes('*' * 8) - p.addname('Foo.F.isi.arpa') - p.addbytes('*' * 18) - p.addname('arpa') - p.addbytes('*' * 26) - p.addname('') - timing.finish() - print(timing.milli(), "ms total for packing") - print(round(timing.milli() / i, 4), 'ms per packing') - # p.dump() - u = Unpacker(p.buf) - u.getaddr() - u.getbytes(20) - u.getname() - u.getbytes(8) - u.getname() - u.getbytes(18) - u.getname() - u.getbytes(26) - u.getname() - timing.start() - for i in R: - u = Unpacker(p.buf) - - res = (u.getaddr(), - u.getbytes(20), - u.getname(), - u.getbytes(8), - u.getname(), - u.getbytes(18), - u.getname(), - u.getbytes(26), - u.getname()) - timing.finish() - print(timing.milli(), "ms total for unpacking") - print(round(timing.milli() / i, 4), 'ms per unpacking') - # for item in res: print item - - -# Pack/unpack RR toplevel format (section 3.2.1) - -class RRpacker(Packer): - - def __init__(self): - Packer.__init__(self) - self.rdstart = None - - def addRRheader(self, name, type, klass, ttl, *rest): - self.addname(name) - self.add16bit(type) - self.add16bit(klass) - self.add32bit(ttl) - if rest: - if rest[1:]: - raise TypeError('too many args') - rdlength = rest[0] - else: - rdlength = 0 - self.add16bit(rdlength) - self.rdstart = len(self.buf) - - def patchrdlength(self): - rdlength = unpack16bit(self.buf[self.rdstart - 2:self.rdstart]) - if rdlength == len(self.buf) - self.rdstart: - return - rdata = self.buf[self.rdstart:] - save_buf = self.buf - ok = 0 - try: - self.buf = self.buf[:self.rdstart - 2] - self.add16bit(len(rdata)) - self.buf = self.buf + rdata - ok = 1 - finally: - if not ok: - self.buf = save_buf - - def endRR(self): - if self.rdstart is not None: - self.patchrdlength() - self.rdstart = None - - def getbuf(self): - if self.rdstart is not None: - self.patchrdlength() - return Packer.getbuf(self) - # Standard RRs (section 3.3) - - def addCNAME(self, name, klass, ttl, cname): - self.addRRheader(name, Type.CNAME, klass, ttl) - self.addname(cname) - self.endRR() - - def addHINFO(self, name, klass, ttl, cpu, os): - self.addRRheader(name, Type.HINFO, klass, ttl) - self.addstring(cpu) - self.addstring(os) - self.endRR() - - def addMX(self, name, klass, ttl, preference, exchange): - self.addRRheader(name, Type.MX, klass, ttl) - self.add16bit(preference) - self.addname(exchange) - self.endRR() - - def addNS(self, name, klass, ttl, nsdname): - self.addRRheader(name, Type.NS, klass, ttl) - self.addname(nsdname) - self.endRR() - - def addPTR(self, name, klass, ttl, ptrdname): - self.addRRheader(name, Type.PTR, klass, ttl) - self.addname(ptrdname) - self.endRR() - - def addSOA(self, name, klass, ttl, - mname, rname, serial, refresh, retry, expire, minimum): - self.addRRheader(name, Type.SOA, klass, ttl) - self.addname(mname) - self.addname(rname) - self.add32bit(serial) - self.add32bit(refresh) - self.add32bit(retry) - self.add32bit(expire) - self.add32bit(minimum) - self.endRR() - - def addTXT(self, name, klass, ttl, list): - self.addRRheader(name, Type.TXT, klass, ttl) - if isinstance(list, str): - list = [list] - for txtdata in list: - self.addstring(txtdata) - self.endRR() - # Internet specific RRs (section 3.4) -- class = IN - - def addA(self, name, klass, ttl, address): - self.addRRheader(name, Type.A, klass, ttl) - self.addaddr(address) - self.endRR() - - def addWKS(self, name, ttl, address, protocol, bitmap): - self.addRRheader(name, Type.WKS, Class.IN, ttl) - self.addaddr(address) - self.addbyte(chr(protocol)) - self.addbytes(bitmap) - self.endRR() - - def addSRV(self): - raise NotImplementedError - - -def prettyTime(seconds): - if seconds < 60: - return seconds, "%d seconds" % (seconds) - if seconds < 3600: - return seconds, "%d minutes" % (seconds / 60) - if seconds < 86400: - return seconds, "%d hours" % (seconds / 3600) - if seconds < 604800: - return seconds, "%d days" % (seconds / 86400) - else: - return seconds, "%d weeks" % (seconds / 604800) - - -class RRunpacker(Unpacker): - - def __init__(self, buf): - Unpacker.__init__(self, buf) - self.rdend = None - - def getRRheader(self): - name = self.getname() - rrtype = self.get16bit() - klass = self.get16bit() - ttl = self.get32bit() - rdlength = self.get16bit() - self.rdend = self.offset + rdlength - return (name, rrtype, klass, ttl, rdlength) - - def endRR(self): - if self.offset != self.rdend: - raise UnpackError('end of RR not reached') - - def getCNAMEdata(self): - return self.getname() - - def getHINFOdata(self): - return self.getstring(), self.getstring() - - def getMXdata(self): - return self.get16bit(), self.getname() - - def getNSdata(self): - return self.getname() - - def getPTRdata(self): - return self.getname() - - def getSOAdata(self): - return self.getname(), \ - self.getname(), \ - ('serial',) + (self.get32bit(),), \ - ('refresh ',) + prettyTime(self.get32bit()), \ - ('retry',) + prettyTime(self.get32bit()), \ - ('expire',) + prettyTime(self.get32bit()), \ - ('minimum',) + prettyTime(self.get32bit()) - - def getTXTdata(self): - list = [] - while self.offset != self.rdend: - list.append(self.getstring()) - return list - - def getAdata(self): - return self.getaddr() - - def getWKSdata(self): - address = self.getaddr() - protocol = ord(self.getbyte()) - bitmap = self.getbytes(self.rdend - self.offset) - return address, protocol, bitmap - - def getSRVdata(self): - """ - _Service._Proto.Name TTL Class SRV Priority Weight Port Target - """ - priority = self.get16bit() - weight = self.get16bit() - port = self.get16bit() - target = self.getname() - # print '***priority, weight, port, target', priority, weight, port, - # target - return priority, weight, port, target - - -# Pack/unpack Message Header (section 4.1) - -class Hpacker(Packer): - - def addHeader(self, id, qr, opcode, aa, tc, rd, ra, z, rcode, - qdcount, ancount, nscount, arcount): - self.add16bit(id) - self.add16bit((qr & 1) << 15 | (opcode & 0xF) << 11 | (aa & 1) << 10 - | (tc & 1) << 9 | (rd & 1) << 8 | (ra & 1) << 7 - | (z & 7) << 4 | (rcode & 0xF)) - self.add16bit(qdcount) - self.add16bit(ancount) - self.add16bit(nscount) - self.add16bit(arcount) - - -class Hunpacker(Unpacker): - - def getHeader(self): - id = self.get16bit() - flags = self.get16bit() - qr, opcode, aa, tc, rd, ra, z, rcode = ( - (flags >> 15) & 1, - (flags >> 11) & 0xF, - (flags >> 10) & 1, - (flags >> 9) & 1, - (flags >> 8) & 1, - (flags >> 7) & 1, - (flags >> 4) & 7, - (flags >> 0) & 0xF) - qdcount = self.get16bit() - ancount = self.get16bit() - nscount = self.get16bit() - arcount = self.get16bit() - return (id, qr, opcode, aa, tc, rd, ra, z, rcode, - qdcount, ancount, nscount, arcount) - - -# Pack/unpack Question (section 4.1.2) - -class Qpacker(Packer): - - def addQuestion(self, qname, qtype, qclass): - self.addname(qname) - self.add16bit(qtype) - self.add16bit(qclass) - - -class Qunpacker(Unpacker): - - def getQuestion(self): - return self.getname(), self.get16bit(), self.get16bit() - - -# Pack/unpack Message(section 4) -# NB the order of the base classes is important for __init__()! - -class Mpacker(RRpacker, Qpacker, Hpacker): - pass - - -class Munpacker(RRunpacker, Qunpacker, Hunpacker): - pass - - -# Routines to print an unpacker to stdout, for debugging. -# These affect the unpacker's current position! - -def dumpM(u): - print('HEADER:',) - (id, qr, opcode, aa, tc, rd, ra, z, rcode, - qdcount, ancount, nscount, arcount) = u.getHeader() - print('id=%d,' % id,) - print('qr=%d, opcode=%d, aa=%d, tc=%d, rd=%d, ra=%d, z=%d, rcode=%d,' \ - % (qr, opcode, aa, tc, rd, ra, z, rcode)) - if tc: - print('*** response truncated! ***') - if rcode: - print('*** nonzero error code! (%d) ***' % rcode) - print(' qdcount=%d, ancount=%d, nscount=%d, arcount=%d' \ - % (qdcount, ancount, nscount, arcount)) - for i in range(qdcount): - print('QUESTION %d:' % i,) - dumpQ(u) - for i in range(ancount): - print('ANSWER %d:' % i,) - dumpRR(u) - for i in range(nscount): - print('AUTHORITY RECORD %d:' % i,) - dumpRR(u) - for i in range(arcount): - print('ADDITIONAL RECORD %d:' % i,) - dumpRR(u) - - -class DnsResult: - - def __init__(self, u, args): - self.header = {} - self.questions = [] - self.answers = [] - self.authority = [] - self.additional = [] - self.args = args - self.storeM(u) - - def show(self): - import time - print('; <<>> PDG.py 1.0 <<>> %s %s' % (self.args['name'], - self.args['qtype'])) - opt = "" - if self.args['rd']: - opt = opt + 'recurs ' - h = self.header - print(';; options: ' + opt) - print(';; got answer:') - print(';; ->>HEADER<<- opcode %s, status %s, id %d' % ( - h['opcode'], h['status'], h['id'])) - flags = filter(lambda x, h=h: h[x], ('qr', 'aa', 'rd', 'ra', 'tc')) - print(';; flags: %s; Ques: %d, Ans: %d, Auth: %d, Addit: %d' % ( - ''.join(map(str,flags)), h['qdcount'], h['ancount'], h['nscount'], - h['arcount'])) - print(';; QUESTIONS:') - for q in self.questions: - print(';; %s, type = %s, class = %s' % (q['qname'], q['qtypestr'], - q['qclassstr'])) - print() - print(';; ANSWERS:') - for a in self.answers: - print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], - a['data'])) - print() - print(';; AUTHORITY RECORDS:') - for a in self.authority: - print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], - a['data'])) - print() - print(';; ADDITIONAL RECORDS:') - for a in self.additional: - print('%-20s %-6s %-6s %s' % (a['name'], repr(a['ttl']), a['typename'], - a['data'])) - print() - if 'elapsed' in self.args: - print(';; Total query time: %d msec' % self.args['elapsed']) - print(';; To SERVER: %s' % (self.args['server'])) - print(';; WHEN: %s' % time.ctime(time.time())) - - def storeM(self, u): - (self.header['id'], self.header['qr'], self.header['opcode'], - self.header['aa'], self.header['tc'], self.header['rd'], - self.header['ra'], self.header['z'], self.header['rcode'], - self.header['qdcount'], self.header['ancount'], - self.header['nscount'], self.header['arcount']) = u.getHeader() - self.header['opcodestr'] = Opcode.opcodestr(self.header['opcode']) - self.header['status'] = Status.statusstr(self.header['rcode']) - for i in range(self.header['qdcount']): - # print 'QUESTION %d:' % i, - self.questions.append(self.storeQ(u)) - for i in range(self.header['ancount']): - # print 'ANSWER %d:' % i, - self.answers.append(self.storeRR(u)) - for i in range(self.header['nscount']): - # print 'AUTHORITY RECORD %d:' % i, - self.authority.append(self.storeRR(u)) - for i in range(self.header['arcount']): - # print 'ADDITIONAL RECORD %d:' % i, - self.additional.append(self.storeRR(u)) - - def storeQ(self, u): - q = {} - q['qname'], q['qtype'], q['qclass'] = u.getQuestion() - q['qtypestr'] = Type.typestr(q['qtype']) - q['qclassstr'] = Class.classstr(q['qclass']) - return q - - def storeRR(self, u): - r = {} - r['name'], r['type'], r['class'], r[ - 'ttl'], r['rdlength'] = u.getRRheader() - r['typename'] = Type.typestr(r['type']) - r['classstr'] = Class.classstr(r['class']) - # print 'name=%s, type=%d(%s), class=%d(%s), ttl=%d' \ - # % (name, - # type, typename, - # klass, Class.classstr(class), - # ttl) - mname = 'get%sdata' % r['typename'] - if hasattr(u, mname): - r['data'] = getattr(u, mname)() - else: - r['data'] = u.getbytes(r['rdlength']) - return r - - -def dumpQ(u): - qname, qtype, qclass = u.getQuestion() - print('qname=%s, qtype=%d(%s), qclass=%d(%s)' \ - % (qname, - qtype, Type.typestr(qtype), - qclass, Class.classstr(qclass))) - - -def dumpRR(u): - name, type, klass, ttl, rdlength = u.getRRheader() - typename = Type.typestr(type) - print('name=%s, type=%d(%s), class=%d(%s), ttl=%d' \ - % (name, - type, typename, - klass, Class.classstr(klass), - ttl)) - mname = 'get%sdata' % typename - if hasattr(u, mname): - print(' formatted rdata:', getattr(u, mname)()) - else: - print(' binary rdata:', u.getbytes(rdlength)) - -if __name__ == "__main__": - testpacker() -# -# $Log: Lib.py,v $ -# Revision 1.11.2.3 2007/05/22 20:27:40 customdesigned -# Fix unpacker underflow. -# -# Revision 1.11.2.2 2007/05/22 20:25:53 customdesigned -# Use socket.inetntoa,inetaton. -# -# Revision 1.11.2.1 2007/05/22 20:20:39 customdesigned -# Mark utf-8 encoding -# -# Revision 1.11 2002/03/19 13:05:02 anthonybaxter -# converted to class based exceptions (there goes the python1.4 compatibility :) -# -# removed a quite gross use of 'eval()'. -# -# Revision 1.10 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.9 2002/03/19 10:30:33 anthonybaxter -# first round of major bits and pieces. The major stuff here (summarised -# from my local, off-net CVS server :/ this will cause some oddities with -# the -# -# tests/testPackers.py: -# a large slab of unit tests for the packer and unpacker code in DNS.Lib -# -# DNS/Lib.py: -# placeholder for addSRV. -# added 'klass' to addA, make it the same as the other A* records. -# made addTXT check for being passed a string, turn it into a length 1 list. -# explicitly check for adding a string of length > 255 (prohibited). -# a bunch of cleanups from a first pass with pychecker -# new code for pack/unpack. the bitwise stuff uses struct, for a smallish -# (disappointly small, actually) improvement, while addr2bin is much -# much faster now. -# -# DNS/Base.py: -# added DiscoverNameServers. This automatically does the right thing -# on unix/ win32. No idea how MacOS handles this. *sigh* -# Incompatible change: Don't use ParseResolvConf on non-unix, use this -# function, instead! -# a bunch of cleanups from a first pass with pychecker -# -# Revision 1.8 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.7 2001/07/19 07:50:44 anthony -# Added SRV (RFC 2782) support. Code from Michael Str�der. -# -# Revision 1.6 2001/07/19 07:39:18 anthony -# 'type' -> 'rrtype' in getRRheader(). Fix from Michael Str�der. -# -# Revision 1.5 2001/07/19 07:34:19 anthony -# oops. glitch in storeRR (fixed now). -# Reported by Bastian Kleineidam and by greg lin. -# -# Revision 1.4 2001/07/19 07:16:42 anthony -# Changed (opcode&0xF)<<11 to (opcode*0xF)<<11. -# Patch from Timothy J. Miller. -# -# Revision 1.3 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/Opcode.py b/discovery/DNS/Opcode.py deleted file mode 100644 index c1310275..00000000 --- a/discovery/DNS/Opcode.py +++ /dev/null @@ -1,52 +0,0 @@ -""" - $Id: Opcode.py,v 1.6 2002/04/23 10:51:43 anthonybaxter Exp $ - - This file is part of the pydns project. - Homepage: http://pydns.sourceforge.net - - This code is covered by the standard Python License. - - Opcode values in message header. RFC 1035, 1996, 2136. -""" - - -QUERY = 0 -IQUERY = 1 -STATUS = 2 -NOTIFY = 4 -UPDATE = 5 - -# Construct reverse mapping dictionary - -_names = dir() -opcodemap = {} -for _name in _names: - if _name[0] != '_': - opcodemap[eval(_name)] = _name - - -def opcodestr(opcode): - if opcode in opcodemap: - return opcodemap[opcode] - else: - return repr(opcode) - -# -# $Log: Opcode.py,v $ -# Revision 1.6 2002/04/23 10:51:43 anthonybaxter -# Added UPDATE, NOTIFY. -# -# Revision 1.5 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.4 2002/03/19 12:26:13 anthonybaxter -# death to leading tabs. -# -# Revision 1.3 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/Status.py b/discovery/DNS/Status.py deleted file mode 100644 index 3a5cf5d0..00000000 --- a/discovery/DNS/Status.py +++ /dev/null @@ -1,67 +0,0 @@ -""" - $Id: Status.py,v 1.7 2002/04/23 12:52:19 anthonybaxter Exp $ - - This file is part of the pydns project. - Homepage: http://pydns.sourceforge.net - - This code is covered by the standard Python License. - - Status values in message header -""" - -NOERROR = 0 # No Error [RFC 1035] -FORMERR = 1 # Format Error [RFC 1035] -SERVFAIL = 2 # Server Failure [RFC 1035] -NXDOMAIN = 3 # Non-Existent Domain [RFC 1035] -NOTIMP = 4 # Not Implemented [RFC 1035] -REFUSED = 5 # Query Refused [RFC 1035] -YXDOMAIN = 6 # Name Exists when it should not [RFC 2136] -YXRRSET = 7 # RR Set Exists when it should not [RFC 2136] -NXRRSET = 8 # RR Set that should exist does not [RFC 2136] -NOTAUTH = 9 # Server Not Authoritative for zone [RFC 2136] -NOTZONE = 10 # Name not contained in zone [RFC 2136] -BADVERS = 16 # Bad OPT Version [RFC 2671] -BADSIG = 16 # TSIG Signature Failure [RFC 2845] -BADKEY = 17 # Key not recognized [RFC 2845] -BADTIME = 18 # Signature out of time window [RFC 2845] -BADMODE = 19 # Bad TKEY Mode [RFC 2930] -BADNAME = 20 # Duplicate key name [RFC 2930] -BADALG = 21 # Algorithm not supported [RFC 2930] - -# Construct reverse mapping dictionary - -_names = dir() -statusmap = {} -for _name in _names: - if _name[0] != '_': - statusmap[eval(_name)] = _name - - -def statusstr(status): - if status in statusmap: - return statusmap[status] - else: - return repr(status) - -# -# $Log: Status.py,v $ -# Revision 1.7 2002/04/23 12:52:19 anthonybaxter -# cleanup whitespace. -# -# Revision 1.6 2002/04/23 10:57:57 anthonybaxter -# update to complete the list of response codes. -# -# Revision 1.5 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.4 2002/03/19 12:26:13 anthonybaxter -# death to leading tabs. -# -# Revision 1.3 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/Type.py b/discovery/DNS/Type.py deleted file mode 100644 index 5db5b55a..00000000 --- a/discovery/DNS/Type.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- encoding: utf-8 -*- -""" - $Id: Type.py,v 1.6.2.1 2007/05/22 20:20:39 customdesigned Exp $ - - This file is part of the pydns project. - Homepage: http://pydns.sourceforge.net - - This code is covered by the standard Python License. - - TYPE values (section 3.2.2) -""" - -A = 1 # a host address -NS = 2 # an authoritative name server -MD = 3 # a mail destination (Obsolete - use MX) -MF = 4 # a mail forwarder (Obsolete - use MX) -CNAME = 5 # the canonical name for an alias -SOA = 6 # marks the start of a zone of authority -MB = 7 # a mailbox domain name (EXPERIMENTAL) -MG = 8 # a mail group member (EXPERIMENTAL) -MR = 9 # a mail rename domain name (EXPERIMENTAL) -NULL = 10 # a null RR (EXPERIMENTAL) -WKS = 11 # a well known service description -PTR = 12 # a domain name pointer -HINFO = 13 # host information -MINFO = 14 # mailbox or mail list information -MX = 15 # mail exchange -TXT = 16 # text strings -AAAA = 28 # IPv6 AAAA records (RFC 1886) -SRV = 33 # DNS RR for specifying the location of services (RFC 2782) - - -# Additional TYPE values from host.c source - -UNAME = 110 -MP = 240 - -# QTYPE values (section 3.2.3) - -AXFR = 252 # A request for a transfer of an entire zone -MAILB = 253 # A request for mailbox-related records (MB, MG or MR) -MAILA = 254 # A request for mail agent RRs (Obsolete - see MX) -ANY = 255 # A request for all records - -# Construct reverse mapping dictionary - -_names = dir() -typemap = {} -for _name in _names: - if _name[0] != '_': - typemap[eval(_name)] = _name - - -def typestr(type): - if type in typemap: - return typemap[type] - else: - return repr(type) -# -# $Log: Type.py,v $ -# Revision 1.6.2.1 2007/05/22 20:20:39 customdesigned -# Mark utf-8 encoding -# -# Revision 1.6 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.5 2002/03/19 12:26:13 anthonybaxter -# death to leading tabs. -# -# Revision 1.4 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.3 2001/07/19 07:38:28 anthony -# added type code for SRV. From Michael Ströder. -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/__init__.py b/discovery/DNS/__init__.py deleted file mode 100644 index 0b7302f1..00000000 --- a/discovery/DNS/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- encoding: utf-8 -*- -# $Id: __init__.py,v 1.8.2.2 2007/05/22 21:06:52 customdesigned Exp $ -# -# This file is part of the pydns project. -# Homepage: http://pydns.sourceforge.net -# -# This code is covered by the standard Python License. -# - -# __init__.py for DNS class. - -__version__ = '2.3.1' - -from discovery.DNS import Type -from discovery.DNS import Opcode -from discovery.DNS import Status -from discovery.DNS import Class -from discovery.DNS.Base import DnsRequest, DNSError -from discovery.DNS.Lib import DnsResult -from discovery.DNS.Base import * -from discovery.DNS.Lib import * -Error = DNSError -from discovery.DNS.lazy import * -Request = DnsRequest -Result = DnsResult - -# -# $Log: __init__.py,v $ -# Revision 1.8.2.2 2007/05/22 21:06:52 customdesigned -# utf-8 in __init__.py -# -# Revision 1.8.2.1 2007/05/22 20:39:20 customdesigned -# Release 2.3.1 -# -# Revision 1.8 2002/05/06 06:17:49 anthonybaxter -# found that the old README file called itself release 2.2. So make -# this one 2.3... -# -# Revision 1.7 2002/05/06 06:16:15 anthonybaxter -# make some sort of reasonable version string. releasewards ho! -# -# Revision 1.6 2002/03/19 13:05:02 anthonybaxter -# converted to class based exceptions (there goes the python1.4 compatibility :) -# -# removed a quite gross use of 'eval()'. -# -# Revision 1.5 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.4 2001/11/26 17:57:51 stroeder -# Added __version__ -# -# Revision 1.3 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# \ No newline at end of file diff --git a/discovery/DNS/lazy.py b/discovery/DNS/lazy.py deleted file mode 100644 index 4f2ba331..00000000 --- a/discovery/DNS/lazy.py +++ /dev/null @@ -1,53 +0,0 @@ -# $Id: lazy.py,v 1.5.2.1 2007/05/22 20:23:38 customdesigned Exp $ -# -# This file is part of the pydns project. -# Homepage: http://pydns.sourceforge.net -# -# This code is covered by the standard Python License. -# - -# routines for lazy people. -from discovery.DNS import Base - -def revlookup(name): - "convenience routine for doing a reverse lookup of an address" - if Base.defaults['server'] == []: - Base.DiscoverNameServers() - a = name.split('.') - a.reverse() - s = '.' - b = s.join(a) + '.in-addr.arpa' - # this will only return one of any records returned. - return Base.DnsRequest(b, qtype='ptr').req().answers[0]['data'] - - -def mxlookup(name): - """ - convenience routine for doing an MX lookup of a name. returns a - sorted list of (preference, mail exchanger) records - """ - if Base.defaults['server'] == []: - Base.DiscoverNameServers() - a = Base.DnsRequest(name, qtype='mx').req().answers - l = sorted(map(lambda x: x['data'], a)) - return l - -# -# $Log: lazy.py,v $ -# Revision 1.5.2.1 2007/05/22 20:23:38 customdesigned -# Lazy call to DiscoverNameServers -# -# Revision 1.5 2002/05/06 06:14:38 anthonybaxter -# reformat, move import to top of file. -# -# Revision 1.4 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. -# yay. -# -# Revision 1.3 2001/08/09 09:08:55 anthonybaxter -# added identifying header to top of each file -# -# Revision 1.2 2001/07/19 06:57:07 anthony -# cvs keywords added -# -# diff --git a/discovery/DNS/win32dns.py b/discovery/DNS/win32dns.py deleted file mode 100644 index afffb82c..00000000 --- a/discovery/DNS/win32dns.py +++ /dev/null @@ -1,143 +0,0 @@ -""" - $Id: win32dns.py,v 1.3.2.1 2007/05/22 20:26:49 customdesigned Exp $ - - Extract a list of TCP/IP name servers from the registry 0.1 - 0.1 Strobl 2001-07-19 - Usage: - RegistryResolve() returns a list of ip numbers (dotted quads), by - scouring the registry for addresses of name servers - - Tested on Windows NT4 Server SP6a, Windows 2000 Pro SP2 and - Whistler Pro (XP) Build 2462 and Windows ME - ... all having a different registry layout wrt name servers :-/ - - Todo: - - Program doesn't check whether an interface is up or down - - (c) 2001 Copyright by Wolfgang Strobl ws@mystrobl.de, - License analog to the current Python license -""" - -import winreg - -def binipdisplay(s): - "convert a binary array of ip adresses to a python list" - if len(s) % 4 != 0: - raise EnvironmentError # well ... - ol = [] - s = '.' - for i in range(int(len(s) / 4)): - s1 = s[:4] - s = s[4:] - ip = [] - for j in s1: - ip.append(str(ord(j))) - ol.append(s.join(ip)) - return ol - - -def stringdisplay(s): - '''convert "d.d.d.d,d.d.d.d" to ["d.d.d.d","d.d.d.d"]. - also handle u'd.d.d.d d.d.d.d', as reporting on SF - ''' - import re - return map(str, re.split("[ ,]", s)) - - -def RegistryResolve(): - nameservers = [] - x = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) - try: - y = winreg.OpenKey(x, - r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters") - except EnvironmentError: # so it isn't NT/2000/XP - # windows ME, perhaps? - try: # for Windows ME - y = winreg.OpenKey(x, - r"SYSTEM\CurrentControlSet\Services\VxD\MSTCP") - nameserver, dummytype = winreg.QueryValueEx(y, 'NameServer') - if nameserver and not (nameserver in nameservers): - nameservers.extend(stringdisplay(nameserver)) - except EnvironmentError: - pass - return nameservers # no idea - try: - nameserver = winreg.QueryValueEx(y, "DhcpNameServer")[0].split() - except: - nameserver = winreg.QueryValueEx(y, "NameServer")[0].split() - if nameserver: - nameservers = nameserver - nameserver = winreg.QueryValueEx(y, "NameServer")[0] - winreg.CloseKey(y) - try: # for win2000 - y = winreg.OpenKey(x, - r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters") - for i in range(1000): - try: - n = winreg.EnumKey(y, i) - z = winreg.OpenKey(y, n) - dnscount, dnscounttype = winreg.QueryValueEx(z, - 'DNSServerAddressCount') - dnsvalues, dnsvaluestype = winreg.QueryValueEx(z, - 'DNSServerAddresses') - nameservers.extend(binipdisplay(dnsvalues)) - winreg.CloseKey(z) - except EnvironmentError: - break - winreg.CloseKey(y) - except EnvironmentError: - pass -# - try: # for whistler - y = winreg.OpenKey(x, - r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces") - for i in range(1000): - try: - n = winreg.EnumKey(y, i) - z = winreg.OpenKey(y, n) - try: - nameserver, dummytype = winreg.QueryValueEx( - z, 'NameServer') - if nameserver and not (nameserver in nameservers): - nameservers.extend(stringdisplay(nameserver)) - except EnvironmentError: - pass - winreg.CloseKey(z) - except EnvironmentError: - break - winreg.CloseKey(y) - except EnvironmentError: - # print "Key Interfaces not found, just do nothing." - pass -# - winreg.CloseKey(x) - return nameservers - - -if __name__ == "__main__": - print('Name servers:', RegistryResolve()) - -# $Log: win32dns.py,v $ -# Revision 1.3.2.1 2007/05/22 20:26:49 customdesigned -# Fix win32 nameserver discovery. -# -# Revision 1.3 2002/05/06 06:15:31 anthonybaxter -# apparently some versions of windows return servers as unicode -# string with space sep, rather than strings with comma sep. -# *sigh* -# -# Revision 1.2 2002/03/19 12:41:33 anthonybaxter -# tabnannied and reindented everything. 4 space indent, no tabs. yay. -# -# Revision 1.1 2001/08/09 09:22:28 anthonybaxter -# added what I hope is win32 resolver lookup support. I'll need to try -# and figure out how to get the CVS checkout onto my windows machine to -# make sure it works (wow, doing something other than games on the -# windows machine :) -# -# Code from Wolfgang.Strobl@gmd.de -# win32dns.py from -# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66260 -# -# Really, ParseResolvConf() should be renamed "FindNameServers" or some such. diff --git a/discovery/IPy.py b/discovery/IPy.py deleted file mode 100644 index eba4b55c..00000000 --- a/discovery/IPy.py +++ /dev/null @@ -1,1650 +0,0 @@ -""" -IPy - class and tools for handling of IPv4 and IPv6 addresses and networks. -See README file for learn how to use IPy. - -Further Information might be available at: -https://github.com/haypo/python-ipy -""" - -__version__ = '0.83' - -import bisect -import collections -import sys -import types - -# Definition of the ranges for IPv4 IPs should include -# www.iana.org/assignments/ipv4-address-space -# and www.iana.org/assignments/multicast-addresses -IPv4ranges = { - '0': 'PUBLIC', # fall back - '00000000': 'PRIVATE', # 0/8 - '00001010': 'PRIVATE', # 10/8 - '0110010001': 'CARRIER_GRADE_NAT', # 100.64/10 - '01111111': 'LOOPBACK', # 127.0/8 - '1': 'PUBLIC', # fall back - '1010100111111110': 'PRIVATE', # 169.254/16 - '101011000001': 'PRIVATE', # 172.16/12 - '1100000010101000': 'PRIVATE', # 192.168/16 - '111': 'RESERVED', # 224/3 - } - -# Definition of the ranges for IPv6 IPs -# http://www.iana.org/assignments/ipv6-address-space/ -# http://www.iana.org/assignments/ipv6-unicast-address-assignments/ -# http://www.iana.org/assignments/ipv6-multicast-addresses/ -IPv6ranges = { - '00000000' : 'RESERVED', # ::/8 - '0' * 96 : 'RESERVED', # ::/96 Formerly IPV4COMP [RFC4291] - '0' * 128 : 'UNSPECIFIED', # ::/128 - '0' * 127 + '1' : 'LOOPBACK', # ::1/128 - '0' * 80 + '1' * 16 : 'IPV4MAP', # ::ffff:0:0/96 - '00000000011001001111111110011011' + '0' * 64 : 'WKP46TRANS', # 0064:ff9b::/96 Well-Known-Prefix [RFC6052] - '00000001' : 'UNASSIGNED', # 0100::/8 - '0000001' : 'RESERVED', # 0200::/7 Formerly NSAP [RFC4048] - '0000010' : 'RESERVED', # 0400::/7 Formerly IPX [RFC3513] - '0000011' : 'RESERVED', # 0600::/7 - '00001' : 'RESERVED', # 0800::/5 - '0001' : 'RESERVED', # 1000::/4 - '001' : 'GLOBAL-UNICAST', # 2000::/3 [RFC4291] - '00100000000000010000000' : 'SPECIALPURPOSE', # 2001::/23 [RFC4773] - '00100000000000010000000000000000' : 'TEREDO', # 2001::/32 [RFC4380] - '00100000000000010000000000000010' + '0' * 16 : 'BMWG', # 2001:0002::/48 Benchmarking [RFC5180] - '0010000000000001000000000001' : 'ORCHID', # 2001:0010::/28 (Temp until 2014-03-21) [RFC4843] - '00100000000000010000001' : 'ALLOCATED APNIC', # 2001:0200::/23 - '00100000000000010000010' : 'ALLOCATED ARIN', # 2001:0400::/23 - '00100000000000010000011' : 'ALLOCATED RIPE NCC', # 2001:0600::/23 - '00100000000000010000100' : 'ALLOCATED RIPE NCC', # 2001:0800::/23 - '00100000000000010000101' : 'ALLOCATED RIPE NCC', # 2001:0a00::/23 - '00100000000000010000110' : 'ALLOCATED APNIC', # 2001:0c00::/23 - '00100000000000010000110110111000' : 'DOCUMENTATION', # 2001:0db8::/32 [RFC3849] - '00100000000000010000111' : 'ALLOCATED APNIC', # 2001:0e00::/23 - '00100000000000010001001' : 'ALLOCATED LACNIC', # 2001:1200::/23 - '00100000000000010001010' : 'ALLOCATED RIPE NCC', # 2001:1400::/23 - '00100000000000010001011' : 'ALLOCATED RIPE NCC', # 2001:1600::/23 - '00100000000000010001100' : 'ALLOCATED ARIN', # 2001:1800::/23 - '00100000000000010001101' : 'ALLOCATED RIPE NCC', # 2001:1a00::/23 - '0010000000000001000111' : 'ALLOCATED RIPE NCC', # 2001:1c00::/22 - '00100000000000010010' : 'ALLOCATED RIPE NCC', # 2001:2000::/20 - '001000000000000100110' : 'ALLOCATED RIPE NCC', # 2001:3000::/21 - '0010000000000001001110' : 'ALLOCATED RIPE NCC', # 2001:3800::/22 - '0010000000000001001111' : 'RESERVED', # 2001:3c00::/22 Possible future allocation to RIPE NCC - '00100000000000010100000' : 'ALLOCATED RIPE NCC', # 2001:4000::/23 - '00100000000000010100001' : 'ALLOCATED AFRINIC', # 2001:4200::/23 - '00100000000000010100010' : 'ALLOCATED APNIC', # 2001:4400::/23 - '00100000000000010100011' : 'ALLOCATED RIPE NCC', # 2001:4600::/23 - '00100000000000010100100' : 'ALLOCATED ARIN', # 2001:4800::/23 - '00100000000000010100101' : 'ALLOCATED RIPE NCC', # 2001:4a00::/23 - '00100000000000010100110' : 'ALLOCATED RIPE NCC', # 2001:4c00::/23 - '00100000000000010101' : 'ALLOCATED RIPE NCC', # 2001:5000::/20 - '0010000000000001100' : 'ALLOCATED APNIC', # 2001:8000::/19 - '00100000000000011010' : 'ALLOCATED APNIC', # 2001:a000::/20 - '00100000000000011011' : 'ALLOCATED APNIC', # 2001:b000::/20 - '0010000000000010' : '6TO4', # 2002::/16 "6to4" [RFC3056] - '001000000000001100' : 'ALLOCATED RIPE NCC', # 2003::/18 - '001001000000' : 'ALLOCATED APNIC', # 2400::/12 - '001001100000' : 'ALLOCATED ARIN', # 2600::/12 - '00100110000100000000000' : 'ALLOCATED ARIN', # 2610::/23 - '00100110001000000000000' : 'ALLOCATED ARIN', # 2620::/23 - '001010000000' : 'ALLOCATED LACNIC', # 2800::/12 - '001010100000' : 'ALLOCATED RIPE NCC', # 2a00::/12 - '001011000000' : 'ALLOCATED AFRINIC', # 2c00::/12 - '00101101' : 'RESERVED', # 2d00::/8 - '0010111' : 'RESERVED', # 2e00::/7 - '0011' : 'RESERVED', # 3000::/4 - '010' : 'RESERVED', # 4000::/3 - '011' : 'RESERVED', # 6000::/3 - '100' : 'RESERVED', # 8000::/3 - '101' : 'RESERVED', # a000::/3 - '110' : 'RESERVED', # c000::/3 - '1110' : 'RESERVED', # e000::/4 - '11110' : 'RESERVED', # f000::/5 - '111110' : 'RESERVED', # f800::/6 - '1111110' : 'ULA', # fc00::/7 [RFC4193] - '111111100' : 'RESERVED', # fe00::/9 - '1111111010' : 'LINKLOCAL', # fe80::/10 - '1111111011' : 'RESERVED', # fec0::/10 Formerly SITELOCAL [RFC4291] - '11111111' : 'MULTICAST', # ff00::/8 - '1111111100000001' : 'NODE-LOCAL MULTICAST', # ff01::/16 - '1111111100000010' : 'LINK-LOCAL MULTICAST', # ff02::/16 - '1111111100000100' : 'ADMIN-LOCAL MULTICAST', # ff04::/16 - '1111111100000101' : 'SITE-LOCAL MULTICAST', # ff05::/16 - '1111111100001000' : 'ORG-LOCAL MULTICAST', # ff08::/16 - '1111111100001110' : 'GLOBAL MULTICAST', # ff0e::/16 - '1111111100001111' : 'RESERVED MULTICAST', # ff0f::/16 - '111111110011' : 'PREFIX-BASED MULTICAST', # ff30::/12 [RFC3306] - '111111110111' : 'RP-EMBEDDED MULTICAST', # ff70::/12 [RFC3956] - } - -MAX_IPV4_ADDRESS = 0xffffffff -MAX_IPV6_ADDRESS = 0xffffffffffffffffffffffffffffffff -IPV6_TEST_MAP = 0xffffffffffffffffffffffff00000000 -IPV6_MAP_MASK = 0x00000000000000000000ffff00000000 - -if sys.version_info >= (3,): - INT_TYPES = (int,) - STR_TYPES = (str,) - xrange = range -else: - INT_TYPES = (int, long) - STR_TYPES = (str, unicode) - - -class IPint(object): - """Handling of IP addresses returning integers. - - Use class IP instead because some features are not implemented for IPint.""" - - def __init__(self, data, ipversion=0, make_net=0): - """Create an instance of an IP object. - - Data can be a network specification or a single IP. IP - addresses can be specified in all forms understood by - parseAddress(). The size of a network can be specified as - - /prefixlen a.b.c.0/24 2001:658:22a:cafe::/64 - -lastIP a.b.c.0-a.b.c.255 2001:658:22a:cafe::-2001:658:22a:cafe:ffff:ffff:ffff:ffff - /decimal netmask a.b.c.d/255.255.255.0 not supported for IPv6 - - If no size specification is given a size of 1 address (/32 for - IPv4 and /128 for IPv6) is assumed. - - If make_net is True, an IP address will be transformed into the network - address by applying the specified netmask. - - >>> print(IP('127.0.0.0/8')) - 127.0.0.0/8 - >>> print(IP('127.0.0.0/255.0.0.0')) - 127.0.0.0/8 - >>> print(IP('127.0.0.0-127.255.255.255')) - 127.0.0.0/8 - >>> print(IP('127.0.0.1/255.0.0.0', make_net=True)) - 127.0.0.0/8 - - See module documentation for more examples. - """ - - # Print no Prefixlen for /32 and /128. - self.NoPrefixForSingleIp = 1 - - # Do we want prefix printed by default? see _printPrefix() - self.WantPrefixLen = None - - netbits = 0 - prefixlen = -1 - - # Handling of non string values in constructor. - if isinstance(data, INT_TYPES): - self.ip = int(data) - if ipversion == 0: - if self.ip <= MAX_IPV4_ADDRESS: - ipversion = 4 - else: - ipversion = 6 - if ipversion == 4: - if self.ip > MAX_IPV4_ADDRESS: - raise ValueError("IPv4 Address can't be larger than %x: %x" % (MAX_IPV4_ADDRESS, self.ip)) - prefixlen = 32 - elif ipversion == 6: - if self.ip > MAX_IPV6_ADDRESS: - raise ValueError("IPv6 Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, self.ip)) - prefixlen = 128 - else: - raise ValueError("only IPv4 and IPv6 supported") - self._ipversion = ipversion - self._prefixlen = prefixlen - # Handle IP instance as an parameter. - elif isinstance(data, IPint): - self._ipversion = data._ipversion - self._prefixlen = data._prefixlen - self.ip = data.ip - elif isinstance(data, STR_TYPES): - # TODO: refactor me! - # Splitting of a string into IP and prefixlen et. al. - x = data.split('-') - if len(x) == 2: - # a.b.c.0-a.b.c.255 specification ? - (ip, last) = x - (self.ip, parsedVersion) = parseAddress(ip) - if parsedVersion != 4: - raise ValueError("first-last notation only allowed for IPv4") - (last, lastversion) = parseAddress(last) - if lastversion != 4: - raise ValueError("last address should be IPv4, too") - if last < self.ip: - raise ValueError("last address should be larger than first") - size = last - self.ip - netbits = _count1Bits(size) - # Make sure the broadcast is the same as the last IP, otherwise it - # will return /16 for something like: 192.168.0.0-192.168.191.255 - if IP('%s/%s' % (ip, 32-netbits)).broadcast().int() != last: - raise ValueError("the range %s is not on a network boundary." % data) - elif len(x) == 1: - x = data.split('/') - # If no prefix is given use defaults. - if len(x) == 1: - ip = x[0] - prefixlen = -1 - elif len(x) > 2: - raise ValueError("only one '/' allowed in IP Address") - else: - (ip, prefixlen) = x - if prefixlen.find('.') != -1: - # Check if the user might have used a netmask like a.b.c.d/255.255.255.0 - (netmask, vers) = parseAddress(prefixlen) - if vers != 4: - raise ValueError("netmask must be IPv4") - prefixlen = _netmaskToPrefixlen(netmask) - elif len(x) > 2: - raise ValueError("only one '-' allowed in IP Address") - else: - raise ValueError("can't parse") - - (self.ip, parsedVersion) = parseAddress(ip) - if ipversion == 0: - ipversion = parsedVersion - if prefixlen == -1: - bits = _ipVersionToLen(ipversion) - prefixlen = bits - netbits - self._ipversion = ipversion - self._prefixlen = int(prefixlen) - - if make_net: - self.ip = self.ip & _prefixlenToNetmask(self._prefixlen, self._ipversion) - - if not _checkNetaddrWorksWithPrefixlen(self.ip, - self._prefixlen, self._ipversion): - raise ValueError("%s has invalid prefix length (%s)" % (repr(self), self._prefixlen)) - else: - raise TypeError("Unsupported data type: %s" % type(data)) - - def int(self): - """Return the first / base / network addess as an (long) integer. - - The same as IP[0]. - - >>> "%X" % IP('10.0.0.0/8').int() - 'A000000' - """ - return self.ip - - def version(self): - """Return the IP version of this Object. - - >>> IP('10.0.0.0/8').version() - 4 - >>> IP('::1').version() - 6 - """ - return self._ipversion - - def prefixlen(self): - """Returns Network Prefixlen. - - >>> IP('10.0.0.0/8').prefixlen() - 8 - """ - return self._prefixlen - - def net(self): - """ - Return the base (first) address of a network as an (long) integer. - """ - return self.int() - - def broadcast(self): - """ - Return the broadcast (last) address of a network as an (long) integer. - - The same as IP[-1].""" - return self.int() + self.len() - 1 - - def _printPrefix(self, want): - """Prints Prefixlen/Netmask. - - Not really. In fact it is our universal Netmask/Prefixlen printer. - This is considered an internal function. - - want == 0 / None don't return anything 1.2.3.0 - want == 1 /prefix 1.2.3.0/24 - want == 2 /netmask 1.2.3.0/255.255.255.0 - want == 3 -lastip 1.2.3.0-1.2.3.255 - """ - - if (self._ipversion == 4 and self._prefixlen == 32) or \ - (self._ipversion == 6 and self._prefixlen == 128): - if self.NoPrefixForSingleIp: - want = 0 - if want == None: - want = self.WantPrefixLen - if want == None: - want = 1 - if want: - if want == 2: - # This should work with IP and IPint. - netmask = self.netmask() - if not isinstance(netmask, INT_TYPES): - netmask = netmask.int() - return "/%s" % (intToIp(netmask, self._ipversion)) - elif want == 3: - return "-%s" % (intToIp(self.ip + self.len() - 1, self._ipversion)) - else: - # default - return "/%d" % (self._prefixlen) - else: - return '' - - # We have different flavours to convert to: - # strFullsize 127.0.0.1 2001:0658:022a:cafe:0200:c0ff:fe8d:08fa - # strNormal 127.0.0.1 2001:658:22a:cafe:200:c0ff:fe8d:08fa - # strCompressed 127.0.0.1 2001:658:22a:cafe::1 - # strHex 0x7F000001 0x20010658022ACAFE0200C0FFFE8D08FA - # strDec 2130706433 42540616829182469433547974687817795834 - - def strBin(self, wantprefixlen = None): - """Return a string representation as a binary value. - - >>> print(IP('127.0.0.1').strBin()) - 01111111000000000000000000000001 - >>> print(IP('2001:0658:022a:cafe:0200::1').strBin()) - 00100000000000010000011001011000000000100010101011001010111111100000001000000000000000000000000000000000000000000000000000000001 - """ - - bits = _ipVersionToLen(self._ipversion) - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 0 - ret = _intToBin(self.ip) - return '0' * (bits - len(ret)) + ret + self._printPrefix(wantprefixlen) - - def strCompressed(self, wantprefixlen = None): - """Return a string representation in compressed format using '::' Notation. - - >>> IP('127.0.0.1').strCompressed() - '127.0.0.1' - >>> IP('2001:0658:022a:cafe:0200::1').strCompressed() - '2001:658:22a:cafe:200::1' - >>> IP('ffff:ffff:ffff:ffff:ffff:f:f:fffc/127').strCompressed() - 'ffff:ffff:ffff:ffff:ffff:f:f:fffc/127' - """ - - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 1 - - if self._ipversion == 4: - return self.strFullsize(wantprefixlen) - else: - if self.ip >> 32 == 0xffff: - ipv4 = intToIp(self.ip & MAX_IPV4_ADDRESS, 4) - text = "::ffff:" + ipv4 + self._printPrefix(wantprefixlen) - return text - # Find the longest sequence of '0'. - hextets = [int(x, 16) for x in self.strFullsize(0).split(':')] - # Every element of followingzeros will contain the number of zeros - # following the corresponding element of hextets. - followingzeros = [0] * 8 - for i in xrange(len(hextets)): - followingzeros[i] = _countFollowingZeros(hextets[i:]) - # compressionpos is the position where we can start removing zeros. - compressionpos = followingzeros.index(max(followingzeros)) - if max(followingzeros) > 1: - # Generate string with the longest number of zeros cut out. - # Now we need hextets as strings. - hextets = [x for x in self.strNormal(0).split(':')] - while compressionpos < len(hextets) and hextets[compressionpos] == '0': - del(hextets[compressionpos]) - hextets.insert(compressionpos, '') - if compressionpos + 1 >= len(hextets): - hextets.append('') - if compressionpos == 0: - hextets = [''] + hextets - return ':'.join(hextets) + self._printPrefix(wantprefixlen) - else: - return self.strNormal(0) + self._printPrefix(wantprefixlen) - - def strNormal(self, wantprefixlen = None): - """Return a string representation in the usual format. - - >>> print(IP('127.0.0.1').strNormal()) - 127.0.0.1 - >>> print(IP('2001:0658:022a:cafe:0200::1').strNormal()) - 2001:658:22a:cafe:200:0:0:1 - """ - - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 1 - - if self._ipversion == 4: - ret = self.strFullsize(0) - elif self._ipversion == 6: - ret = ':'.join(["%x" % x for x in [int(x, 16) for x in self.strFullsize(0).split(':')]]) - else: - raise ValueError("only IPv4 and IPv6 supported") - - - - return ret + self._printPrefix(wantprefixlen) - - def strFullsize(self, wantprefixlen = None): - """Return a string representation in the non-mangled format. - - >>> print(IP('127.0.0.1').strFullsize()) - 127.0.0.1 - >>> print(IP('2001:0658:022a:cafe:0200::1').strFullsize()) - 2001:0658:022a:cafe:0200:0000:0000:0001 - """ - - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 1 - - return intToIp(self.ip, self._ipversion) + self._printPrefix(wantprefixlen) - - def strHex(self, wantprefixlen = None): - """Return a string representation in hex format in lower case. - - >>> print(IP('127.0.0.1').strHex()) - 0x7f000001 - >>> print(IP('2001:0658:022a:cafe:0200::1').strHex()) - 0x20010658022acafe0200000000000001 - """ - - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 0 - - x = '0x%x' % self.ip - return x + self._printPrefix(wantprefixlen) - - def strDec(self, wantprefixlen = None): - """Return a string representation in decimal format. - - >>> print(IP('127.0.0.1').strDec()) - 2130706433 - >>> print(IP('2001:0658:022a:cafe:0200::1').strDec()) - 42540616829182469433547762482097946625 - """ - - if self.WantPrefixLen == None and wantprefixlen == None: - wantprefixlen = 0 - - x = '%d' % self.ip - return x + self._printPrefix(wantprefixlen) - - def iptype(self): - """Return a description of the IP type ('PRIVATE', 'RESERVED', etc). - - >>> print(IP('127.0.0.1').iptype()) - LOOPBACK - >>> print(IP('192.168.1.1').iptype()) - PRIVATE - >>> print(IP('195.185.1.2').iptype()) - PUBLIC - >>> print(IP('::1').iptype()) - LOOPBACK - >>> print(IP('2001:0658:022a:cafe:0200::1').iptype()) - ALLOCATED RIPE NCC - - The type information for IPv6 is out of sync with reality. - """ - - # This could be greatly improved. - if self._ipversion == 4: - iprange = IPv4ranges - elif self._ipversion == 6: - iprange = IPv6ranges - else: - raise ValueError("only IPv4 and IPv6 supported") - - bits = self.strBin() - for i in xrange(len(bits), 0, -1): - if bits[:i] in iprange: - return iprange[bits[:i]] - return "unknown" - - - def netmask(self): - """Return netmask as an integer. - - >>> "%X" % IP('195.185.0.0/16').netmask().int() - 'FFFF0000' - """ - - # TODO: unify with prefixlenToNetmask? - bits = _ipVersionToLen(self._ipversion) - locallen = bits - self._prefixlen - - return ((2 ** self._prefixlen) - 1) << locallen - - - def strNetmask(self): - """Return netmask as an string. Mostly useful for IPv6. - - >>> print(IP('195.185.0.0/16').strNetmask()) - 255.255.0.0 - >>> print(IP('2001:0658:022a:cafe::0/64').strNetmask()) - /64 - """ - - # TODO: unify with prefixlenToNetmask? - # Note: call to _ipVersionToLen() also validates version is 4 or 6. - bits = _ipVersionToLen(self._ipversion) - if self._ipversion == 4: - locallen = bits - self._prefixlen - return intToIp(((2 ** self._prefixlen) - 1) << locallen, 4) - elif self._ipversion == 6: - return "/%d" % self._prefixlen - - def len(self): - """Return the length of a subnet. - - >>> print(IP('195.185.1.0/28').len()) - 16 - >>> print(IP('195.185.1.0/24').len()) - 256 - """ - - bits = _ipVersionToLen(self._ipversion) - locallen = bits - self._prefixlen - return 2 ** locallen - - - def __nonzero__(self): - """All IPy objects should evaluate to true in boolean context. - Ordinarily they do, but if handling a default route expressed as - 0.0.0.0/0, the __len__() of the object becomes 0, which is used - as the boolean value of the object. - """ - return True - - def __bool__(self): - return self.__nonzero__() - - def __len__(self): - """ - Return the length of a subnet. - - Called to implement the built-in function len(). - It will break with large IPv6 Networks. - Use the object's len() instead. - """ - return self.len() - - def __add__(self, other): - """Emulate numeric objects through network aggregation""" - if self._ipversion != other._ipversion: - raise ValueError("Only networks with the same IP version can be added.") - if self._prefixlen != other._prefixlen: - raise ValueError("Only networks with the same prefixlen can be added.") - if self._prefixlen < 1: - raise ValueError("Networks with a prefixlen longer than /1 can't be added.") - if self > other: - # Fixed by Skinny Puppy . - return other.__add__(self) - if other.int() - self[-1].int() != 1: - raise ValueError("Only adjacent networks can be added together.") - ret = IP(self.int(), ipversion=self._ipversion) - ret._prefixlen = self.prefixlen() - 1 - if not _checkNetaddrWorksWithPrefixlen(ret.ip, ret._prefixlen, - ret._ipversion): - raise ValueError("The resulting %s has invalid prefix length (%s)" - % (repr(ret), ret._prefixlen)) - return ret - - def __sub__(self, other): - """Return the prefixes that are in this IP but not in the other""" - return _remove_subprefix(self, other) - - def __getitem__(self, key): - """Called to implement evaluation of self[key]. - - >>> ip=IP('127.0.0.0/30') - >>> for x in ip: - ... print(repr(x)) - ... - IP('127.0.0.0') - IP('127.0.0.1') - IP('127.0.0.2') - IP('127.0.0.3') - >>> ip[2] - IP('127.0.0.2') - >>> ip[-1] - IP('127.0.0.3') - """ - - if isinstance(key, slice): - return [self.ip + int(x) for x in xrange(*key.indices(len(self)))] - if not isinstance(key, INT_TYPES): - raise TypeError - if key < 0: - if abs(key) <= self.len(): - key = self.len() - abs(key) - else: - raise IndexError - else: - if key >= self.len(): - raise IndexError - - return self.ip + int(key) - - - - def __contains__(self, item): - """Called to implement membership test operators. - - Should return true if item is in self, false otherwise. Item - can be other IP-objects, strings or ints. - - >>> IP('195.185.1.1').strHex() - '0xc3b90101' - >>> 0xC3B90101 in IP('195.185.1.0/24') - True - >>> '127.0.0.1' in IP('127.0.0.0/24') - True - >>> IP('127.0.0.0/24') in IP('127.0.0.0/25') - False - """ - - if isinstance(item, IP): - if item._ipversion != self._ipversion: - return False - else: - item = IP(item) - if item.ip >= self.ip and item.ip < self.ip + self.len() - item.len() + 1: - return True - else: - return False - - - def overlaps(self, item): - """Check if two IP address ranges overlap. - - Returns 0 if the two ranges don't overlap, 1 if the given - range overlaps at the end and -1 if it does at the beginning. - - >>> IP('192.168.0.0/23').overlaps('192.168.1.0/24') - 1 - >>> IP('192.168.0.0/23').overlaps('192.168.1.255') - 1 - >>> IP('192.168.0.0/23').overlaps('192.168.2.0') - 0 - >>> IP('192.168.1.0/24').overlaps('192.168.0.0/23') - -1 - """ - - if not isinstance(item, IP): - item = IP(item) - if item.ip >= self.ip and item.ip < self.ip + self.len(): - return 1 - elif self.ip >= item.ip and self.ip < item.ip + item.len(): - return -1 - else: - return 0 - - - def __str__(self): - """Dispatch to the prefered String Representation. - - Used to implement str(IP).""" - - return self.strCompressed() - - - def __repr__(self): - """Print a representation of the Object. - - Used to implement repr(IP). Returns a string which evaluates - to an identical Object (without the wantprefixlen stuff - see - module docstring. - - >>> print(repr(IP('10.0.0.0/24'))) - IP('10.0.0.0/24') - """ - - return("IPint('%s')" % (self.strCompressed(1))) - - - def __cmp__(self, other): - """Called by comparison operations. - - Should return a negative integer if self < other, zero if self - == other, a positive integer if self > other. - - Order is first determined by the address family. IPv4 addresses - are always smaller than IPv6 addresses: - - >>> IP('10.0.0.0') < IP('2001:db8::') - 1 - - Then the first address is compared. Lower addresses are - always smaller: - - >>> IP('10.0.0.0') > IP('10.0.0.1') - 0 - >>> IP('10.0.0.0/24') > IP('10.0.0.1') - 0 - >>> IP('10.0.1.0') > IP('10.0.0.0/24') - 1 - >>> IP('10.0.1.0/24') > IP('10.0.0.0/24') - 1 - >>> IP('10.0.1.0/24') > IP('10.0.0.0') - 1 - - Then the prefix length is compared. Shorter prefixes are - considered smaller than longer prefixes: - - >>> IP('10.0.0.0/24') > IP('10.0.0.0') - 0 - >>> IP('10.0.0.0/24') > IP('10.0.0.0/25') - 0 - >>> IP('10.0.0.0/24') > IP('10.0.0.0/23') - 1 - - """ - if not isinstance(other, IPint): - raise TypeError - - # Lower version -> lower result. - if self._ipversion != other._ipversion: - return self._ipversion < other._ipversion and -1 or 1 - - # Lower start address -> lower result. - if self.ip != other.ip: - return self.ip < other.ip and -1 or 1 - - # Shorter prefix length -> lower result. - if self._prefixlen != other._prefixlen: - return self._prefixlen < other._prefixlen and -1 or 1 - - # No differences found. - return 0 - - def __eq__(self, other): - if not isinstance(other, IPint): - return False - return self.__cmp__(other) == 0 - - def __ne__(self, other): - return not self.__eq__(other) - - def __lt__(self, other): - return self.__cmp__(other) < 0 - - def __le__(self, other): - return self.__cmp__(other) <= 0 - - def __hash__(self): - """Called for the key object for dictionary operations, and by - the built-in function hash(). Should return a 32-bit integer - usable as a hash value for dictionary operations. The only - required property is that objects which compare equal have the - same hash value - - >>> IP('10.0.0.0/24').__hash__() - -167772185 - """ - - thehash = int(-1) - ip = self.ip - while ip > 0: - thehash = thehash ^ (ip & 0x7fffffff) - ip = ip >> 32 - thehash = thehash ^ self._prefixlen - return int(thehash) - - -class IP(IPint): - """Class for handling IP addresses and networks.""" - - def net(self): - """Return the base (first) address of a network as an IP object. - - The same as IP[0]. - - >>> IP('10.0.0.0/8').net() - IP('10.0.0.0') - """ - return IP(IPint.net(self), ipversion=self._ipversion) - - def broadcast(self): - """Return the broadcast (last) address of a network as an IP object. - - The same as IP[-1]. - - >>> IP('10.0.0.0/8').broadcast() - IP('10.255.255.255') - """ - return IP(IPint.broadcast(self)) - - def netmask(self): - """Return netmask as an IP object. - - >>> IP('10.0.0.0/8').netmask() - IP('255.0.0.0') - """ - return IP(IPint.netmask(self), ipversion=self._ipversion) - - def _getIPv4Map(self): - if self._ipversion != 6: - return None - if (self.ip >> 32) != 0xffff: - return None - ipv4 = self.ip & MAX_IPV4_ADDRESS - if self._prefixlen != 128: - ipv4 = '%s/%s' % (ipv4, 32-(128-self._prefixlen)) - return IP(ipv4, ipversion=4) - - def reverseNames(self): - """Return a list with values forming the reverse lookup. - - >>> IP('213.221.113.87/32').reverseNames() - ['87.113.221.213.in-addr.arpa.'] - >>> IP('213.221.112.224/30').reverseNames() - ['224.112.221.213.in-addr.arpa.', '225.112.221.213.in-addr.arpa.', '226.112.221.213.in-addr.arpa.', '227.112.221.213.in-addr.arpa.'] - >>> IP('127.0.0.0/24').reverseNames() - ['0.0.127.in-addr.arpa.'] - >>> IP('127.0.0.0/23').reverseNames() - ['0.0.127.in-addr.arpa.', '1.0.127.in-addr.arpa.'] - >>> IP('127.0.0.0/16').reverseNames() - ['0.127.in-addr.arpa.'] - >>> IP('127.0.0.0/15').reverseNames() - ['0.127.in-addr.arpa.', '1.127.in-addr.arpa.'] - >>> IP('128.0.0.0/8').reverseNames() - ['128.in-addr.arpa.'] - >>> IP('128.0.0.0/7').reverseNames() - ['128.in-addr.arpa.', '129.in-addr.arpa.'] - >>> IP('::1:2').reverseNames() - ['2.0.0.0.1.ip6.arpa.'] - """ - - if self._ipversion == 4: - ret = [] - # TODO: Refactor. Add support for IPint objects. - if self.len() < 2**8: - for x in self: - ret.append(x.reverseName()) - elif self.len() < 2**16: - for i in xrange(0, self.len(), 2**8): - ret.append(self[i].reverseName()[2:]) - elif self.len() < 2**24: - for i in xrange(0, self.len(), 2**16): - ret.append(self[i].reverseName()[4:]) - else: - for i in xrange(0, self.len(), 2**24): - ret.append(self[i].reverseName()[6:]) - return ret - elif self._ipversion == 6: - ipv4 = self._getIPv4Map() - if ipv4 is not None: - return ipv4.reverseNames() - s = "%x" % self.ip - if self._prefixlen % 4 != 0: - raise NotImplementedError("can't create IPv6 reverse names at sub nibble level") - s = list(s) - s.reverse() - s = '.'.join(s) - first_nibble_index = int(32 - (self._prefixlen // 4)) * 2 - return ["%s.ip6.arpa." % s[first_nibble_index:]] - else: - raise ValueError("only IPv4 and IPv6 supported") - - def reverseName(self): - """Return the value for reverse lookup/PTR records as RFC 2317 look alike. - - RFC 2317 is an ugly hack which only works for sub-/24 e.g. not - for /23. Do not use it. Better set up a zone for every - address. See reverseName for a way to achieve that. - - >>> print(IP('195.185.1.1').reverseName()) - 1.1.185.195.in-addr.arpa. - >>> print(IP('195.185.1.0/28').reverseName()) - 0-15.1.185.195.in-addr.arpa. - >>> IP('::1:2').reverseName() - '2.0.0.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.' - >>> IP('ff02::/64').reverseName() - '0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa.' - """ - - if self._ipversion == 4: - s = self.strFullsize(0) - s = s.split('.') - s.reverse() - first_byte_index = int(4 - (self._prefixlen // 8)) - if self._prefixlen % 8 != 0: - nibblepart = "%s-%s" % (s[3-(self._prefixlen // 8)], intToIp(self.ip + self.len() - 1, 4).split('.')[-1]) - nibblepart += '.' - else: - nibblepart = "" - - s = '.'.join(s[first_byte_index:]) - return "%s%s.in-addr.arpa." % (nibblepart, s) - - elif self._ipversion == 6: - ipv4 = self._getIPv4Map() - if ipv4 is not None: - return ipv4.reverseName() - s = '%032x' % self.ip - if self._prefixlen % 4 != 0: - nibblepart = "%s-%x" % (s[self._prefixlen:], self.ip + self.len() - 1) - nibblepart += '.' - else: - nibblepart = "" - s = list(s) - s.reverse() - s = '.'.join(s) - first_nibble_index = int(32 - (self._prefixlen // 4)) * 2 - return "%s%s.ip6.arpa." % (nibblepart, s[first_nibble_index:]) - else: - raise ValueError("only IPv4 and IPv6 supported") - - def make_net(self, netmask): - """Transform a single IP address into a network specification by - applying the given netmask. - - Returns a new IP instance. - - >>> print(IP('127.0.0.1').make_net('255.0.0.0')) - 127.0.0.0/8 - """ - if '/' in str(netmask): - raise ValueError("invalid netmask (%s)" % netmask) - return IP('%s/%s' % (self, netmask), make_net=True) - - def __getitem__(self, key): - """Called to implement evaluation of self[key]. - - >>> ip=IP('127.0.0.0/30') - >>> for x in ip: - ... print(str(x)) - ... - 127.0.0.0 - 127.0.0.1 - 127.0.0.2 - 127.0.0.3 - >>> print(str(ip[2])) - 127.0.0.2 - >>> print(str(ip[-1])) - 127.0.0.3 - """ - if isinstance(key, slice): - return [IP(IPint.__getitem__(self, x), ipversion=self._ipversion) for x in xrange(*key.indices(len(self)))] - return IP(IPint.__getitem__(self, key), ipversion=self._ipversion) - - def __repr__(self): - """Print a representation of the Object. - - >>> IP('10.0.0.0/8') - IP('10.0.0.0/8') - """ - - return("IP('%s')" % (self.strCompressed(1))) - - def get_mac(self): - """ - Get the 802.3 MAC address from IPv6 RFC 2464 address, in lower case. - Return None if the address is an IPv4 or not a IPv6 RFC 2464 address. - - >>> IP('fe80::f66d:04ff:fe47:2fae').get_mac() - 'f4:6d:04:47:2f:ae' - """ - if self._ipversion != 6: - return None - if (self.ip & 0x20000ffff000000) != 0x20000fffe000000: - return None - return '%02x:%02x:%02x:%02x:%02x:%02x' % ( - (((self.ip >> 56) & 0xff) & 0xfd), - (self.ip >> 48) & 0xff, - (self.ip >> 40) & 0xff, - (self.ip >> 16) & 0xff, - (self.ip >> 8) & 0xff, - self.ip & 0xff, - ) - - def v46map(self): - """ - Returns the IPv6 mapped address of an IPv4 address, or the corresponding - IPv4 address if the IPv6 address is in the appropriate range. - Raises a ValueError if the IPv6 address is not translatable. See RFC 4291. - - >>> IP('192.168.1.1').v46map() - IP('::ffff:192.168.1.1') - >>> IP('::ffff:192.168.1.1').v46map() - IP('192.168.1.1') - """ - if self._ipversion == 4: - return IP(str(IPV6_MAP_MASK + self.ip) + - "/%s" % (self._prefixlen + 96)) - else: - if self.ip & IPV6_TEST_MAP == IPV6_MAP_MASK: - return IP(str(self.ip - IPV6_MAP_MASK) + - "/%s" % (self._prefixlen - 96)) - raise ValueError("%s cannot be converted to an IPv4 address." - % repr(self)) - -class IPSet(collections.MutableSet): - def __init__(self, iterable=[]): - # Make sure it's iterable, otherwise wrap. - if not isinstance(iterable, collections.Iterable): - raise TypeError("'%s' object is not iterable" % type(iterable).__name__) - - # Make sure we only accept IP objects. - for prefix in iterable: - if not isinstance(prefix, IP): - raise ValueError('Only IP objects can be added to an IPSet') - - # Store and optimize. - self.prefixes = iterable[:] - self.optimize() - - def __contains__(self, ip): - valid_masks = self.prefixtable.keys() - if isinstance(ip, IP): - # Don't dig through more-specific ranges. - ip_mask = ip._prefixlen - valid_masks = [x for x in valid_masks if x <= ip_mask] - for mask in sorted(valid_masks): - i = bisect.bisect(self.prefixtable[mask], ip) - # Because of sorting order, a match can only occur in the prefix - # that comes before the result of the search. - if i and ip in self.prefixtable[mask][i - 1]: - return True - - def __iter__(self): - for prefix in self.prefixes: - yield prefix - - def __len__(self): - return self.len() - - def __add__(self, other): - return IPSet(self.prefixes + other.prefixes) - - def __sub__(self, other): - new = IPSet(self.prefixes) - for prefix in other: - new.discard(prefix) - return new - - def __and__(self, other): - left = iter(self.prefixes) - right = iter(other.prefixes) - result = [] - try: - l = next(left) - r = next(right) - while True: - # Iterate over prefixes in order, keeping the smaller of the two if they overlap. - if l in r: - result.append(l) - l = next(left) - continue - elif r in l: - result.append(r) - r = next(right) - continue - if l < r: - l = next(left) - else: - r = next(right) - except StopIteration: - return IPSet(result) - - def __repr__(self): - return '%s([' % self.__class__.__name__ + ', '.join(map(repr, self.prefixes)) + '])' - - def len(self): - return sum(prefix.len() for prefix in self.prefixes) - - def add(self, value): - # Make sure it's iterable, otherwise wrap. - if not isinstance(value, collections.Iterable): - value = [value] - - # Check type. - for prefix in value: - if not isinstance(prefix, IP): - raise ValueError('Only IP objects can be added to an IPSet') - - # Append and optimize. - self.prefixes.extend(value) - self.optimize() - - def discard(self, value): - # Make sure it's iterable, otherwise wrap. - if not isinstance(value, collections.Iterable): - value = [value] - - # This is much faster than iterating over the addresses. - if isinstance(value, IPSet): - value = value.prefixes - - # Remove - for del_prefix in value: - if not isinstance(del_prefix, IP): - raise ValueError('Only IP objects can be removed from an IPSet') - - # First check if this prefix contains anything in our list. - found = False - d = 0 - for i in range(len(self.prefixes)): - if self.prefixes[i - d] in del_prefix: - self.prefixes.pop(i - d) - d = d + 1 - found = True - - if found: - # If the prefix was bigger than an existing prefix, then it's - # certainly not a subset of one, so skip the rest. - continue - - # Maybe one of our prefixes contains this prefix. - found = False - for i in range(len(self.prefixes)): - if del_prefix in self.prefixes[i]: - self.prefixes[i:i+1] = self.prefixes[i] - del_prefix - break - - self.optimize() - - def isdisjoint(self, other): - left = iter(self.prefixes) - right = iter(other.prefixes) - try: - l = next(left) - r = next(right) - while True: - if l in r or r in l: - return False - if l < r: - l = next(left) - else: - r = next(right) - except StopIteration: - return True - - def optimize(self): - # The algorithm below *depends* on the sort order. - self.prefixes.sort() - - # First eliminate all values that are a subset of other values. - addrlen = len(self.prefixes) - i = 0 - while i < addrlen: - # Everything that might be inside this prefix follows directly behind it. - j = i+1 - while j < addrlen and self.prefixes[j] in self.prefixes[i]: - # Mark for deletion by overwriting with None. - self.prefixes[j] = None - j += 1 - - # Continue where we left off. - i = j - - # Try to merge as many prefixes as possible. - run_again = True - while run_again: - # Filter None values. This happens when a subset is eliminated - # above, or when two prefixes are merged below. - self.prefixes = [a for a in self.prefixes if a is not None] - - # We'll set run_again to True when we make changes that require - # re-evaluation of the whole list. - run_again = False - - # We can merge two prefixes that have the same version, same - # prefix length and differ only on the last bit of the prefix. - addrlen = len(self.prefixes) - i = 0 - while i < addrlen-1: - j = i + 1 - - try: - # The next line will throw an exception when merging is not possible. - self.prefixes[i] += self.prefixes[j] - self.prefixes[j] = None - i = j + 1 - run_again = True - except ValueError: - # Can't be merged, see if position j can be merged. - i = j - - # O(n) insertion now by prefix means faster searching on __contains__ - # when lots of ranges with the same length exist. - self.prefixtable = {} - for address in self.prefixes: - try: - self.prefixtable[address._prefixlen].append(address) - except KeyError: - self.prefixtable[address._prefixlen] = [address] - -def _parseAddressIPv6(ipstr): - """ - Internal function used by parseAddress() to parse IPv6 address with ':'. - - >>> print(_parseAddressIPv6('::')) - 0 - >>> print(_parseAddressIPv6('::1')) - 1 - >>> print(_parseAddressIPv6('0:0:0:0:0:0:0:1')) - 1 - >>> print(_parseAddressIPv6('0:0:0::0:0:1')) - 1 - >>> print(_parseAddressIPv6('0:0:0:0:0:0:0:0')) - 0 - >>> print(_parseAddressIPv6('0:0:0::0:0:0')) - 0 - - >>> print(_parseAddressIPv6('FEDC:BA98:7654:3210:FEDC:BA98:7654:3210')) - 338770000845734292534325025077361652240 - >>> print(_parseAddressIPv6('1080:0000:0000:0000:0008:0800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('1080:0:0:0:8:800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('1080:0::8:800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('1080::8:800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('FF01:0:0:0:0:0:0:43')) - 338958331222012082418099330867817087043 - >>> print(_parseAddressIPv6('FF01:0:0::0:0:43')) - 338958331222012082418099330867817087043 - >>> print(_parseAddressIPv6('FF01::43')) - 338958331222012082418099330867817087043 - >>> print(_parseAddressIPv6('0:0:0:0:0:0:13.1.68.3')) - 218186755 - >>> print(_parseAddressIPv6('::13.1.68.3')) - 218186755 - >>> print(_parseAddressIPv6('0:0:0:0:0:FFFF:129.144.52.38')) - 281472855454758 - >>> print(_parseAddressIPv6('::FFFF:129.144.52.38')) - 281472855454758 - >>> print(_parseAddressIPv6('1080:0:0:0:8:800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('1080::8:800:200C:417A')) - 21932261930451111902915077091070067066 - >>> print(_parseAddressIPv6('::1:2:3:4:5:6')) - 1208962713947218704138246 - >>> print(_parseAddressIPv6('1:2:3:4:5:6::')) - 5192455318486707404433266432802816 - """ - - # Split string into a list, example: - # '1080:200C::417A' => ['1080', '200C', '417A'] and fill_pos=2 - # and fill_pos is the position of '::' in the list. - items = [] - index = 0 - fill_pos = None - while index < len(ipstr): - text = ipstr[index:] - if text.startswith("::"): - if fill_pos is not None: - # Invalid IPv6, eg. '1::2::' - raise ValueError("%r: Invalid IPv6 address: more than one '::'" % ipstr) - fill_pos = len(items) - index += 2 - continue - pos = text.find(':') - if pos == 0: - # Invalid IPv6, eg. '1::2:' - raise ValueError("%r: Invalid IPv6 address" % ipstr) - if pos != -1: - items.append(text[:pos]) - if text[pos:pos+2] == "::": - index += pos - else: - index += pos+1 - - if index == len(ipstr): - # Invalid IPv6, eg. '1::2:' - raise ValueError("%r: Invalid IPv6 address" % ipstr) - else: - items.append(text) - break - - if items and '.' in items[-1]: - # IPv6 ending with IPv4 like '::ffff:192.168.0.1' - if (fill_pos is not None) and not (fill_pos <= len(items)-1): - # Invalid IPv6: 'ffff:192.168.0.1::' - raise ValueError("%r: Invalid IPv6 address: '::' after IPv4" % ipstr) - value = parseAddress(items[-1])[0] - items = items[:-1] + ["%04x" % (value >> 16), "%04x" % (value & 0xffff)] - - # Expand fill_pos to fill with '0' - # ['1','2'] with fill_pos=1 => ['1', '0', '0', '0', '0', '0', '0', '2'] - if fill_pos is not None: - diff = 8 - len(items) - if diff <= 0: - raise ValueError("%r: Invalid IPv6 address: '::' is not needed" % ipstr) - items = items[:fill_pos] + ['0']*diff + items[fill_pos:] - - # Here we have a list of 8 strings. - if len(items) != 8: - # Invalid IPv6, eg. '1:2:3' - raise ValueError("%r: Invalid IPv6 address: should have 8 hextets" % ipstr) - - # Convert strings to long integer. - value = 0 - index = 0 - for item in items: - try: - item = int(item, 16) - error = not(0 <= item <= 0xffff) - except ValueError: - error = True - if error: - raise ValueError("%r: Invalid IPv6 address: invalid hexlet %r" % (ipstr, item)) - value = (value << 16) + item - index += 1 - return value - -def parseAddress(ipstr): - """ - Parse a string and return the corresponding IP address (as integer) - and a guess of the IP version. - - Following address formats are recognized: - - >>> def testParseAddress(address): - ... ip, version = parseAddress(address) - ... print(("%s (IPv%s)" % (ip, version))) - ... - >>> testParseAddress('0x0123456789abcdef') # IPv4 if <= 0xffffffff else IPv6 - 81985529216486895 (IPv6) - >>> testParseAddress('123.123.123.123') # IPv4 - 2071690107 (IPv4) - >>> testParseAddress('123.123') # 0-padded IPv4 - 2071658496 (IPv4) - >>> testParseAddress('127') - 2130706432 (IPv4) - >>> testParseAddress('255') - 4278190080 (IPv4) - >>> testParseAddress('256') - 256 (IPv4) - >>> testParseAddress('108000000000000000080800200C417A') - 21932261930451111902915077091070067066 (IPv6) - >>> testParseAddress('0x108000000000000000080800200C417A') - 21932261930451111902915077091070067066 (IPv6) - >>> testParseAddress('1080:0000:0000:0000:0008:0800:200C:417A') - 21932261930451111902915077091070067066 (IPv6) - >>> testParseAddress('1080:0:0:0:8:800:200C:417A') - 21932261930451111902915077091070067066 (IPv6) - >>> testParseAddress('1080:0::8:800:200C:417A') - 21932261930451111902915077091070067066 (IPv6) - >>> testParseAddress('::1') - 1 (IPv6) - >>> testParseAddress('::') - 0 (IPv6) - >>> testParseAddress('0:0:0:0:0:FFFF:129.144.52.38') - 281472855454758 (IPv6) - >>> testParseAddress('::13.1.68.3') - 218186755 (IPv6) - >>> testParseAddress('::FFFF:129.144.52.38') - 281472855454758 (IPv6) - """ - - try: - hexval = int(ipstr, 16) - except ValueError: - hexval = None - try: - intval = int(ipstr, 10) - except ValueError: - intval = None - - if ipstr.startswith('0x') and hexval is not None: - if hexval > MAX_IPV6_ADDRESS: - raise ValueError("IP Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, hexval)) - if hexval <= MAX_IPV4_ADDRESS: - return (hexval, 4) - else: - return (hexval, 6) - - if ipstr.find(':') != -1: - return (_parseAddressIPv6(ipstr), 6) - - elif len(ipstr) == 32 and hexval is not None: - # Assume IPv6 in pure hexadecimal notation. - return (hexval, 6) - - elif ipstr.find('.') != -1 or (intval is not None and intval < 256): - # Assume IPv4 ('127' gets interpreted as '127.0.0.0'). - bytes = ipstr.split('.') - if len(bytes) > 4: - raise ValueError("IPv4 Address with more than 4 bytes") - bytes += ['0'] * (4 - len(bytes)) - bytes = [int(x) for x in bytes] - for x in bytes: - if x > 255 or x < 0: - raise ValueError("%r: single byte must be 0 <= byte < 256" % (ipstr)) - return ((bytes[0] << 24) + (bytes[1] << 16) + (bytes[2] << 8) + bytes[3], 4) - - elif intval is not None: - # We try to interprete it as a decimal digit - - # this ony works for numbers > 255 ... others - # will be interpreted as IPv4 first byte. - if intval > MAX_IPV6_ADDRESS: - raise ValueError("IP Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, intval)) - if intval <= MAX_IPV4_ADDRESS: - return (intval, 4) - else: - return (intval, 6) - - raise ValueError("IP Address format was invalid: %s" % ipstr) - - -def intToIp(ip, version): - """Transform an integer string into an IP address.""" - - # Just to be sure and hoping for Python 2.2. - ip = int(ip) - - if ip < 0: - raise ValueError("IPs can't be negative: %d" % (ip)) - - ret = '' - if version == 4: - if ip > MAX_IPV4_ADDRESS: - raise ValueError("IPv4 Address can't be larger than %x: %x" % (MAX_IPV4_ADDRESS, ip)) - for l in xrange(4): - ret = str(ip & 0xff) + '.' + ret - ip = ip >> 8 - ret = ret[:-1] - elif version == 6: - if ip > MAX_IPV6_ADDRESS: - raise ValueError("IPv6 Address can't be larger than %x: %x" % (MAX_IPV6_ADDRESS, ip)) - l = "%032x" % ip - for x in xrange(1, 33): - ret = l[-x] + ret - if x % 4 == 0: - ret = ':' + ret - ret = ret[1:] - else: - raise ValueError("only IPv4 and IPv6 supported") - - return ret - -def _ipVersionToLen(version): - """Return number of bits in address for a certain IP version. - - >>> _ipVersionToLen(4) - 32 - >>> _ipVersionToLen(6) - 128 - >>> _ipVersionToLen(5) - Traceback (most recent call last): - File "", line 1, in ? - File "IPy.py", line 1076, in _ipVersionToLen - raise ValueError("only IPv4 and IPv6 supported") - ValueError: only IPv4 and IPv6 supported - """ - - if version == 4: - return 32 - elif version == 6: - return 128 - else: - raise ValueError("only IPv4 and IPv6 supported") - - -def _countFollowingZeros(l): - """Return number of elements containing 0 at the beginning of the list.""" - if len(l) == 0: - return 0 - elif l[0] != 0: - return 0 - else: - return 1 + _countFollowingZeros(l[1:]) - - -_BitTable = {'0': '0000', '1': '0001', '2': '0010', '3': '0011', - '4': '0100', '5': '0101', '6': '0110', '7': '0111', - '8': '1000', '9': '1001', 'a': '1010', 'b': '1011', - 'c': '1100', 'd': '1101', 'e': '1110', 'f': '1111'} - -def _intToBin(val): - """Return the binary representation of an integer as string.""" - - if val < 0: - raise ValueError("Only positive values allowed") - s = "%x" % val - ret = '' - for x in s: - ret += _BitTable[x] - # remove leading zeros - while ret[0] == '0' and len(ret) > 1: - ret = ret[1:] - return ret - -def _count1Bits(num): - """Find the highest bit set to 1 in an integer.""" - ret = 0 - while num > 0: - num = num >> 1 - ret += 1 - return ret - -def _count0Bits(num): - """Find the highest bit set to 0 in an integer.""" - - # This could be so easy if _count1Bits(~int(num)) would work as excepted. - num = int(num) - if num < 0: - raise ValueError("Only positive Numbers please: %s" % (num)) - ret = 0 - while num > 0: - if num & 1 == 1: - break - num = num >> 1 - ret += 1 - return ret - - -def _checkPrefix(ip, prefixlen, version): - """Check the validity of a prefix - - Checks if the variant part of a prefix only has 0s, and the length is - correct. - - >>> _checkPrefix(0x7f000000, 24, 4) - 1 - >>> _checkPrefix(0x7f000001, 24, 4) - 0 - >>> repr(_checkPrefix(0x7f000001, -1, 4)) - 'None' - >>> repr(_checkPrefix(0x7f000001, 33, 4)) - 'None' - """ - - # TODO: unify this v4/v6/invalid code in a function - bits = _ipVersionToLen(version) - - if prefixlen < 0 or prefixlen > bits: - return None - - if ip == 0: - zbits = bits + 1 - else: - zbits = _count0Bits(ip) - if zbits < bits - prefixlen: - return 0 - else: - return 1 - - -def _checkNetmask(netmask, masklen): - """Checks if a netmask is expressable as a prefixlen.""" - - num = int(netmask) - bits = masklen - - # Remove zero bits at the end. - while (num & 1) == 0 and bits != 0: - num = num >> 1 - bits -= 1 - if bits == 0: - break - # Now check if the rest consists only of ones. - while bits > 0: - if (num & 1) == 0: - raise ValueError("Netmask 0x%x can't be expressed as an prefix." % netmask) - num = num >> 1 - bits -= 1 - - -def _checkNetaddrWorksWithPrefixlen(net, prefixlen, version): - """Check if a base addess of a network is compatible with a prefixlen""" - try: - return (net & _prefixlenToNetmask(prefixlen, version) == net) - except ValueError: - return False - - -def _netmaskToPrefixlen(netmask): - """Convert an Integer representing a netmask to a prefixlen. - - E.g. 0xffffff00 (255.255.255.0) returns 24 - """ - - netlen = _count0Bits(netmask) - masklen = _count1Bits(netmask) - _checkNetmask(netmask, masklen) - return masklen - netlen - - -def _prefixlenToNetmask(prefixlen, version): - """Return a mask of n bits as a long integer. - - From 'IP address conversion functions with the builtin socket module' - by Alex Martelli - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66517 - """ - if prefixlen == 0: - return 0 - elif prefixlen < 0: - raise ValueError("Prefixlen must be > 0") - return ((2< 0: - print(f'\tSearching through {num} results') - link = self.links[num] - req = requests.get(link, headers=headers) - self.results = req.text - if search(self.results): - time.sleep(getDelay() * 5) # Sleep for a longer time. - else: - time.sleep(getDelay()) - self.totalresults += self.results - except Exception as e: - print(f'\tException Occurred {e}') diff --git a/discovery/huntersearch.py b/discovery/huntersearch.py deleted file mode 100644 index b973327b..00000000 --- a/discovery/huntersearch.py +++ /dev/null @@ -1,42 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import myparser -import requests - - -class SearchHunter: - - def __init__(self, word, limit, start): - self.word = word - self.limit = 100 - self.start = start - self.key = Core.hunter_key() - if self.key is None: - raise MissingKey(True) - self.results = "" - self.totalresults = "" - self.counter = start - self.database = "https://api.hunter.io/v2/domain-search?domain=" + word + "&api_key=" + self.key + "&limit=" + str(self.limit) - - def do_search(self): - try: - r = requests.get(self.database) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def process(self): - self.do_search() # Only need to do it once. - - def get_emails(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.emails() - - def get_hostnames(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames() - - def get_profiles(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.profiles() diff --git a/discovery/intelxsearch.py b/discovery/intelxsearch.py deleted file mode 100644 index a04f1395..00000000 --- a/discovery/intelxsearch.py +++ /dev/null @@ -1,56 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import intelxparser -import requests -import time - - -class SearchIntelx: - - def __init__(self, word, limit): - self.word = word - # default key is public key - self.key = Core.intelx_key() - if self.key is None: - raise MissingKey(True) - self.database = 'https://public.intelx.io/' - self.results = None - self.info = () - self.limit = limit - - def do_search(self): - try: - user_agent = Core.get_user_agent() - headers = {'User-Agent': user_agent, 'x-key': self.key} - # data is json that corresponds to what we are searching for, sort:2 means sort by most relevant - data = f'{{"term": "{self.word}", "maxresults": {self.limit}, "media": 0, "sort": 2 , "terminate": []}}' - r = requests.post(f'{self.database}phonebook/search', data=data, headers=headers) - - if r.status_code == 400: - raise Exception('Invalid json was passed in.') - time.sleep(1) - - # grab uuid to send get request to fetch data - uuid = r.json()['id'] - url = f'{self.database}phonebook/search/result?id={uuid}&offset=0&limit={self.limit}' - r = requests.get(url, headers=headers) - time.sleep(1) - - # TODO: add in future grab status from r.text and check if more results can be gathered - if r.status_code != 200: - raise Exception('Error occurred while searching intelx.') - self.results = r.json() - except Exception as e: - print(f'An exception has occurred: {e}') - - def process(self): - self.do_search() - intelx_parser = intelxparser.Parser() - self.info = intelx_parser.parse_dictionaries(self.results) - # Create parser and set self.info to tuple returned from parsing text. - - def get_emails(self): - return self.info[0] - - def get_hostnames(self): - return self.info[1] diff --git a/discovery/linkedinsearch.py b/discovery/linkedinsearch.py deleted file mode 100644 index dce71807..00000000 --- a/discovery/linkedinsearch.py +++ /dev/null @@ -1,42 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import myparser -import requests -import time - - -class SearchLinkedin: - - def __init__(self, word, limit): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'www.google.com' - self.userAgent = '(Mozilla/5.0 (Windows; U; Windows NT 6.0;en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6' - self.quantity = '100' - self.limit = int(limit) - self.counter = 0 - - def do_search(self): - try: - urly = 'http://' + self.server + '/search?num=100&start=' + str(self.counter) + '&hl=en&meta=&q=site%3Alinkedin.com/in%20' + self.word - except Exception as e: - print(e) - try: - headers = {'User-Agent': Core.get_user_agent()} - r = requests.get(urly, headers=headers) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def get_people(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.people_linkedin() - - def process(self): - while self.counter < self.limit: - self.do_search() - time.sleep(getDelay()) - self.counter += 100 - print(f'\tSearching {self.counter} results.') diff --git a/discovery/netcraft.py b/discovery/netcraft.py deleted file mode 100644 index 036336b7..00000000 --- a/discovery/netcraft.py +++ /dev/null @@ -1,72 +0,0 @@ -from lib.core import * -from parsers import myparser -import requests -import hashlib -import urllib.parse as urllib -import re - -class SearchNetcraft: - # this module was inspired by sublist3r's netcraft module - - def __init__(self, word): - self.word = word.replace(' ', '%20') - self.totalresults = "" - self.server = 'netcraft.com' - self.base_url = 'https://searchdns.netcraft.com/?restriction=site+ends+with&host={domain}' - self.session = requests.session() - self.headers = { - 'User-Agent': Core.get_user_agent() - } - self.timeout = 25 - self.domain = f"https://searchdns.netcraft.com/?restriction=site+ends+with&host={self.word}" - - def request(self, url, cookies=None): - cookies = cookies or {} - try: - resp = self.session.get(url, headers=self.headers, timeout=self.timeout, cookies=cookies) - except Exception as e: - print(e) - resp = None - return resp - - def get_next(self, resp): - link_regx = re.compile('Next page') - link = link_regx.findall(resp) - link = re.sub(f'host=.*?{self.word}', f'host={self.domain}', link[0]) - url = f'http://searchdns.netcraft.com{link}' - return url - - def create_cookies(self, cookie): - cookies = dict() - cookies_list = cookie[0:cookie.find(';')].split("=") - cookies[cookies_list[0]] = cookies_list[1] - # get js verification response - cookies['netcraft_js_verification_response'] = hashlib.sha1( - urllib.unquote(cookies_list[1]).encode('utf-8')).hexdigest() - return cookies - - def get_cookies(self, headers): - if 'set-cookie' in headers: - cookies = self.create_cookies(headers['set-cookie']) - else: - cookies = {} - return cookies - - def do_search(self): - start_url = self.base_url - resp = self.request(start_url) - cookies = self.get_cookies(resp.headers) - url = self.base_url.format(domain="yale.edu") - while True: - resp = self.request(url, cookies).text - self.totalresults += resp - if 'Next page' not in resp or resp is None: - break - url = self.get_next(resp) - - def get_hostnames(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames() - - def process(self): - self.do_search() \ No newline at end of file diff --git a/discovery/port_scanner.py b/discovery/port_scanner.py deleted file mode 100644 index 6d94cf45..00000000 --- a/discovery/port_scanner.py +++ /dev/null @@ -1,32 +0,0 @@ -import socket -import threading - - -class PortScan: - - def __init__(self, host, ports): - self.threads = 25 - self.host = host - self.ports = ports - self.lock = threading.BoundedSemaphore(value=self.threads) - - def port_scanner(self, host, ports): - openports = [] - self.lock.acquire() - for port in ports: - try: - connect = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - connect.settimeout(2) - result = connect.connect_ex((host, int(port))) - if result == 0: - openports.append(port) - connect.close() - except Exception as e: - print(e) - pass - self.lock.release() - return openports - - def process(self): - ports = self.port_scanner(self.host, self.ports) - return ports diff --git a/discovery/s3_scanner.py b/discovery/s3_scanner.py deleted file mode 100644 index 5e95c307..00000000 --- a/discovery/s3_scanner.py +++ /dev/null @@ -1,46 +0,0 @@ -import re -import requests - - -class s3_scanner: - - def __init__(self, host): - self.host = host - self.results = "" - self.totalresults = "" - self.fingerprints = ['www.herokucdn.com/error-pages/no-such-app.html', 'Squarespace - No Such Account', "

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

","

If you\'re trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

","Bummer. It looks like the help center that you are trying to reach no longer exists."," The page you\'re looking for could not be found (404) "] - - def __check_http(self, bucket_url): - check_response = self.session.head( - S3_URL, timeout=3, headers={'Host': bucket_url}) - -# if not ARGS.ignore_rate_limiting\ -# and (check_response.status_code == 503 and check_response.reason == 'Slow Down'): -# self.q.rate_limited = True - # Add it back to the bucket for re-processing. -# self.q.put(bucket_url) - if check_response.status_code == 307: # valid bucket, lets check if its public - new_bucket_url = check_response.headers['Location'] - bucket_response = requests.request( - 'GET' if ARGS.only_interesting else 'HEAD', new_bucket_url, timeout=3) - - if bucket_response.status_code == 200\ - and (not ARGS.only_interesting or - (ARGS.only_interesting and any(keyword in bucket_response.text for keyword in KEYWORDS))): - print(f"Found bucket '{new_bucket_url}'") - self.__log(new_bucket_url) - - def do_s3(self): - try: - print('\t Searching takeovers for ' + self.host) - r = requests.get('https://' + self.host, verify=False) - for x in self.fingerprints: - take_reg = re.compile(x) - self.temp = take_reg.findall(r.text) - if self.temp != []: - print('\t\033[91m Takeover detected! - ' + self.host + '\033[1;32;40m') - except Exception as e: - print(e) - - def process(self): - self.do_take() diff --git a/discovery/securitytrailssearch.py b/discovery/securitytrailssearch.py deleted file mode 100644 index 0c78f5c0..00000000 --- a/discovery/securitytrailssearch.py +++ /dev/null @@ -1,62 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import securitytrailsparser -import requests -import sys -import time - - -class search_securitytrail: - - def __init__(self, word): - self.word = word - self.key = Core.security_trails_key() - if self.key is None: - raise MissingKey(True) - self.results = "" - self.totalresults = "" - self.database = "https://api.securitytrails.com/v1/" - self.info = () - - def authenticate(self): - # Method to authenticate API key before sending requests. - headers = {'APIKEY': self.key} - url = self.database + 'ping' - r = requests.get(url, headers=headers).text - if 'False' in r or 'Invalid authentication' in r: - print('\tKey could not be authenticated exiting program.') - sys.exit(-2) - time.sleep(2) - - def do_search(self): - url = '' - headers = {} - try: - # https://api.securitytrails.com/v1/domain/domain.com - url = self.database + 'domain/' + self.word - headers = {'APIKEY': self.key} - r = requests.get(url, headers=headers) - time.sleep(2) # Not random delay because 2 seconds is required due to rate limit. - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - url += '/subdomains' # Get subdomains now. - r = requests.get(url, headers=headers) - time.sleep(2) - self.results = r.text - self.totalresults += self.results - - def process(self): - self.authenticate() - self.do_search() - parser = securitytrailsparser.Parser(word=self.word, text=self.totalresults) - self.info = parser.parse_text() - # Create parser and set self.info to tuple returned from parsing text. - print('\tDone Searching Results') - - def get_ips(self): - return self.info[0] - - def get_hostnames(self): - return self.info[1] diff --git a/discovery/shodansearch.py b/discovery/shodansearch.py deleted file mode 100644 index 634c49e7..00000000 --- a/discovery/shodansearch.py +++ /dev/null @@ -1,43 +0,0 @@ -from discovery.constants import * -from lib.core import * -from shodan import exception -from shodan import Shodan - - -class SearchShodan: - - def __init__(self): - self.key = Core.shodan_key() - if self.key is None: - raise MissingKey(True) - self.api = Shodan(self.key) - self.hostdatarow = [] - - def search_ip(self, ip): - try: - ipaddress = ip - results = self.api.host(ipaddress) - technologies = [] - servicesports = [] - for result in results['data']: - try: - for key in result['http']['components'].keys(): - technologies.append(key) - except KeyError: - pass - port = str(result.get('port')) - product = str(result.get('product')) - servicesports.append(str(product)+':'+str(port)) - technologies = list(set(technologies)) - self.hostdatarow = [ - str(results.get('ip_str')), str(results.get('hostnames')).strip('[]\''), - str(results.get('org')), str(servicesports).replace('\'', '').strip('[]'), - str(technologies).replace('\'', '').strip('[]')] - except exception.APIError: - print(f'{ipaddress}: Not in Shodan') - self.hostdatarow = [ipaddress, "Not in Shodan", "Not in Shodan", "Not in Shodan", "Not in Shodan"] - - except Exception as e: - print(f'Error occurred in the Shodan IP search module: {e}') - finally: - return self.hostdatarow diff --git a/discovery/takeover.py b/discovery/takeover.py deleted file mode 100644 index 3a3979d1..00000000 --- a/discovery/takeover.py +++ /dev/null @@ -1,44 +0,0 @@ -import re -import requests - - -class take_over: - - def __init__(self, host): - self.host = host - self.results = "" - self.totalresults = "" - self.fingerprints = ["Squarespace - Domain Not Claimed", - 'www.herokucdn.com/error-pages/no-such-app.html', - 'Squarespace - No Such Account', - "

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", - "

If you\'re trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", - "Bummer. It looks like the help center that you are trying to reach no longer exists.", - " The page you\'re looking for could not be found (404) ", - 'The specified bucket does not exist', - 'Bad Request: ERROR: The request could not be satisfied', - 'Fastly error: unknown domain:', - "There isn't a Github Pages site here.", - 'No such app', - 'Unrecognized domain', - 'Sorry, this shop is currently unavailable.', - "Whatever you were looking for doesn't currently exist at this address", - 'The requested URL was not found on this server.', - 'This UserVoice subdomain is currently available!', - 'Do you want to register *.wordpress.com?', - 'Help Center Closed'] - - def do_take(self): - try: - print('\t Searching takeovers for ' + self.host) - r = requests.get('https://' + self.host, verify=False) - for x in self.fingerprints: - take_reg = re.compile(x) - self.temp = take_reg.findall(r.text) - if self.temp != []: - print(f'\t\033[91m Takeover detected! - {self.host} \033[1;32;40m') - except Exception as e: - print(e) - - def process(self): - self.do_take() diff --git a/discovery/threatcrowd.py b/discovery/threatcrowd.py deleted file mode 100644 index e9620ddd..00000000 --- a/discovery/threatcrowd.py +++ /dev/null @@ -1,36 +0,0 @@ -from lib.core import * -from parsers import myparser -import requests - - -class search_threatcrowd: - - def __init__(self, word): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'www.google.com' - self.hostname = 'www.google.com' - self.quantity = '100' - self.counter = 0 - - def do_search(self): - try: - urly = 'https://www.threatcrowd.org/searchApi/v2/domain/report/?domain=' + self.word - except Exception as e: - print(e) - headers = {'User-Agent': Core.get_user_agent()} - try: - r = requests.get(urly, headers=headers) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def get_hostnames(self): - rawres = myparser.Parser(self.results, self.word) - return rawres.hostnames() - - def process(self): - self.do_search() - print('\tSearching results.') diff --git a/discovery/trello.py b/discovery/trello.py deleted file mode 100644 index 198e2d84..00000000 --- a/discovery/trello.py +++ /dev/null @@ -1,61 +0,0 @@ -from discovery.constants import * -from parsers import myparser -import requests -import time - - -class search_trello: - - def __init__(self, word, limit): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'www.google.com' - self.hostname = 'www.google.com' - self.quantity = '100' - self.limit = limit - self.counter = 0 - - def do_search(self): - try: - urly = 'https://' + self.server + '/search?num=100&start=' + str( - self.counter) + '&hl=en&q=site%3Atrello.com%20' + self.word - except Exception as e: - print(e) - headers = {'User-Agent': googleUA} - try: - r = requests.get(urly, headers=headers) - time.sleep(getDelay()) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def get_emails(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.emails() - - def get_urls(self): - try: - rawres = myparser.Parser(self.totalresults, 'trello.com') - trello_urls = rawres.urls() - visited = set() - for url in trello_urls: - # Iterate through Trello URLs gathered and visit them, append text to totalresults. - if url not in visited: # Make sure visiting unique URLs. - visited.add(url) - self.totalresults += requests.get(url=url, headers={'User-Agent': googleUA}).text - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames(), trello_urls - except Exception as e: - print(f'Error occurred: {e}') - - def process(self): - while self.counter < self.limit: - self.do_search() - if search(self.results): - time.sleep(getDelay() * 5) - else: - time.sleep(getDelay()) - self.counter += 100 - print(f'\tSearching {self.counter} results.') diff --git a/discovery/twittersearch.py b/discovery/twittersearch.py deleted file mode 100644 index 019e1fcd..00000000 --- a/discovery/twittersearch.py +++ /dev/null @@ -1,64 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import myparser -import requests -import time - - -class search_twitter: - - def __init__(self, word, limit): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'www.google.com' - self.hostname = 'www.google.com' - self.quantity = '100' - self.limit = int(limit) - self.counter = 0 - - def do_search(self): - try: - urly = 'https://' + self.server + '/search?num=100&start=' + str(self.counter) + '&hl=en&meta=&q=site%3Atwitter.com%20intitle%3A%22on+Twitter%22%20' + self.word - except Exception as e: - print(e) - headers = {'User-Agent': Core.get_user_agent()} - try: - r = requests.get(urly, headers=headers) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def get_people(self): - rawres = myparser.Parser(self.totalresults, self.word) - to_parse = rawres.people_twitter() - # fix invalid handles that look like @user other_output - handles = set() - for handle in to_parse: - handle = str(handle).strip() - if len(handle) > 2: - if ' ' in handle: - handle = handle.split(' ')[0] - # strip off period at the end if exists - if handle[len(handle) - 1] == '.': - handle = handle[:len(handle) - 1] - # strip periods if contains three of them - if '...' in handle: - handle = handle[:handle.index('.')] - if '-' == handle[0]: - handle = handle[1:] - if '-' == handle[1]: - handle = handle[0] + handle[2:] - handles.add(handle) - if '@' in handles: - handles.remove('@') - - return handles - - def process(self): - while self.counter < self.limit: - self.do_search() - time.sleep(getDelay()) - self.counter += 100 - print(f'\tSearching {self.counter} results.') diff --git a/discovery/virustotal.py b/discovery/virustotal.py deleted file mode 100644 index 832d7362..00000000 --- a/discovery/virustotal.py +++ /dev/null @@ -1,36 +0,0 @@ -from lib.core import * -from parsers import myparser -import requests - - -class SearchVirustotal: - - def __init__(self, word): - self.word = word.replace(' ', '%20') - self.results = "" - self.totalresults = "" - self.server = 'www.google.com' - self.hostname = 'www.google.com' - self.quantity = '100' - self.counter = 0 - - def do_search(self): - try: - urly = 'https://www.virustotal.com/en/domain/' + self.word + '/information/' - except Exception as e: - print(e) - headers = {'User-Agent': Core.get_user_agent()} - try: - r = requests.get(urly, headers=headers) - except Exception as e: - print(e) - self.results = r.text - self.totalresults += self.results - - def get_hostnames(self): - rawres = myparser.Parser(self.results, self.word) - return rawres.hostnames() - - def process(self): - self.do_search() - print('\tSearching results.') diff --git a/discovery/wfuzz_search.py b/discovery/wfuzz_search.py deleted file mode 100644 index 6516f8ff..00000000 --- a/discovery/wfuzz_search.py +++ /dev/null @@ -1,32 +0,0 @@ -try: - import wfuzz -except ImportError as e: - pass - - -class search_wfuzz: - - def __init__(self, host): - self.host = host - self.results = "" - self.totalresults = "" - - def do_search(self): - print('elo') - try: - for r in wfuzz.fuzz(url='https://'+self.host+'/FUZZ', hc=[404], payloads=[('file', dict(fn='wordlists/general/common.txt'))]): - print(r) - self.results += r - except Exception as e: - print(e) - self.totalresults += self.results - - def get_results(self): - return self.totalresults - - def do_check(self): - return - - def process(self): - self.do_search() - print('\tSearching Wfuzz') diff --git a/discovery/yahoosearch.py b/discovery/yahoosearch.py deleted file mode 100644 index 72931b13..00000000 --- a/discovery/yahoosearch.py +++ /dev/null @@ -1,49 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import myparser -import requests -import time - - -class search_yahoo: - - def __init__(self, word, limit): - self.word = word - self.total_results = "" - self.server = 'search.yahoo.com' - self.hostname = 'search.yahoo.com' - self.limit = limit - self.counter = 0 - - def do_search(self): - url = 'http://' + self.server + '/search?p=\"%40' + self.word + '\"&b=' + str(self.counter) + '&pz=10' - headers = { - 'Host': self.hostname, - 'User-agent': Core.get_user_agent() - } - h = requests.get(url=url, headers=headers) - self.total_results += h.text - - def process(self): - while self.counter <= self.limit and self.counter <= 1000: - self.do_search() - time.sleep(getDelay()) - print(f'\tSearching {self.counter} results.') - self.counter += 10 - - def get_emails(self): - rawres = myparser.Parser(self.total_results, self.word) - toparse_emails = rawres.emails() - emails = set() - # strip out numbers and dashes for emails that look like xxx-xxx-xxxemail@host.tld - for email in toparse_emails: - email = str(email) - if '-' in email and email[0].isdigit() and email.index('-') <= 9: - while email[0] == '-' or email[0].isdigit(): - email = email[1:] - emails.add(email) - return list(emails) - - def get_hostnames(self): - rawres = myparser.Parser(self.total_results, self.word) - return rawres.hostnames() diff --git a/discovery/yandexsearch.py b/discovery/yandexsearch.py deleted file mode 100644 index 7ce5f3ea..00000000 --- a/discovery/yandexsearch.py +++ /dev/null @@ -1,73 +0,0 @@ -from discovery.constants import * -from lib.core import * -from parsers import myparser -import re -import requests -import time - - -class search_yandex: - - def __init__(self, word, limit, start): - self.word = word - self.results = "" - self.totalresults = "" - self.server = 'yandex.com' - self.hostname = 'yandex.com' - self.limit = limit - self.counter = start - - def do_search(self): - url = 'http://' + self.server + '/search?text=%40' + self.word + '&numdoc=50&lr=' + str(self.counter) - headers = { - 'Host': self.hostname, - 'User-agent': Core.get_user_agent() - } - h = requests.get(url=url, headers=headers) - self.results = h.text - self.totalresults += self.results - print(self.results) - - def do_search_files(self, files): # TODO - url = 'http://' + self.server + '/search?text=%40' + self.word + '&numdoc=50&lr=' + str(self.counter) - headers = { - 'Host': self.hostname, - 'User-agent': Core.get_user_agent() - } - h = requests.get(url=url, headers=headers) - self.results = h.text - self.totalresults += self.results - - def check_next(self): - renext = re.compile('topNextUrl') - nextres = renext.findall(self.results) - if nextres != []: - nexty = '1' - print(str(self.counter)) - else: - nexty = '0' - return nexty - - def get_emails(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.emails() - - def get_hostnames(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.hostnames() - - def get_files(self): - rawres = myparser.Parser(self.totalresults, self.word) - return rawres.fileurls(self.files) # self.files is not init? - - def process(self): - while self.counter <= self.limit: - self.do_search() - self.counter += 50 - print(f'Searching {self.counter} results.') - - def process_files(self, files): - while self.counter < self.limit: - self.do_search_files(files) - time.sleep(getDelay()) - self.counter += 50 From 1f628e68e8475706ffb8f8a35208c8975005a2ab Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 16:36:00 -0400 Subject: [PATCH 12/16] Removed unused directory. --- lib/__init__.py | 1 - lib/core.py | 561 --- lib/graphs.py | 744 --- lib/hostchecker.py | 25 - lib/htmlExport.py | 167 - lib/ip-ranges.json | 8978 ------------------------------------ lib/markup.py | 559 --- lib/port_scanner.py | 0 lib/reportgraph.py | 96 - lib/resolvers.txt | 2016 -------- lib/stash.py | 291 -- lib/statichtmlgenerator.py | 176 - 12 files changed, 13614 deletions(-) delete mode 100644 lib/__init__.py delete mode 100644 lib/core.py delete mode 100644 lib/graphs.py delete mode 100644 lib/hostchecker.py delete mode 100644 lib/htmlExport.py delete mode 100644 lib/ip-ranges.json delete mode 100644 lib/markup.py delete mode 100644 lib/port_scanner.py delete mode 100644 lib/reportgraph.py delete mode 100644 lib/resolvers.txt delete mode 100644 lib/stash.py delete mode 100644 lib/statichtmlgenerator.py diff --git a/lib/__init__.py b/lib/__init__.py deleted file mode 100644 index 24fa6550..00000000 --- a/lib/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['markup', 'graphs', 'hostchecker'] diff --git a/lib/core.py b/lib/core.py deleted file mode 100644 index b5e5c02b..00000000 --- a/lib/core.py +++ /dev/null @@ -1,561 +0,0 @@ -# coding=utf-8 - -import random -import yaml - - -class Core: - @staticmethod - def bing_key(): - with open('api-keys.yaml', 'r') as api_keys: - keys = yaml.safe_load(api_keys) - return keys['apikeys']['bing']['key'] - - @staticmethod - def hunter_key(): - with open('api-keys.yaml', 'r') as api_keys: - keys = yaml.safe_load(api_keys) - return keys['apikeys']['hunter']['key'] - - @staticmethod - def intelx_key(): - with open('api-keys.yaml', 'r') as api_keys: - keys = yaml.safe_load(api_keys) - return keys['apikeys']['intelx']['key'] - - @staticmethod - def security_trails_key(): - with open('api-keys.yaml', 'r') as api_keys: - keys = yaml.safe_load(api_keys) - return keys['apikeys']['securityTrails']['key'] - - @staticmethod - def shodan_key(): - with open('api-keys.yaml', 'r') as api_keys: - keys = yaml.safe_load(api_keys) - return keys['apikeys']['shodan']['key'] - - @staticmethod - def banner(): - print('\n\033[93m*******************************************************************') - print("* _ _ _ *") - print(r"* | |_| |__ ___ /\ /\__ _ _ ____ _____ ___| |_ ___ _ __ *") - print(r"* | __| _ \ / _ \ / /_/ / _` | '__\ \ / / _ \/ __| __/ _ \ '__| *") - print(r"* | |_| | | | __/ / __ / (_| | | \ V / __/\__ \ || __/ | *") - print(r"* \__|_| |_|\___| \/ /_/ \__,_|_| \_/ \___||___/\__\___|_| *") - print('* *') - print('* theHarvester 3.0.6 v380 *') - print('* Coded by Christian Martorella *') - print('* Edge-Security Research *') - print('* cmartorella@edge-security.com *') - print('* *') - print('******************************************************************* \n\n \033[0m') - - @staticmethod - def get_supportedengines(): - supportedengines = {'baidu', - 'bing', - 'bingapi', - 'censys', - 'crtsh', - 'cymon', - 'dnsdumpster', - 'dogpile', - 'duckduckgo', - 'google', - 'google-certificates', - 'hunter', - 'intelx', - 'linkedin', - 'netcraft', - 'securityTrails', - 'threatcrowd', - 'trello', - 'twitter', - 'vhost', - 'virustotal', - 'yahoo', - 'all' - } - return supportedengines - - @staticmethod - def get_user_agent(): - # User-Agents from https://github.com/tamimibrahim17/List-of-user-agents - user_agents = [ - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) chromeframe/10.0.648.205', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36', - 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101213 Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2', - 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (X11; CrOS i686 3912.101.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; chromeframe/11.0.696.57)', - 'Mozilla/5.0 (Linux; U; Android 2.3; en-us) AppleWebKit/999+ (KHTML, like Gecko) Safari/999.9', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36', - 'Opera/9.80 (X11; Linux i686; U; ja) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; ja) Opera 11.00', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', - 'Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)', - 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1', - 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.17 Safari/537.11', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.8.36217; WOW64; en-US)', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5', - 'Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/536.5 (KHTML like Gecko) Chrome/19.0.1084.56 Safari/1EA69', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10', - 'Mozilla/5.0 (Linux; U; Android 2.3.5; zh-cn; HTC_IncredibleS_S710e Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C; Tablet PC 2.0)', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36', - 'Mozilla/5.0 (X11; CrOS i686 1660.57.0) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.46 Safari/535.19', - 'Mozilla/5.0 (Windows NT 6.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01', - 'Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7)', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)', - 'Opera/9.80 (X11; Linux x86_64; U; Ubuntu/10.10 (maverick); pl) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.2; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)', - 'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.0; Trident/4.0; FBSMTWB; .NET CLR 2.0.34861; .NET CLR 3.0.3746.3218; .NET CLR 3.5.33652; msn OptimizedIE8;ENUS)', - 'Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51', - 'Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01', - 'Opera/9.80 (Windows NT 5.1; U; MRA 5.5 (build 02842); ru) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC_Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Opera/9.80 (Windows NT 6.1; U; cs) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00', - 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.7.39 Version/11.00', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8)', - 'Opera/9.80 (Windows NT 5.2; U; ru) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.1; U; nl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01', - 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)', - 'Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11', - 'Opera/9.80 (Windows NT 6.1; WOW64; U; pt) Presto/2.10.229 Version/11.62', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.14 (KHTML, like Gecko) Chrome/24.0.1292.0 Safari/537.14', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; yie8)', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; de) Presto/2.9.168 Version/11.52', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)', - 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/537.11', - 'Opera/9.80 (Windows NT 5.1; U; zh-tw) Presto/2.8.131 Version/11.10', - 'Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 3.0.04506.30)', - 'Mozilla/5.0 (Linux; U; Android 2.3.4; fr-fr; HTC Desire Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Mozilla/5.0 (Windows NT 5.1) Gecko/20100101 Firefox/14.0 Opera/12.0', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', - 'Opera/9.80 (X11; Linux i686; U; fr) Presto/2.7.62 Version/11.01', - 'Mozilla/4.0 (compatible; MSIE 8.0; X11; Linux x86_64; pl) Opera 11.00', - 'Opera/9.80 (X11; Linux i686; U; hu) Presto/2.9.168 Version/11.50', - 'Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.8.131 Version/11.10', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14', - 'Opera/9.80 (X11; Linux i686; U; it) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1207.1 Safari/537.1', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.11 Safari/535.19', - 'Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Opera/9.80 (X11; Linux i686; U; es-ES) Presto/2.8.131 Version/11.11', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; fr) Opera 11.00', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.1; SV1; .NET CLR 2.8.52393; WOW64; en-US)', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', - 'Opera/9.80 (Windows NT 5.1; U; it) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; ko-kr; LG-LU3000 Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', - 'Opera/9.80 (Windows NT 6.1; U; fi) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', - 'Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02', - 'Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; pl) Opera 11.00', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36', - 'Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; en-us; HTC_DesireS_S510e Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1', - 'Opera/9.80 (Windows NT 5.1; U; zh-sg) Presto/2.9.181 Version/12.00', - 'Opera/9.80 (Windows NT 6.1; U; en-GB) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; de) Opera 11.01', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; en) Opera 11.00', - 'Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.0 Safari/536.3', - 'Opera/9.80 (Windows NT 6.1; U; ko) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7', - 'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36', - 'Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.6.37 Version/11.00', - 'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13', - 'Mozilla/5.0 (Windows NT 6.0; U; ja; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/11.0.696.57)', - 'Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/13.0.782.215)', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.20 (KHTML, like Gecko) Chrome/19.0.1036.7 Safari/535.20', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/19.0.1047.0 Safari/535.22', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.7.58687; SLCC2; Media Center PC 5.0; Zune 3.4; Tablet PC 3.6; InfoPath.3)', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36', - 'Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36', - 'Mozilla/5.0 (X11; NetBSD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36', - 'Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/5.0 Opera 11.11', - 'Mozilla/5.0 (Macintosh; AMD Mac OS X 10_8_2) AppleWebKit/535.22 (KHTML, like Gecko) Chrome/18.6.872', - 'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)', - 'Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.0) yi; AppleWebKit/345667.12221 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/453667.1221', - 'Mozilla/1.22 (compatible; MSIE 10.0; Windows 3.1)', - 'Opera/9.80 (Windows NT 5.1; U;) Presto/2.7.62 Version/11.01', - 'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16', - 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21', - 'Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1623.0 Safari/537.36', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/4E423F', - 'Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322)', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19', - 'Opera/9.80 (Windows NT 6.1; U; sv) Presto/2.7.62 Version/11.01', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', - 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1284.0 Safari/537.13', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5', - 'Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; Tablet PC 2.0; InfoPath.3; .NET4.0C; .NET4.0E)', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)', - 'Mozilla/4.0 (Compatible; MSIE 8.0; Windows NT 5.2; Trident/6.0)', - 'Opera/12.0(Windows NT 5.2;U;en)Presto/22.9.168 Version/12.00', - 'Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36', - 'Opera/9.80 (X11; Linux x86_64; U; pl) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36', - 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.8.99 Version/11.10', - 'Opera/9.80 (Windows NT 6.0; U; en) Presto/2.7.39 Version/11.00', - 'Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC_Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari', - 'Mozilla/5.0 (Windows NT 5.1; U; pl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00', - 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.90 Safari/537.36', - 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; de) Opera 11.51', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.6 Safari/537.11', - 'Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)', - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.45 Safari/535.19', - 'Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/18.6.872.0 Safari/535.2 UNTRUSTED/1.0 3gpp-gba UNTRUSTED/1.0', - 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)', - 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36', - 'Opera/9.80 (Windows NT 6.1 x64; U; en) Presto/2.7.62 Version/11.00', - 'Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; T-Mobile myTouch 3G Slide Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1', - 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1041.0 Safari/535.21', - 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1500.55 Safari/537.36', - 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6', - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.142 Chrome/18.0.1025.142 Safari/535.19', - 'Mozilla/5.0 (Windows NT 5.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.00' - ] - return random.choice(user_agents) - - # TODO use this method when -b all is called to replace lines 383-635 in theHarvester.py - # TODO and to find the best approach of getting the word, limit, and start etc vars from - # the arguments and importing libs that are needed. - # - # @staticmethod - # def engine_all_search(): - # print(('Full harvest on ' + word)) - # all_emails = [] - # all_hosts = [] - # try: - # print('[*] Searching Baidu.') - # search = baidusearch.SearchBaidu(word, limit) - # search.process() - # all_emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'baidu') - # db.store_all(word, all_emails, 'email', 'baidu') - # except Exception: - # pass - # - # print('[*] Searching Bing.') - # bingapi = 'no' - # search = bingsearch.SearchBing(word, limit, start) - # search.process(bingapi) - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'bing') - # all_emails.extend(emails) - # all_emails = sorted(set(all_emails)) - # db.store_all(word, all_emails, 'email', 'bing') - # - # print('[*] Searching Censys.') - # from discovery import censys - # search = censys.SearchCensys(word, limit) - # search.process() - # ips = search.get_ipaddresses() - # setips = set(ips) - # uniqueips = list(setips) # Remove duplicates. - # all_ip.extend(uniqueips) - # hosts = filter(search.get_hostnames()) - # sethosts = set(hosts) - # uniquehosts = list(sethosts) # Remove duplicates. - # all_hosts.extend(uniquehosts) - # db = stash.stash_manager() - # db.store_all(word, uniquehosts, 'host', 'censys') - # db.store_all(word, uniqueips, 'ip', 'censys') - # - # print('[*] Searching CRT.sh.') - # search = crtsh.search_crtsh(word) - # search.process() - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'CRTsh') - # - # # cymon - # print('\033[94m[*] Searching Cymon. \033[0m') - # from discovery import cymon - # # Import locally or won't work. - # search = cymon.search_cymon(word) - # search.process() - # all_ip = search.get_ipaddresses() - # db = stash.stash_manager() - # db.store_all(word, all_ip, 'ip', 'cymon') - # - # print('\033[94m[*] Searching Dogpile. \033[0m') - # search = dogpilesearch.SearchDogpile(word, limit) - # search.process() - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # all_emails.extend(emails) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'email', 'dogpile') - # db.store_all(word, all_hosts, 'host', 'dogpile') - # - # print('[*] Searching DuckDuckGo.') - # from discovery import duckduckgosearch - # search = duckduckgosearch.SearchDuckDuckGo(word, limit) - # search.process() - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # all_emails.extend(emails) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'email', 'duckduckgo') - # db.store_all(word, all_hosts, 'host', 'duckduckgo') - # - # print('[*] Searching Google.') - # search = googlesearch.search_google(word, limit, start) - # search.process(google_dorking) - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_emails.extend(emails) - # db = stash.stash_manager() - # db.store_all(word, all_emails, 'email', 'google') - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'google') - # - # print('[*] Searching Google Certificate transparency report.') - # search = googlecertificates.SearchGoogleCertificates(word, limit, start) - # search.process() - # domains = filter(search.get_domains()) - # all_hosts.extend(domains) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'google-certificates') - # - # print('[*] Searching Hunter.') - # from discovery import huntersearch - # # Import locally. - # try: - # search = huntersearch.SearchHunter(word, limit, start) - # search.process() - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, hosts, 'host', 'hunter') - # all_emails.extend(emails) - # all_emails = sorted(set(all_emails)) - # db.store_all(word, all_emails, 'email', 'hunter') - # except Exception as e: - # if isinstance(e, MissingKey): - # print(e) - # else: - # pass - # - # print('\033[94m[*] Searching Linkedin. \033[0m') - # search = linkedinsearch.SearchLinkedin(word, limit) - # search.process() - # people = search.get_people() - # db = stash.stash_manager() - # db.store_all(word, people, 'name', 'linkedin') - # - # if len(people) == 0: - # print('\n[*] No users found.\n\n') - # else: - # print('\n[*] Users found: ' + str(len(people))) - # print('---------------------') - # for user in sorted(list(set(people))): - # print(user) - # - # print('[*] Searching Netcraft.') - # search = netcraft.SearchNetcraft(word) - # search.process() - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'netcraft') - # - # print('[*] Searching PGP key server.') - # try: - # search = pgpsearch.SearchPgp(word) - # search.process() - # emails = filter(search.get_emails()) - # hosts = filter(search.get_hostnames()) - # sethosts = set(hosts) - # uniquehosts = list(sethosts) # Remove duplicates. - # all_hosts.extend(uniquehosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'PGP') - # all_emails.extend(emails) - # db = stash.stash_manager() - # db.store_all(word, all_emails, 'email', 'PGP') - # except Exception: - # pass - # - # print('[*] Searching Threatcrowd.') - # try: - # search = threatcrowd.search_threatcrowd(word) - # search.process() - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'threatcrowd') - # except Exception: - # pass - # - # print('[*] Searching Trello.') - # from discovery import trello - # # Import locally or won't work. - # search = trello.search_trello(word, limit) - # search.process() - # emails = filter(search.get_emails()) - # all_emails.extend(emails) - # info = search.get_urls() - # hosts = filter(info[0]) - # trello_info = (info[1], True) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, hosts, 'host', 'trello') - # db.store_all(word, emails, 'email', 'trello') - # - # try: - # print('[*] Searching Twitter.') - # search = twittersearch.search_twitter(word, limit) - # search.process() - # people = search.get_people() - # db = stash.stash_manager() - # db.store_all(word, people, 'name', 'twitter') - # print('\nUsers from Twitter:') - # print('-------------------') - # for user in people: - # print(user) - # except Exception: - # pass - # - # print('\n[*] Virtual hosts:') - # print('------------------') - # for l in host_ip: - # search = bingsearch.SearchBing(l, limit, start) - # search.process_vhost() - # res = search.get_allhostnames() - # for x in res: - # x = re.sub(r'[[\<\/?]*[\w]*>]*', '', x) - # x = re.sub('<', '', x) - # x = re.sub('>', '', x) - # print((l + '\t' + x)) - # vhost.append(l + ':' + x) - # full.append(l + ':' + x) - # vhost = sorted(set(vhost)) - # - # print('[*] Searching VirusTotal.') - # search = virustotal.search_virustotal(word) - # search.process() - # hosts = filter(search.get_hostnames()) - # all_hosts.extend(hosts) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'virustotal') - # - # print('[*] Searching Yahoo.') - # search = yahoosearch.search_yahoo(word, limit) - # search.process() - # hosts = search.get_hostnames() - # emails = search.get_emails() - # all_hosts.extend(filter(hosts)) - # all_emails.extend(filter(emails)) - # db = stash.stash_manager() - # db.store_all(word, all_hosts, 'host', 'yahoo') - # db.store_all(word, all_emails, 'email', 'yahoo') diff --git a/lib/graphs.py b/lib/graphs.py deleted file mode 100644 index 7d82767e..00000000 --- a/lib/graphs.py +++ /dev/null @@ -1,744 +0,0 @@ -""" - +-------------------------------------------------------------------+ - | H T M L - G R A P H S (v4.8) | - | | - | Copyright Gerd Tentler www.gerd-tentler.de/tools | - | Created: Sep. 17, 2002 Last modified: Feb. 13, 2010 | - +-------------------------------------------------------------------+ - | This program may be used and hosted free of charge by anyone for | - | personal purpose as long as this copyright notice remains intact. | - | | - | Obtain permission before selling the code for this program or | - | hosting this software on a commercial website or redistributing | - | this software over the Internet or in any other medium. In all | - | cases copyright must remain intact. | - +-------------------------------------------------------------------+ - -===================================================================================================== - Example: - - import graphs - graph = graphs.BarGraph('hBar') - graph.values = [234, 125, 289, 147, 190] - print graph.create() - - Returns HTML code -===================================================================================================== -""" - -import math -import re - - -class BarGraph: - - """Creates horizontal and vertical bar graphs, progress bars, and faders.""" - - def __init__(self, type=''): - #------------------------------------------------------------------------- - # Configuration - #------------------------------------------------------------------------- - # graph type: "hBar", "vBar", "pBar", or "fader" - self.type = type and type or 'hBar' - self.values = [] # graph data: list - - # graph background color: string - self.graphBGColor = '' - # graph border: string (CSS-spec: "size style color"; doesn't work with NN4) - self.graphBorder = '' - # graph padding: integer (pixels) - self.graphPadding = 0 - - # titles: array or string with comma-separated values - self.titles = [] - self.titleColor = 'black' # title font color: string - # title background color: string - self.titleBGColor = '#C0E0FF' - # title border: string (CSS specification) - self.titleBorder = '2px groove white' - # title font family: string (CSS specification) - self.titleFont = 'Arial, Helvetica' - # title font size: integer (pixels) - self.titleSize = 12 - # title text align: "left", "center", or "right" - self.titleAlign = 'center' - # title padding: integer (pixels) - self.titlePadding = 2 - - # label names: list or string with comma-separated values - self.labels = [] - self.labelColor = 'black' # label font color: string - # label background color: string - self.labelBGColor = '#C0E0FF' - # label border: string (CSS-spec: "size style color"; doesn't work with - # NN4) - self.labelBorder = '2px groove white' - # label font family: string (CSS-spec) - self.labelFont = 'Arial, Helvetica' - # label font size: integer (pixels) - self.labelSize = 12 - # label text align: "left", "center", or "right" - self.labelAlign = 'center' - # additional space between labels: integer (pixels) - self.labelSpace = 0 - - self.barWidth = 20 # bar width: integer (pixels) - # bar length ratio: float (from 0.1 to 2.9) - self.barLength = 1.0 - # bar colors OR bar images: list or string with comma-separated values - self.barColors = [] - # bar background color: string - self.barBGColor = '' - # bar border: string (CSS-spec: "size style color"; doesn't work with NN4) - self.barBorder = '2px outset white' - # bar level colors: ascending list (bLevel, bColor[,...]); draw bars >= bLevel with bColor - self.barLevelColors = [] - - # show values: 0 = % only, 1 = abs. and %, 2 = abs. only, 3 = none - self.showValues = 0 - # base value: integer or float (only hBar and vBar) - self.baseValue = 0 - - # abs. values font color: string - self.absValuesColor = 'black' - # abs. values background color: string - self.absValuesBGColor = '#C0E0FF' - # abs. values border: string (CSS-spec: "size style color"; doesn't work with NN4) - self.absValuesBorder = '2px groove white' - # abs. values font family: string (CSS-spec) - self.absValuesFont = 'Arial, Helvetica' - # abs. values font size: integer (pixels) - self.absValuesSize = 12 - # abs. values prefix: string (e.g. "$") - self.absValuesPrefix = '' - # abs. values suffix: string (e.g. " kg") - self.absValuesSuffix = '' - - # perc. values font color: string - self.percValuesColor = 'black' - # perc. values font family: string (CSS-spec) - self.percValuesFont = 'Arial, Helvetica' - # perc. values font size: integer (pixels) - self.percValuesSize = 12 - # perc. values number of decimals: integer - self.percValuesDecimals = 0 - - self.charts = 1 # number of charts: integer - - # hBar/vBar only: - # legend items: list or string with comma-separated values - self.legend = [] - self.legendColor = 'black' # legend font color: string - # legend background color: string - self.legendBGColor = '#F0F0F0' - # legend border: string (CSS-spec: "size style color"; doesn't work with NN4) - self.legendBorder = '2px groove white' - # legend font family: string (CSS-spec) - self.legendFont = 'Arial, Helvetica' - # legend font size: integer (pixels) - self.legendSize = 12 - # legend vertical align: "top", "center", "bottom" - self.legendAlign = 'top' - - # debug mode: 0 = off, 1 = on; just views some extra information - self.debug = 0 - #------------------------------------------------------------------------- - - # Default bar colors; only used if barColors isn't set. - __colors = ( - '#0000FF', - '#FF0000', - '#00E000', - '#A0A0FF', - '#FFA0A0', - '#00A000') - - # Error messages. - __err_type = 'ERROR: Type must be "hBar", "vBar", "pBar", or "fader"' - - # CSS names (don't change). - __cssGRAPH = '' - __cssBAR = '' - __cssBARBG = '' - __cssTITLE = '' - __cssLABEL = '' - __cssLABELBG = '' - __cssLEGEND = '' - __cssLEGENDBG = '' - __cssABSVALUES = '' - __cssPERCVALUES = '' - - # Search pattern for images. - __img_pattern = re.compile(r'\.(jpg|jpeg|jpe|gif|png)') - - def set_styles(self): - """set graph styles""" - if self.graphBGColor: - self.__cssGRAPH += 'background-color:' + self.graphBGColor + ';' - if self.graphBorder: - self.__cssGRAPH += 'border:' + self.graphBorder + ';' - if self.barBorder: - self.__cssBAR += 'border:' + self.barBorder + ';' - if self.barBGColor: - self.__cssBARBG += 'background-color:' + self.barBGColor + ';' - if self.titleColor: - self.__cssTITLE += 'color:' + self.titleColor + ';' - if self.titleBGColor: - self.__cssTITLE += 'background-color:' + self.titleBGColor + ';' - if self.titleBorder: - self.__cssTITLE += 'border:' + self.titleBorder + ';' - if self.titleFont: - self.__cssTITLE += 'font-family:' + self.titleFont + ';' - if self.titleAlign: - self.__cssTITLE += 'text-align:' + self.titleAlign + ';' - if self.titleSize: - self.__cssTITLE += 'font-size:' + str(self.titleSize) + 'px;' - if self.titleBGColor: - self.__cssTITLE += 'background-color:' + self.titleBGColor + ';' - if self.titlePadding: - self.__cssTITLE += 'padding:' + str(self.titlePadding) + 'px;' - if self.labelColor: - self.__cssLABEL += 'color:' + self.labelColor + ';' - if self.labelBGColor: - self.__cssLABEL += 'background-color:' + self.labelBGColor + ';' - if self.labelBorder: - self.__cssLABEL += 'border:' + self.labelBorder + ';' - if self.labelFont: - self.__cssLABEL += 'font-family:' + self.labelFont + ';' - if self.labelSize: - self.__cssLABEL += 'font-size:' + str(self.labelSize) + 'px;' - if self.labelAlign: - self.__cssLABEL += 'text-align:' + self.labelAlign + ';' - if self.labelBGColor: - self.__cssLABELBG += 'background-color:' + self.labelBGColor + ';' - if self.legendColor: - self.__cssLEGEND += 'color:' + self.legendColor + ';' - if self.legendFont: - self.__cssLEGEND += 'font-family:' + self.legendFont + ';' - if self.legendSize: - self.__cssLEGEND += 'font-size:' + str(self.legendSize) + 'px;' - if self.legendBGColor: - self.__cssLEGENDBG += 'background-color:' + self.legendBGColor + ';' - if self.legendBorder: - self.__cssLEGENDBG += 'border:' + self.legendBorder + ';' - if self.absValuesColor: - self.__cssABSVALUES += 'color:' + self.absValuesColor + ';' - if self.absValuesBGColor: - self.__cssABSVALUES += 'background-color:' + self.absValuesBGColor + ';' - if self.absValuesBorder: - self.__cssABSVALUES += 'border:' + self.absValuesBorder + ';' - if self.absValuesFont: - self.__cssABSVALUES += 'font-family:' + self.absValuesFont + ';' - if self.absValuesSize: - self.__cssABSVALUES += 'font-size:' + str(self.absValuesSize) + 'px;' - if self.percValuesColor: - self.__cssPERCVALUES += 'color:' + self.percValuesColor + ';' - if self.percValuesFont: - self.__cssPERCVALUES += 'font-family:' + self.percValuesFont + ';' - if self.percValuesSize: - self.__cssPERCVALUES += 'font-size:' + str(self.percValuesSize) + 'px;' - - def level_color(self, value, color): - """return bar color for each level""" - if self.barLevelColors: - for i in range(0, len(self.barLevelColors), 2): - try: - if (self.barLevelColors[i] > 0 and value >= self.barLevelColors[i]) or \ - (self.barLevelColors[i] < 0 and value <= self.barLevelColors[i]): - color = self.barLevelColors[i + 1] - except IndexError: - pass - return color - - def build_bar(self, value, width, height, color): - """return a single bar""" - title = self.absValuesPrefix + str(value) + self.absValuesSuffix - bg = self.__img_pattern.search(color) and 'background' or 'bgcolor' - bar = '' - bar += '
' or '>' - bar += '
' - bar += '
' - return bar - - def build_fader(self, value, width, height, x, color): - """return a single fader""" - fader = '' - x -= int(round(width / 2)) - if x > 0: - fader += '' - fader += '' - fader += '
' + self.build_bar(value, width, height, color) + '
' - return fader - - def build_value(self, val, max_dec, sum=0, align=''): - """return a single bar/fader value""" - val = _number_format(val, max_dec) - if sum: - sum = _number_format(sum, max_dec) - value = '' - legend += '' - i = 0 - - for color in barColors: - if len(self.legend) >= i + 1: - text = hasattr( - self.legend[i], - 'strip') and self.legend[i].strip() or str(self.legend[i]) - else: - text = '' - legend += '' - legend += '' - legend += '' - legend += '' - i += 1 - - legend += '
' + \ - self.build_bar( - '', - self.barWidth, - self.barWidth, - color) + '' + text + '
' - return legend - - def build_hTitle(self, titleLabel, titleValue, titleBar): - """return horizontal titles""" - title = '' - title += '' + titleLabel + '' - if titleValue != '': - title += '' + titleValue + '' - title += '' + titleBar + '' - title += '' - return title - - def create_hBar(self, value, percent, mPerc, mPerc_neg, - max_neg, mul, valSpace, bColor, border, spacer, spacer_neg): - """return a single horizontal bar with label and values (abs./perc.)""" - bar = '' - - if percent < 0: - percent *= -1 - bar += '' - else: - if max_neg: - bar += '' - if percent: - bar += '' - else: - bar += '' - bar += '' - - bar += '
' - if self.showValues < 2: - bar += '' + \ - str(_number_format(percent, self.percValuesDecimals)) + '%' - bar += ' ' - bar += self.build_bar(value, int(round(percent * mul)), self.barWidth, bColor) - bar += '' - bar += '
' - bar += self.build_bar(value, int(round(percent * mul)), self.barWidth, bColor) - bar += '' - if self.showValues < 2: - bar += ' ' + str(_number_format(percent, self.percValuesDecimals)) + '%' - bar += ' 
' - return bar - - def create_vBar(self, value, percent, mPerc, mPerc_neg, - max_neg, mul, valSpace, bColor, border, spacer, spacer_neg): - """return a single vertical bar with label and values (abs./perc.)""" - bar = '' - - if percent < 0: - percent *= -1 - bar += '' - bar += '' - else: - bar += '' - if percent: - bar += '' - else: - bar += '' - if max_neg: - bar += '' - - bar += '
' - bar += self.build_bar(value, self.barWidth, int(round(percent * mul)), bColor) - bar += '
' - bar += (self.showValues < 2) and '' + \ - str(_number_format(percent, self.percValuesDecimals)) + \ - '%' or ' ' - bar += '' - if self.showValues < 2: - bar += str(_number_format(percent, self.percValuesDecimals)) + '%' - bar += '
' - bar += self.build_bar(value, self.barWidth, int(round(percent * mul)), bColor) - bar += '
' - bar += '
' - return bar - - def create(self): - """create a complete bar graph (horizontal, vertical, progress, or fader)""" - self.type = self.type.lower() - d = self.values - t = hasattr( - self.titles, - 'split') and self.titles.split( - ',') or self.titles - r = hasattr( - self.labels, - 'split') and self.labels.split( - ',') or self.labels - drc = hasattr( - self.barColors, - 'split') and self.barColors.split( - ',') or self.barColors - val = [] - bc = [] - if self.barLength < 0.1: - self.barLength = 0.1 - elif self.barLength > 2.9: - self.barLength = 2.9 - labels = (len(d) > len(r)) and len(d) or len(r) - - if self.type == 'pbar' or self.type == 'fader': - if not self.barBGColor: - self.barBGColor = self.labelBGColor - if self.labelBGColor == self.barBGColor and len(t) == 0: - self.labelBGColor = '' - self.labelBorder = '' - - self.set_styles() - - graph = '' - graph += '' - - if self.legend and self.type != 'pbar' and self.type != 'fader': - graph += '
' - if self.type == 'vbar': - graph += '' - graph += '
' - - if self.charts > 1: - divide = math.ceil(labels / self.charts) - graph += '' - if self.showValues < 2: - graph += '' - graph += '' - if self.labelSpace and i < len(v) - 1: - graph += '' - lcnt += 1 - - else: - graph += '' - - graph += '
' - else: - divide = 0 - - sum = 0 - max = 0 - max_neg = 0 - max_dec = 0 - ccnt = 0 - lcnt = 0 - chart = 0 - - for i in range(labels): - if divide and i and not i % divide: - lcnt = 0 - chart += 1 - - try: - drv = len(d[i]) and [e for e in d[i]] or [d[i]] - except: - drv = [d[i]] - - j = 0 - dec = 0 - if len(val) <= chart: - val.append([]) - - for v in drv: - s = str(v) - if s.find('.') != -1: - dec = len(s[s.find('.') + 1:]) - if dec > max_dec: - max_dec = dec - - if len(val[chart]) <= lcnt: - val[chart].append([]) - val[chart][lcnt].append(v) - - if v != 0: - v -= self.baseValue - - if v > max: - max = v - elif v < max_neg: - max_neg = v - - if v < 0: - v *= -1 - sum += v - - if len(bc) <= j: - if ccnt >= len(self.__colors): - ccnt = 0 - if len(drc) <= j or len(drc[j]) < 3: - bc.append(self.__colors[ccnt]) - ccnt += 1 - else: - bc.append(drc[j].strip()) - - j += 1 - - lcnt += 1 - - border = int(self.barBorder[0]) - mPerc = sum and int(round(max * 100.0 / sum)) or 0 - if self.type == 'pbar' or self.type == 'fader': - mul = 2 - else: - mul = mPerc and 100.0 / mPerc or 1 - mul *= self.barLength - - if self.showValues < 2: - if self.type == 'hbar': - valSpace = (self.percValuesDecimals * (self.percValuesSize / 1.6)) + \ - (self.percValuesSize * 3.2) - else: - valSpace = self.percValuesSize * 1.2 - else: - valSpace = self.percValuesSize - spacer = maxSize = int(round(mPerc * mul + valSpace + border * 2)) - - if max_neg: - mPerc_neg = sum and int(round(-max_neg * 100.0 / sum)) or 0 - if mPerc_neg > mPerc and self.type != 'pbar' and self.type != 'fader': - mul = 100.0 / mPerc_neg * self.barLength - spacer_neg = int(round(mPerc_neg * mul + valSpace + border * 2)) - maxSize += spacer_neg - else: - mPerc_neg = spacer_neg = 0 - - titleLabel = '' - titleValue = '' - titleBar = '' - - if len(t) > 0: - titleLabel = (t[0] == '') and ' ' or t[0] - - if self.showValues == 1 or self.showValues == 2: - titleValue = (t[1] == '') and ' ' or t[1] - titleBar = (t[2] == '') and ' ' or t[2] - else: - titleBar = (t[1] == '') and ' ' or t[1] - - chart = 0 - lcnt = 0 - - for v in val: - graph += '' - - if self.type == 'hbar': - if len(t) > 0: - graph += self.build_hTitle(titleLabel, titleValue, titleBar) - - for i in range(len(v)): - label = ( - lcnt < len(r)) and r[lcnt].strip() or str(lcnt + 1) - rowspan = len(v[i]) - graph += '' - - for j in range(len(v[i])): - value = v[i][j] and v[i][j] - self.baseValue or 0 - percent = sum and value * 100.0 / sum or 0 - value = _number_format(v[i][j], max_dec) - bColor = self.level_color(v[i][j], bc[j]) - - if self.showValues == 1 or self.showValues == 2: - graph += self.build_value(v[i] - [j], max_dec, 0, 'right') - - graph += '' - graph += self.create_hBar( - value, percent, mPerc, mPerc_neg, - max_neg, mul, valSpace, bColor, border, spacer, spacer_neg) - graph += '' - if j < len(v[i]) - 1: - graph += '' - - if self.labelSpace and i < len(v) - 1: - graph += '' - lcnt += 1 - - elif self.type == 'vbar': - graph += '' - - if titleBar != '': - titleBar = titleBar.replace('-', '-
') - graph += '' - - for i in range(len(v)): - for j in range(len(v[i])): - value = v[i][j] and v[i][j] - self.baseValue or 0 - percent = sum and value * 100.0 / sum or 0 - value = _number_format(v[i][j], max_dec) - bColor = self.level_color(v[i][j], bc[j]) - - graph += '' - graph += self.create_vBar( - value, percent, mPerc, mPerc_neg, - max_neg, mul, valSpace, bColor, border, spacer, spacer_neg) - graph += '' - - if self.labelSpace: - graph += '' - - if self.showValues == 1 or self.showValues == 2: - graph += '' - if titleValue != '': - graph += '' - - for i in range(len(v)): - for j in range(len(v[i])): - graph += self.build_value(v[i][j], max_dec) - if self.labelSpace: - graph += '' - - graph += '' - if titleLabel != '': - graph += '' - - for i in range(len(v)): - label = ( - lcnt < len(r)) and r[lcnt].strip() or str(lcnt + 1) - colspan = len(v[i]) - graph += '' - if self.labelSpace: - graph += '' - lcnt += 1 - - graph += '' - - elif self.type == 'pbar' or self.type == 'fader': - if len(t) > 0: - graph += self.build_hTitle(titleLabel, titleValue, titleBar) - - for i in range(len(v)): - try: - m = (len(v[i]) > 1) and True or False - except: - m = False - - if m or not i: - label = ( - lcnt < len(r)) and r[lcnt].strip() or str(i + 1) - graph += '' - - if len(r): - graph += '' - - try: - sum = v[i][1] and v[i][1] or v[-1][0] - except: - sum = v[-1][0] - - percent = sum and v[i][0] * 100.0 / sum or 0 - value = _number_format(v[i][0], max_dec) - - if self.showValues == 1 or self.showValues == 2: - graph += self.build_value(v[i] - [0], max_dec, sum, 'right') - - graph += '' - - self.barColors = ( - len(drc) >= i + 1) and drc[i].strip() or self.__colors[0] - bColor = self.level_color(v[i][0], self.barColors) - graph += '
1) and ' rowspan=' + str(rowspan) or '') + '>' - graph += ' ' + label + ' 
' + titleBar + '
' + titleValue + '
' + titleLabel + ' 1) and ' colspan=' + str(colspan) or '') + '>' - graph += ' ' + label + ' 
' - graph += ' ' + label + ' 
' - graph += '
' - if self.type == 'fader': - graph += self.build_fader( - value, int(round(self.barWidth / 2)), - self.barWidth, int(round(percent * mul)), bColor) - else: - graph += self.build_bar(value, - int(round(percent * mul)), self.barWidth, bColor) - graph += '
 ' + \ - str(_number_format(percent, self.percValuesDecimals)) + '%
' + self.__err_type + '
' - - if chart < self.charts - 1 and len(val[chart + 1]): - graph += '
' - - chart += 1 - - if self.charts > 1: - graph += '
' - - if self.legend and self.type != 'pbar' and self.type != 'fader': - graph += ' ' - graph += self.build_legend(bc) - graph += '' - - if self.debug: - graph += "
sum=%s max=%s max_neg=%s max_dec=%s " % (sum, max, max_neg, max_dec) - graph += "mPerc=%s mPerc_neg=%s mul=%s valSpace=%s" % (mPerc, mPerc_neg, mul, valSpace) - - graph += '' - return graph - - -def _number_format(val, dec): - """return float with dec decimals; if dec is 0, return integer""" - return dec and ('%.' + str(dec) + 'f') % val or int(round(val)) - - -if __name__ == '__main__': - print(__doc__) diff --git a/lib/hostchecker.py b/lib/hostchecker.py deleted file mode 100644 index 9d3119b0..00000000 --- a/lib/hostchecker.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -Created by laramies on 2008-08-21. -""" - -import socket - - -class Checker(): - - def __init__(self, hosts): - self.hosts = hosts - self.realhosts = [] - - def check(self): - for x in self.hosts: - x = str(x) - try: - res = socket.gethostbyname(x) - res = str(res) - self.realhosts.append(x + ':' + res) - except Exception as e: - self.realhosts.append(x + ':' + 'empty') - return self.realhosts diff --git a/lib/htmlExport.py b/lib/htmlExport.py deleted file mode 100644 index 07f07f04..00000000 --- a/lib/htmlExport.py +++ /dev/null @@ -1,167 +0,0 @@ -from lib import graphs -from lib import markup -import re - - -class htmlExport(): - - def __init__(self, users, hosts, vhosts, dnsres, dnsrev, file, domain, shodan, tldres): - self.users = users - self.hosts = hosts - self.vhost = vhosts - self.fname = file - self.dnsres = dnsres - self.dnsrev = dnsrev - self.domain = domain - self.shodan = shodan - self.tldres = tldres - self.style = "" - - def styler(self): - a = """ - """ - self.style = a - - def writehtml(self): - page = markup.page() - page.html() - self.styler() - page.head(self.style) - page.body() - page.h1('theHarvester results') - page.h2('for :' + self.domain) - page.h3('Dashboard:') - graph = graphs.BarGraph('vBar') - graph.values = [len( - self.users), - len(self.hosts), - len(self.vhost), - len(self.tldres), - len(self.shodan)] - graph.labels = ['Emails', 'hosts', 'Vhost', 'TLD', 'Shodan'] - graph.showValues = 1 - page.body(graph.create()) - page.h3('Emails found:') - if self.users != []: - page.ul(class_='userslist') - page.li(self.users, class_='useritem') - page.ul.close() - else: - page.h2('No emails found.') - page.h3('Hosts found:') - if self.hosts != []: - page.ul(class_='softlist') - page.li(self.hosts, class_='softitem') - page.ul.close() - else: - page.h2('No hosts found.') - if self.tldres != []: - page.h3('TLD domains found in TLD expansion:') - page.ul(class_='tldlist') - page.li(self.tldres, class_='tlditem') - page.ul.close() - if self.dnsres != []: - page.h3('Hosts found in DNS brute force:') - page.ul(class_='dnslist') - page.li(self.dnsres, class_='dnsitem') - page.ul.close() - if self.dnsrev != []: - page.h3('Hosts found with reverse lookup:') - page.ul(class_='dnsrevlist') - page.li(self.dnsrev, class_='dnsrevitem') - page.ul.close() - if self.vhost != []: - page.h3('Virtual hosts found:') - page.ul(class_='pathslist') - page.li(self.vhost, class_='pathitem') - page.ul.close() - if self.shodan != []: - shodanalysis = [] - page.h3('Shodan results:') - for x in self.shodan: - res = x.split('SAPO') - page.h3(res[0]) - page.a('Port:' + res[2]) - page.pre(res[1]) - page.pre.close() - ban = res[1] - reg_server = re.compile('Server:.*') - temp = reg_server.findall(res[1]) - if temp != []: - shodanalysis.append(res[0] + ':' + temp[0]) - if shodanalysis != []: - page.h3('Server technologies:') - repeated = [] - for x in shodanalysis: - if x not in repeated: - page.pre(x) - page.pre.close() - repeated.append(x) - page.body.close() - page.html.close() - file = open(self.fname, 'w') - for x in page.content: - try: - file.write(x) - except: - print('Exception' + x) # Send to logs. - pass - file.close() - return 'ok' diff --git a/lib/ip-ranges.json b/lib/ip-ranges.json deleted file mode 100644 index 678c8e6b..00000000 --- a/lib/ip-ranges.json +++ /dev/null @@ -1,8978 +0,0 @@ -{ - "syncToken": "1546032855", - "createDate": "2018-12-28-21-34-15", - "prefixes": [ - { - "ip_prefix": "18.208.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.245.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.194.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.155.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.196.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.22.0/24", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.112/28", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.210.0.0/15", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.17.0/24", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.154.0/23", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.212.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.240/28", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.241.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "184.169.128.0/17", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "216.182.224.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.74.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.168.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.54.0/23", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.224.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.64.0/22", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.238.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "216.182.232.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.72.0/22", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.184.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "172.96.98.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.125.0.0/16", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.24.0/22", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "54.193.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.104.0/22", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.249.0/24", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.64.0/22", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.5.0/24", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.193.128/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.250.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "107.20.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.8.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.224.0/20", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.224.0/20", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.156.0/24", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "54.180.0.0/15", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.30.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.8.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.64/28", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.92.0.0/17", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.154.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "67.202.0.0/18", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "103.246.148.0/23", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.20.17/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.0.0/20", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.246.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.112/28", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.39.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.150.0/24", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.60.0/23", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.32/28", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.232.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.249.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "207.171.160.0/20", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.48.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.116.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.200/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.99.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.37.223/32", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.192/28", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.20.0/24", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.0.0/20", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.80.0/20", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "184.73.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "46.137.0.0/17", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.16/28", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.208.64/26", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.80.0.0/12", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.40.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.170.0/23", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.124.128.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "35.181.0.0/16", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.138.252/32", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.80.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.214.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.254.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.40.0/24", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.254.0/24", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.64.0/19", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.224.0.0/12", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.216.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.192.192/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.196.192/26", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.221.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.202.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.255.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.253.0.0/16", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.192.0/20", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.187.0/24", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.139.253/32", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.112/28", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.230.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "13.208.0.0/16", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.96.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.156.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.224.0/21", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.236.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.249.0/24", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.244.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.174.0/24", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.12.12/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.128/28", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.208.0.0/13", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.208/28", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "103.246.150.0/23", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.228.0.0/15", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.96/28", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.196.0.0/14", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.32.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.252.0/24", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.192.0/22", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.36.0/22", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.18.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.56.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.21.14/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.19.0/24", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.52.0/23", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "175.41.192.0/18", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.228.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.160/28", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.151.0.0/17", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.54.0.0/15", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.142.0/23", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.241.0/24", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.232.0/21", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.128.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.209.192/26", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "99.80.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.172.0/22", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.65.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.19.236/32", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.200.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.188.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.194.0/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.150.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.200.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.206.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.128.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.128.0/19", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.96/28", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.128.0/19", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.226.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.106.253/32", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.149.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.218.128.0/17", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "76.223.0.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "99.84.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "18.144.0.0/15", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.90.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.138.253/32", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.157.0/24", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.208.192/26", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.10.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.230.0/23", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "100.24.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.74.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.104.0.0/14", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.80.0.0/16", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.216.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.232.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.244.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "175.41.128.0/18", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.32.0/20", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.76.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.216.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.32/28", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.34.57/32", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.13.0/24", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.78.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.253.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.160.0/24", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.160.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.97.0/24", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "162.213.232.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.200.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.1.16/28", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "185.143.16.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.244.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.0.0/20", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.112.35/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.29.0/26", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "35.160.0.0/13", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.48.0.0/14", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.80/28", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.0.0/17", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.192.0/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.236.128.0/18", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.20.16/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.0/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.1.0/28", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.48.0.0/15", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.64.0.0/17", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.239.0/24", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.210.0/23", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "35.155.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.210.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.2.0/23", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.34.56/32", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.16/28", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.225.128/26", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.5.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.199.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.199.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.198.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.69.0/24", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.120.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.98.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.20.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.208/28", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.20.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.24.0/21", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.161.0/24", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "46.137.192.0/19", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.200.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.96.0/20", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.32.0/22", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.232.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.76.0.0/17", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.48.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.6/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.220.0/22", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.196/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.72.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.153.128.0/17", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.58.0/28", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "122.248.192.0/18", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.207.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.154.0.0/16", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.0.0/17", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.32/28", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.160/28", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.227.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.23.0/24", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.48.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.232.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.224.64/26", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.170.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.171.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.4.0/24", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.72.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.48.0/22", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.228.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.120.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.210.192/26", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.200/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.56.0/22", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.160.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "157.175.0.0/16", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.34.32.0/19", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.108.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.236.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.80/28", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.198.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.192.0/19", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "46.51.192.0/20", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.174.0/24", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.106.252/32", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.96.0/20", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.192.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.248.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "178.236.0.0/20", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.176.0.0/15", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.112.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.34.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.247.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.153.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.61.0.0/16", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.79.0.0/16", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.107.252/32", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.16.0/24", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.195.0/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.58.0.0/15", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.218.0.0/17", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.62.0.0/15", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.0.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.19.237/32", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.44.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.192.0/19", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.162.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.144/28", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "46.51.216.0/21", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.28.0.0/16", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.166.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.176.0/22", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.57.0.0/16", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.124.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.192/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.70.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.0/28", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.212.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.10/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.99.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.29.0.0/16", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.15.0/24", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.35.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.62.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.144.0/24", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.194.64/26", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.209.0/26", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.198/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "184.72.0.0/18", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.246.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.26.0/23", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.247.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.248.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "27.0.0.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.180.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.1.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.144/28", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.208.0/21", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.227.0/24", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.68.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.93.0.0/16", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "70.132.0.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.54.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.3.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.225.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.182.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.152.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.32.0.0/15", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "13.112.0.0/14", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.68.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.67.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.173.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.194.0.0/15", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.64.0/20", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.197.0/24", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.128/28", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.193.64/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.184.0.0/13", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.16.0/20", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.163.0/24", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.92.128.0/17", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.0/28", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.0.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.253.0/24", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.120.0/21", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.53.0.0/16", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.48.0/20", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "184.72.128.0/17", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.248.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.240.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.80/28", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.216.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.128.0/20", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.166.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.58.0.0/15", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.51.29/32", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.194.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.244.0/22", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.156.0.0/14", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.18.178/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.209.64/26", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "23.20.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.168.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.151.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.80/28", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.16.0/20", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.64.0/20", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.225.0/24", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "172.96.97.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.229.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.68.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.192.0/20", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.219.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.204.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.178.0.0/15", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.9.0/24", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.204.0/23", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.88.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "75.2.0.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.12.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.0/28", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.220.0.0/15", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.252.0/24", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.35.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "34.240.0.0/13", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.14.19/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.16/28", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.249.96/28", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.8/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.200.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.253.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.240.0/22", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.28.0/23", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.128/28", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.100.0/23", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.172.0/23", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.64/28", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.72.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.192/28", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.11.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.196.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.164.0/22", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "54.223.0.0/16", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.48/28", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.24.0/22", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.196.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "79.125.0.0/17", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.88.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.0.0/20", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.248.0/21", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.32/28", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.40.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.220.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "100.20.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.24.0/23", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.8.0.0/14", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.246.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.139.252/32", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.0/28", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.204.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.163.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "216.182.236.0/23", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "34.208.0.0/12", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.15.0.0/16", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.17.16/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.209.128/26", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.30.0/23", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.96.0/22", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.145.0/24", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.86.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.44.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.76.128.0/17", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.40.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.32.0/21", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.95.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.212.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.232.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.224/28", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.48.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.47.0.0/16", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.16.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.136.0/23", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.64/28", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.225.64/26", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.168.0/22", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.62.0/23", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.175.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.208.0/21", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.51.28/32", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.12.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "63.32.0.0/14", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.83.0.0/16", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.14.18/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.6.0/24", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.197.192/26", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "150.222.2.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.79.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.251.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.52.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.153.0.0/16", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.202.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.1.48/28", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.104.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.196.0.0/15", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.76.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.80.0/20", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.112/28", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.197.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "71.152.0.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "216.137.32.0/19", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.252.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.16/28", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.232.0.0/14", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.243.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.80.0/20", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.174.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "50.16.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.249.0/24", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.52.0.0/15", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.197.128/26", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.233.64.0/18", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.168.0.0/13", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.64.128.0/17", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.80.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.48/28", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.228.0/24", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.128.0/17", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "96.127.0.0/17", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.252.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.148.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "35.182.0.0/15", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.112.0.0/14", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.244.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.148.0/23", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "3.208.0.0/12", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.88.0/22", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "185.48.120.0/22", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.192.64/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.192.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.220.0.0/14", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.36.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.112.0/22", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.94.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.191.0.0/16", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.210.0/26", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.169.0/24", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.0.0/19", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.112/28", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.8.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.204.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "99.86.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "207.171.176.0/20", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.164.0/23", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.208.128/26", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.202.0.0/15", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.208.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.240.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.210.64/26", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "34.248.0.0/13", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.237.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.107.253/32", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "50.18.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.14.0.0/16", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.0.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.88.0/22", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.17.17/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.124.0.0/16", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.84.0.0/15", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.144/28", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.192.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.32/28", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "160.1.0.0/16", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.236.0.0/14", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.220.0/22", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.32.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.100.0/22", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.172.0/23", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "174.129.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.209.0.0/16", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.60.0.0/16", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.78.0.0/16", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "72.44.32.0/19", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.236.0/22", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "34.224.0.0/12", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.75.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.194/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.164.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.68.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.0.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.240.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.230.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.4.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.96/28", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.194.128/26", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.210.128/26", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.202/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.112.0/21", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.224.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.32.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "15.164.0.0/15", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.96.0/19", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.128.0/19", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.128/28", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.34.128.0/17", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.240.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.16.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "75.101.128.0/17", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.164.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.178.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.168.0/24", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "108.128.0.0/13", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.61.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.56.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.184.0.0/15", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "72.21.192.0/19", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.63.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.252.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.198/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.222.57.0/24", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.83.128.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "18.216.0.0/14", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "34.192.0.0/12", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.37.222/32", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.64.0/22", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.160.0/19", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.18.179/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.112.34/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.196.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.215.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "177.71.128.0/17", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.175.0.0/16", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.216.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.76.0/22", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.208.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.228.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "64.252.64.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.52.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.60.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.192/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.219.68.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.229.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.14.0/24", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.64/28", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.216.0/21", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.138.0.0/15", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.144/28", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.174.0/23", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "3.120.0.0/14", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.9.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.4/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.48/28", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.242.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "177.72.240.0/21", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "216.182.238.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "35.180.0.0/16", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.76.0/22", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.36.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.228.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.16.0.0/15", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.28.0/24", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.146.0/23", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.242.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.52.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "46.137.128.0/18", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.2.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.176/28", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.16.0/21", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.234.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.188.0.0/16", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "46.51.128.0/18", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "64.252.128.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.152.0/22", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.167.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.254.0/24", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.254.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.153.0.0/17", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.24.0.0/14", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.170.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.56.0/22", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.160.0/20", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.222.0.0/17", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.192.0/18", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.12.13/32", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.96.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.226.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.248.224/28", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.48/28", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.218.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "3.124.0.0/14", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.176.0/22", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.194.192/26", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.183.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.0/28", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.176.0.0/15", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.246.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.108.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.193.0/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "143.204.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "18.231.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.252.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "46.137.224.0/19", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.248.0/22", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.156.0/22", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.199.0/24", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.128.0/21", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.206.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.252.0/23", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.176.0/21", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.144.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.169.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.66.0.0/16", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.2.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "103.4.8.0/21", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.96.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "184.72.64.0/18", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.244.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.208.0/23", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.112.0/20", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.179.0.0/16", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.138.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.224.0/22", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.110.0/24", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "46.51.224.0/19", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.111.0/24", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.179.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.203.0/24", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.233.0.0/18", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.172.0/24", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.184.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.194/31", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.104.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.246.176.0/20", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.8.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.247.0/24", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.66.0.0/16", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.64/28", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.176.0/21", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "204.236.192.0/18", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.64.0.0/15", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "103.8.172.0/22", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "176.34.0.0/19", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.96.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.158.0/23", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.192.128/26", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.216.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.144.0/21", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.169.0/24", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.198.128/28", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.248.0/24", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.176/28", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.92.0/22", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.236.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.98.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.188.0/22", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.240.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.125.0/25", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "13.249.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.28.0/22", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.56.0/21", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.165.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.0.0.0/15", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "43.250.193.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.77.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.21.15/32", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.205.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.1.64/28", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.224.0.0/14", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.56.0.0/16", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.212.0/22", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.245.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "43.250.192.0/24", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.113.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.32.112.0/21", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.10.0/24", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "99.82.170.0/24", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.7.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.60.0/24", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.248.16.0/21", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.84.0/22", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.240.128.0/18", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "150.222.12.0/24", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "205.251.250.0/23", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.128/26", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.251.0/24", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.4.0.0/14", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.80.0/21", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ip_prefix": "52.46.184.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.67.0.0/16", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.116.0/22", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.201.0.0/16", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.119.214.0/23", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.202/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.151.128.0/17", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.81.0.0/16", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.222.128.0/17", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "13.250.0.0/15", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.166.0/23", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.216.2/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "3.16.0.0/14", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ip_prefix": "18.130.0.0/16", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.72.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.82.180.0/22", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.182.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.168.0/24", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.224.128/26", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.192.0.0/16", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.16/28", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.0.96/28", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "18.136.0.0/16", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "50.112.0.0/16", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ip_prefix": "52.93.97.0/24", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.215.196/31", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ip_prefix": "87.238.80.0/21", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.255.80/28", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.92.252.0/22", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.95.250.0/24", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.144.211.0/26", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "50.19.0.0/16", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "99.79.0.0/16", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.57.0.0/16", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.126.0.0/15", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.239.4.0/22", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.172.0.0/15", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "176.34.64.0/18", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ip_prefix": "52.94.206.0/23", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.231.192.0/20", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.233.128.0/17", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ip_prefix": "203.83.220.0/22", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "54.245.168.0/26", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.243.31.192/26", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "177.71.207.128/26", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.255.254.192/26", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.244.52.192/26", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "176.34.159.192/26", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.251.31.128/26", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.183.255.128/26", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.241.32.64/26", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.252.254.192/26", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "107.23.255.0/26", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.248.220.0/26", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.228.16.0/26", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.250.253.192/26", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.232.40.64/26", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "54.252.79.128/26", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ip_prefix": "52.95.154.0/23", - "region": "eu-west-3", - "service": "S3" - }, - { - "ip_prefix": "52.219.64.0/22", - "region": "ap-south-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.72.0/22", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.64.0/22", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.156.0/24", - "region": "eu-west-3", - "service": "S3" - }, - { - "ip_prefix": "52.92.39.0/24", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.150.0/24", - "region": "eu-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.219.60.0/23", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.48.0/22", - "region": "us-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.0.0/20", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.170.0/23", - "region": "eu-north-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.224.0/21", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.56.0/22", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.142.0/23", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.232.0/21", - "region": "us-west-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.128.0/19", - "region": "eu-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.218.128.0/17", - "region": "us-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.157.0/24", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ip_prefix": "52.219.76.0/22", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.253.0/24", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.0.0/17", - "region": "us-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.20.0/22", - "region": "us-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.24.0/21", - "region": "us-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.96.0/20", - "region": "us-east-2", - "service": "S3" - }, - { - "ip_prefix": "52.219.72.0/22", - "region": "eu-central-1", - "service": "S3" - }, - { - "ip_prefix": "54.222.48.0/22", - "region": "cn-north-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.56.0/22", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.174.0/24", - "region": "me-south-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.248.0/22", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.218.0.0/17", - "region": "eu-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.44.0/22", - "region": "eu-central-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.144.0/24", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.16.0/20", - "region": "us-east-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.252.0/24", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.219.0.0/20", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.40.0/22", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.163.0/24", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.145.0/24", - "region": "ca-central-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.40.0/21", - "region": "eu-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.32.0/21", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.136.0/23", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.62.0/23", - "region": "ap-south-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.80.0/20", - "region": "us-east-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.80.0/22", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.148.0/23", - "region": "eu-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.88.0/22", - "region": "eu-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.169.0/24", - "region": "eu-north-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.164.0/23", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.32.0/22", - "region": "us-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.172.0/23", - "region": "me-south-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.68.0/22", - "region": "eu-central-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.112.0/21", - "region": "us-west-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.16.0/22", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.160.0/19", - "region": "us-west-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.76.0/22", - "region": "us-east-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.52.0/22", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.92.60.0/22", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.219.68.0/22", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.146.0/23", - "region": "ca-central-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.248.0/22", - "region": "ap-south-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.128.0/21", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ip_prefix": "52.95.138.0/24", - "region": "sa-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.158.0/23", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ip_prefix": "52.216.0.0/15", - "region": "us-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.82.188.0/22", - "region": "cn-northwest-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.240.0/22", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.84.0/22", - "region": "ca-central-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.166.0/23", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.95.168.0/24", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ip_prefix": "52.92.252.0/22", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ip_prefix": "54.231.192.0/20", - "region": "eu-central-1", - "service": "S3" - }, - { - "ip_prefix": "18.208.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.245.0/24", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.194.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.155.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.196.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.112/28", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "13.210.0.0/15", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.241.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "184.169.128.0/17", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "216.182.224.0/21", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.74.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.168.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.238.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "216.182.232.0/22", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "13.125.0.0/16", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.193.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.250.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "107.20.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.180.0.0/15", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.30.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.64/28", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.92.0.0/17", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.154.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "67.202.0.0/18", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.112/28", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "54.232.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.116.0/22", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.192/28", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "184.73.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "46.137.0.0/17", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.16/28", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ip_prefix": "3.80.0.0/12", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.40.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "35.181.0.0/16", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ip_prefix": "54.80.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.214.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.254.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.254.0/24", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ip_prefix": "176.32.64.0/19", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "3.224.0.0/12", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.221.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.255.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "18.253.0.0/16", - "region": "us-gov-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.112/28", - "region": "us-gov-east-1", - "service": "EC2" - }, - { - "ip_prefix": "13.208.0.0/16", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ip_prefix": "54.156.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.236.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.249.0/24", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "54.244.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.128/28", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.208.0.0/13", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.228.0.0/15", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.96/28", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.196.0.0/14", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.32.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.252.0/24", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.222.36.0/22", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "52.18.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "175.41.192.0/18", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.160/28", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "54.151.0.0/17", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.54.0.0/15", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.241.0/24", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "99.80.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.65.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.150.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "18.200.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.206.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.96/28", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.226.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.144.0.0/15", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.90.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.10.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "100.24.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.74.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "3.104.0.0/14", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.80.0.0/16", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "175.41.128.0/18", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.216.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.78.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "162.213.232.0/24", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.200.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "35.160.0.0/13", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.48.0.0/14", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "204.236.128.0/18", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.48.0.0/15", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ip_prefix": "52.64.0.0/17", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.239.0/24", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "35.155.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.210.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.199.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.198.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.20.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.208/28", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ip_prefix": "46.137.192.0/19", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.200.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.222.32.0/22", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "52.76.0.0/17", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.153.128.0/17", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "122.248.192.0/18", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.207.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "35.154.0.0/16", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "52.82.0.0/17", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.32/28", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ip_prefix": "54.170.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.160.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "157.175.0.0/16", - "region": "me-south-1", - "service": "EC2" - }, - { - "ip_prefix": "176.34.32.0/19", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "18.236.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.80/28", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "46.51.192.0/20", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "35.176.0.0/15", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "35.153.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.61.0.0/16", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.79.0.0/16", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.58.0.0/15", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.62.0.0/15", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "46.51.216.0/21", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.28.0.0/16", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.57.0.0/16", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.70.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.0/28", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.29.0.0/16", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "184.72.0.0/18", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.246.0/24", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.247.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.248.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.46.180.0/22", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.227.0/24", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ip_prefix": "54.68.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.93.0.0/16", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.54.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.182.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.152.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "13.112.0.0/14", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.68.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.67.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.194.0.0/15", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.128/28", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ip_prefix": "54.184.0.0/13", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.92.128.0/17", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.0.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.253.0/24", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "13.53.0.0/16", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ip_prefix": "184.72.128.0/17", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "13.58.0.0/15", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "54.194.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "35.156.0.0/14", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "23.20.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.80/28", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.225.0/24", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ip_prefix": "18.229.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.219.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.204.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "35.178.0.0/15", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.88.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.12.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.0/28", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "52.220.0.0/15", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "34.240.0.0/13", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.16/28", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.249.96/28", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ip_prefix": "54.253.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.128/28", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.64/28", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.72.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.223.0.0/16", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "79.125.0.0/17", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.88.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.32/28", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.220.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "100.20.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "3.8.0.0/14", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "18.246.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.204.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "216.182.236.0/23", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "34.208.0.0/12", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.15.0.0/16", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "52.86.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.44.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.76.128.0/17", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.95.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.212.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "18.232.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.47.0.0/16", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.64/28", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "63.32.0.0/14", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.83.0.0/16", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ip_prefix": "54.79.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.251.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "18.153.0.0/16", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "18.202.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.196.0.0/15", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "54.76.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.16/28", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "13.232.0.0/14", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.243.0/24", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.174.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "50.16.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.52.0.0/15", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.233.64.0/18", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "35.168.0.0/13", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.64.128.0/17", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.228.0/24", - "region": "me-south-1", - "service": "EC2" - }, - { - "ip_prefix": "54.222.128.0/17", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "96.127.0.0/17", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.148.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "35.182.0.0/15", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ip_prefix": "3.112.0.0/14", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.244.0/24", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "3.208.0.0/12", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "185.48.120.0/22", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.220.0.0/14", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "52.36.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.94.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.191.0.0/16", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "54.202.0.0/15", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "34.248.0.0/13", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "50.18.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.14.0.0/16", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "13.124.0.0/16", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.144/28", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "52.192.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.32/28", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "160.1.0.0/16", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.236.0.0/14", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "174.129.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "13.209.0.0/16", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.60.0.0/16", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.78.0.0/16", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "72.44.32.0/19", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "34.224.0.0/12", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.75.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "13.230.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.224.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "15.164.0.0/15", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "176.34.128.0/17", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.240.0/24", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "75.101.128.0/17", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.178.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "108.128.0.0/13", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.56.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.184.0.0/15", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "18.216.0.0/14", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "34.192.0.0/12", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.215.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "177.71.128.0/17", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.175.0.0/16", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.208.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.228.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.229.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.138.0.0/15", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.144/28", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "3.120.0.0/14", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.9.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.48/28", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.242.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "216.182.238.0/23", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "35.180.0.0/16", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ip_prefix": "18.228.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.16.0.0/15", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.242.0/24", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "13.52.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "46.137.128.0/18", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.176/28", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ip_prefix": "54.234.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.188.0.0/16", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "46.51.128.0/18", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.153.0.0/17", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.24.0.0/14", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.222.0.0/17", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.94.248.224/28", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.48/28", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.218.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "3.124.0.0/14", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.82.176.0/22", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ip_prefix": "54.183.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.0/28", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.176.0.0/15", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.246.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "18.231.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.252.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "46.137.224.0/19", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.144.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.169.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.66.0.0/16", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ip_prefix": "52.2.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "103.4.8.0/21", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "184.72.64.0/18", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.179.0.0/16", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "46.51.224.0/19", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.179.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "54.233.0.0/18", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.8.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.247.0/24", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.66.0.0/16", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "204.236.192.0/18", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "54.64.0.0/15", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "176.34.0.0/19", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.248.0/24", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "3.0.0.0/15", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.77.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.119.205.0/24", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "18.224.0.0/14", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "52.56.0.0/16", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "54.245.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.251.0/24", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "52.4.0.0/14", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.46.184.0/22", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ip_prefix": "52.67.0.0/16", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "18.201.0.0/16", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.151.128.0/17", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "52.81.0.0/16", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ip_prefix": "13.250.0.0/15", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "3.16.0.0/14", - "region": "us-east-2", - "service": "EC2" - }, - { - "ip_prefix": "18.130.0.0/16", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.72.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.82.180.0/22", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ip_prefix": "18.136.0.0/16", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ip_prefix": "50.112.0.0/16", - "region": "us-west-2", - "service": "EC2" - }, - { - "ip_prefix": "52.95.255.80/28", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "52.95.250.0/24", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ip_prefix": "50.19.0.0/16", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "99.79.0.0/16", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ip_prefix": "13.57.0.0/16", - "region": "us-west-1", - "service": "EC2" - }, - { - "ip_prefix": "13.126.0.0/15", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ip_prefix": "54.172.0.0/15", - "region": "us-east-1", - "service": "EC2" - }, - { - "ip_prefix": "176.34.64.0/18", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ip_prefix": "54.233.128.0/17", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ip_prefix": "205.251.192.0/21", - "region": "GLOBAL", - "service": "ROUTE53" - }, - { - "ip_prefix": "52.95.110.0/24", - "region": "GLOBAL", - "service": "ROUTE53" - }, - { - "ip_prefix": "13.124.199.0/24", - "region": "ap-northeast-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "34.226.14.0/24", - "region": "us-east-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.124.128.0/17", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.230.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.239.128.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.82.128.0/19", - "region": "cn-northwest-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "99.84.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.15.127.128/26", - "region": "us-east-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "35.158.136.0/24", - "region": "eu-central-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.57.254.0/24", - "region": "eu-central-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "18.216.170.128/25", - "region": "us-east-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.54.63.128/26", - "region": "ap-southeast-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.59.250.0/26", - "region": "us-east-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.210.67.128/26", - "region": "ap-southeast-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "35.167.191.128/26", - "region": "us-west-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.47.139.0/24", - "region": "eu-west-3", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.199.127.192/26", - "region": "ap-northeast-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.212.248.0/26", - "region": "eu-west-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "205.251.192.0/19", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.66.194.128/26", - "region": "ap-south-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.239.192.0/19", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "70.132.0.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.32.0.0/15", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.113.203.0/24", - "region": "ap-northeast-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "34.195.252.0/24", - "region": "us-east-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "35.162.63.192/26", - "region": "us-west-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "34.223.12.224/27", - "region": "us-west-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.35.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "204.246.172.0/23", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "204.246.164.0/22", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.56.127.0/25", - "region": "eu-west-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "204.246.168.0/22", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.228.69.0/24", - "region": "ap-southeast-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "34.216.51.0/25", - "region": "us-west-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "71.152.0.0/17", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "216.137.32.0/19", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "205.251.249.0/24", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "99.86.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.46.0.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.84.0.0/15", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.233.255.128/26", - "region": "sa-east-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "64.252.64.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.52.191.128/26", - "region": "us-west-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "204.246.174.0/23", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "64.252.128.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "205.251.254.0/24", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "143.204.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "205.251.252.0/23", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.78.247.128/26", - "region": "ap-northeast-2", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "204.246.176.0/20", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.220.191.0/26", - "region": "ap-southeast-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "13.249.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.240.128.0/18", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "205.251.250.0/23", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.222.128.0/17", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.182.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "54.192.0.0/16", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "34.232.163.208/29", - "region": "us-east-1", - "service": "CLOUDFRONT" - }, - { - "ip_prefix": "52.47.73.72/29", - "region": "eu-west-3", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.55.255.216/29", - "region": "ap-southeast-2", - "service": "CODEBUILD" - }, - { - "ip_prefix": "52.15.247.208/29", - "region": "us-east-2", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.112.191.184/29", - "region": "ap-northeast-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "34.250.63.248/29", - "region": "eu-west-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "52.221.221.128/29", - "region": "ap-southeast-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.127.70.136/29", - "region": "ap-south-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "52.82.1.0/29", - "region": "cn-northwest-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "177.71.207.16/29", - "region": "sa-east-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.124.145.16/29", - "region": "ap-northeast-2", - "service": "CODEBUILD" - }, - { - "ip_prefix": "35.157.127.248/29", - "region": "eu-central-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "35.182.14.48/29", - "region": "ca-central-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "35.176.92.32/29", - "region": "eu-west-2", - "service": "CODEBUILD" - }, - { - "ip_prefix": "52.43.76.88/29", - "region": "us-west-2", - "service": "CODEBUILD" - }, - { - "ip_prefix": "18.231.194.8/29", - "region": "sa-east-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "52.80.198.136/29", - "region": "cn-north-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.56.32.200/29", - "region": "us-west-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "34.228.4.208/28", - "region": "us-east-1", - "service": "CODEBUILD" - }, - { - "ip_prefix": "13.248.99.0/24", - "region": "us-west-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.174.0/24", - "region": "ca-central-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "13.248.128.0/17", - "region": "GLOBAL", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "76.223.0.0/17", - "region": "GLOBAL", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.160.0/24", - "region": "ap-south-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "13.248.97.0/24", - "region": "eu-central-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "13.248.98.0/24", - "region": "ap-northeast-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.161.0/24", - "region": "eu-west-3", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.171.0/24", - "region": "us-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.162.0/24", - "region": "eu-west-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.173.0/24", - "region": "ap-southeast-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.163.0/24", - "region": "eu-central-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.166.0/24", - "region": "us-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "75.2.0.0/17", - "region": "GLOBAL", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.175.0/24", - "region": "us-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.164.0/24", - "region": "sa-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.168.0/24", - "region": "ap-northeast-2", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.83.128.0/17", - "region": "GLOBAL", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.167.0/24", - "region": "us-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.156.0/22", - "region": "GLOBAL", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.172.0/24", - "region": "us-west-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "13.248.96.0/24", - "region": "eu-west-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.169.0/24", - "region": "eu-west-2", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.165.0/24", - "region": "us-east-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "99.82.170.0/24", - "region": "ap-northeast-1", - "service": "GLOBALACCELERATOR" - }, - { - "ip_prefix": "13.251.113.64/26", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.251.116.0/23", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ip_prefix": "13.210.2.192/26", - "region": "ap-southeast-2", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "13.236.8.0/25", - "region": "ap-southeast-2", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "18.182.96.64/26", - "region": "ap-northeast-1", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "18.184.2.128/25", - "region": "eu-central-1", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "18.233.213.128/25", - "region": "us-east-1", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "18.236.61.0/25", - "region": "us-west-2", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "35.158.127.64/26", - "region": "eu-central-1", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "52.55.191.224/27", - "region": "us-east-1", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "54.190.198.32/28", - "region": "us-west-2", - "service": "AMAZON_CONNECT" - }, - { - "ip_prefix": "13.250.186.128/27", - "region": "ap-southeast-1", - "service": "CLOUD9" - }, - { - "ip_prefix": "13.250.186.160/27", - "region": "ap-southeast-1", - "service": "CLOUD9" - }, - { - "ip_prefix": "18.188.9.0/27", - "region": "us-east-2", - "service": "CLOUD9" - }, - { - "ip_prefix": "18.188.9.32/27", - "region": "us-east-2", - "service": "CLOUD9" - }, - { - "ip_prefix": "34.217.141.224/27", - "region": "us-west-2", - "service": "CLOUD9" - }, - { - "ip_prefix": "34.218.119.32/27", - "region": "us-west-2", - "service": "CLOUD9" - }, - { - "ip_prefix": "34.245.205.0/27", - "region": "eu-west-1", - "service": "CLOUD9" - }, - { - "ip_prefix": "34.245.205.64/27", - "region": "eu-west-1", - "service": "CLOUD9" - }, - { - "ip_prefix": "35.172.155.192/27", - "region": "us-east-1", - "service": "CLOUD9" - }, - { - "ip_prefix": "35.172.155.96/27", - "region": "us-east-1", - "service": "CLOUD9" - } - ], - "ipv6_prefixes": [ - { - "ipv6_prefix": "2a05:d07c:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a300::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4860::/47", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da1a::/36", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:300f::/64", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07c:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da18::/36", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:ff00::/64", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a01:578:0:7000::/56", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80ff:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:0:7500::/56", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:48b0::/47", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4840::/47", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a600::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07c:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a500::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:0:7100::/56", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f14::/35", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7000::/56", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:100:7200::/56", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4820::/47", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:eee::/48", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:5::/64", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:0:7200::/56", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:aa00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4870::/47", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:108:d000::/44", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da16::/36", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7200::/56", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fe:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d016::/36", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7100::/56", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4810::/47", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f12::/36", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4830::/47", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d050:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:ab00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80a0:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:5000::/36", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:af00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a100::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f1c::/36", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:4000::/36", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d012::/36", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:ac00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fc:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f11::/36", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80f9:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07c:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:8014::/36", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80a0:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80f8:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:3000::/36", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:f000::/36", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2804:800:0:7000::/56", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4850::/47", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:48a0::/47", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:fff::/48", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fa:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80f9:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f1e::/36", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:108:7000::/44", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a400::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fc:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:48d0::/47", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a800::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d01e::/36", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6700:ff00::/64", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2403:b300:ff00::/64", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f16::/36", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:4000::/40", - "region": "us-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:2000::/36", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:0:7400::/56", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:1000::/36", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07f:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:8018::/36", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a01:578:13::/64", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:1000::/40", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4880::/47", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4007::/64", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07c:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a900::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7400::/56", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a01:578:0:7100::/56", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fa0:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:8000:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:0:7000::/56", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafa:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2400:6500:100:7100::/56", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:2000::/40", - "region": "us-gov-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f15::/32", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4800::/47", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:8000::/40", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da14::/36", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:8000::/40", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d078:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:2000::/40", - "region": "eu-west-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffe:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07c:c000::/40", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:ae00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07e:4000::/40", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:c000::/40", - "region": "us-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:ddd::/48", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da1c::/36", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf9:2000::/40", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2804:800:ff00::/64", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d079:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffa:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:8000:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:ad00::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d018::/36", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80ff:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:48c0::/47", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d01c::/36", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafc:8000::/40", - "region": "ap-southeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff9:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d000:6000::/40", - "region": "eu-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80f8:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a200::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7800::/56", - "region": "ca-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a01:578:0:7200::/56", - "region": "eu-west-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d014::/36", - "region": "eu-central-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daf8:4000::/40", - "region": "ap-northeast-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:c000::/40", - "region": "ap-southeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f18::/33", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ff8:e000::/40", - "region": "sa-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fe:8000::/40", - "region": "cn-north-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2620:107:4000:7700::/56", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daa0:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:dafe:a000::/40", - "region": "ap-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da12::/36", - "region": "ap-northeast-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f01:4890::/47", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:daff:6000::/40", - "region": "ap-northeast-3", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1f00:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2406:da00:ff00::/64", - "region": "us-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:5300::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:9000:a700::/40", - "region": "GLOBAL", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a05:d07a:e000::/40", - "region": "me-south-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1ffc:5000::/40", - "region": "us-gov-east-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2600:1fff:6000::/40", - "region": "us-east-2", - "service": "AMAZON" - }, - { - "ipv6_prefix": "240f:80fa:4000::/40", - "region": "cn-northwest-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2a01:578:3::/64", - "region": "eu-west-1", - "service": "AMAZON" - }, - { - "ipv6_prefix": "2804:800:ff00::b147:cf80/122", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2400:6700:ff00::36f8:dc00/122", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2403:b300:ff00::36fc:4f80/122", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da00:ff00::36f3:1fc0/122", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da14:fff:f800::/53", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2400:6500:ff00::36ff:fec0/122", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2a01:578:3::36e4:1000/122", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f14:fff:f800::/53", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f14:7ff:f800::/53", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da1c:7ff:f800::/53", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f18:7fff:f800::/53", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f18:3fff:f800::/53", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2804:800:ff00::36e8:2840/122", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2620:107:300f::36f1:2040/122", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2620:108:700f::36f4:34c0/122", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2620:107:300f::36b7:ff80/122", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2403:b300:ff00::36fc:fec0/122", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2a05:d018:7ff:f800::/53", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da00:ff00::6b17:ff00/122", - "region": "us-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2400:6700:ff00::36fa:fdc0/122", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da18:fff:f800::/53", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2620:108:700f::36f5:a800/122", - "region": "us-west-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f1c:7ff:f800::/53", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da1c:fff:f800::/53", - "region": "ap-southeast-2", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f1e:fff:f800::/53", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f1c:fff:f800::/53", - "region": "us-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da14:7ff:f800::/53", - "region": "ap-northeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2a05:d018:fff:f800::/53", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2400:6500:ff00::36fb:1f80/122", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:da18:7ff:f800::/53", - "region": "ap-southeast-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2600:1f1e:7ff:f800::/53", - "region": "sa-east-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2a01:578:3::b022:9fc0/122", - "region": "eu-west-1", - "service": "ROUTE53_HEALTHCHECKS" - }, - { - "ipv6_prefix": "2406:daf8:c000::/40", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:6000::/40", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d050:2000::/40", - "region": "eu-west-3", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:8000::/40", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:2000::/40", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:8000::/40", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d050:e000::/40", - "region": "me-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d050:c000::/40", - "region": "eu-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:6000::/40", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:a000::/40", - "region": "ap-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:c000::/40", - "region": "eu-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:4000::/40", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:a000::/40", - "region": "ap-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:2000::/40", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:6000::/40", - "region": "us-east-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:4000::/40", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:4000::/40", - "region": "us-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d050:8000::/40", - "region": "eu-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:6000::/40", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:1000::/40", - "region": "ca-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:c000::/40", - "region": "us-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:e000::/40", - "region": "me-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:4000::/40", - "region": "us-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d050:4000::/40", - "region": "eu-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:8000::/40", - "region": "us-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:c000::/40", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:c000::/40", - "region": "us-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:c000::/40", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:e000::/40", - "region": "sa-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:8000::/40", - "region": "eu-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf8:8000::/40", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:4000::/40", - "region": "us-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80a0:8000::/40", - "region": "cn-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:c000::/40", - "region": "ap-southeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:2000::/40", - "region": "eu-west-3", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:5000::/36", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80f9:8000::/40", - "region": "cn-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80a0:4000::/40", - "region": "cn-northwest-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:4000::/40", - "region": "us-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:8000::/40", - "region": "eu-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:4000::/40", - "region": "eu-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80f8:4000::/40", - "region": "cn-northwest-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80fa:8000::/40", - "region": "cn-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:e000::/40", - "region": "sa-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80f9:4000::/40", - "region": "cn-northwest-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:2000::/40", - "region": "eu-west-3", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:8000::/40", - "region": "us-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:6000::/40", - "region": "us-east-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:c000::/40", - "region": "eu-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:c000::/40", - "region": "us-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:2000::/40", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:c000::/40", - "region": "eu-west-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:2000::/40", - "region": "eu-west-3", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:6000::/40", - "region": "eu-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:2000::/40", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:e000::/40", - "region": "me-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:1000::/40", - "region": "ca-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf8:2000::/40", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:6000::/40", - "region": "us-east-2", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf8:a000::/40", - "region": "ap-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:1000::/40", - "region": "ca-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:5000::/40", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:1000::/40", - "region": "ca-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:2000::/40", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:4000::/40", - "region": "eu-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1fa0:5000::/40", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf8:6000::/40", - "region": "ap-northeast-3", - "service": "S3" - }, - { - "ipv6_prefix": "2406:dafa:8000::/40", - "region": "ap-southeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:5000::/40", - "region": "us-gov-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:8000::/40", - "region": "us-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:2000::/40", - "region": "us-gov-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:4000::/40", - "region": "eu-central-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:8000::/40", - "region": "eu-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:8000::/40", - "region": "us-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d078:6000::/40", - "region": "eu-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:c000::/40", - "region": "us-west-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:4000::/40", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf9:2000::/40", - "region": "ap-northeast-2", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d079:6000::/40", - "region": "eu-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ffa:e000::/40", - "region": "sa-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff9:6000::/40", - "region": "us-east-2", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80f8:8000::/40", - "region": "cn-north-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daf8:4000::/40", - "region": "ap-northeast-1", - "service": "S3" - }, - { - "ipv6_prefix": "2600:1ff8:e000::/40", - "region": "sa-east-1", - "service": "S3" - }, - { - "ipv6_prefix": "2406:daa0:a000::/40", - "region": "ap-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d07a:e000::/40", - "region": "me-south-1", - "service": "S3" - }, - { - "ipv6_prefix": "240f:80fa:4000::/40", - "region": "cn-northwest-1", - "service": "S3" - }, - { - "ipv6_prefix": "2a05:d000:8000::/40", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:8000::/40", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da1a::/36", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d000:4000::/40", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2620:107:300f::/64", - "region": "us-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da18::/36", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2400:6500:ff00::/64", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:80ff:4000::/40", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:c000::/40", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f14::/35", - "region": "us-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:e000::/40", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d000:c000::/40", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:e000::/40", - "region": "me-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:1000::/40", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:4000::/40", - "region": "us-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:4000::/40", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:4000::/40", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:1000::/40", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d000:e000::/40", - "region": "me-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da16::/36", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:2000::/40", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d016::/36", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:8000::/40", - "region": "ap-southeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:c000::/40", - "region": "us-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f12::/36", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:6000::/40", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:e000::/40", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:c000::/40", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:2000::/40", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:8000::/40", - "region": "us-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f1c::/36", - "region": "us-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d012::/36", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:6000::/40", - "region": "us-east-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2620:108:700f::/64", - "region": "us-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f11::/36", - "region": "ca-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:2000::/40", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:8014::/36", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:8000::/40", - "region": "us-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f1e::/36", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d01e::/36", - "region": "me-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:c000::/40", - "region": "us-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:2000::/40", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2400:6700:ff00::/64", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2403:b300:ff00::/64", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f16::/36", - "region": "us-east-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:a000::/40", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:4000::/40", - "region": "us-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:2000::/40", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d07f:8000::/40", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:8018::/36", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a01:578:13::/64", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:a000::/40", - "region": "ap-south-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2620:107:4007::/64", - "region": "us-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:8000:4000::/40", - "region": "cn-northwest-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f15::/32", - "region": "us-gov-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:c000::/40", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da14::/36", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d000:2000::/40", - "region": "eu-west-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2620:108:d00f::/64", - "region": "us-gov-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da1c::/36", - "region": "ap-southeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:6000::/40", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2804:800:ff00::/64", - "region": "sa-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:4000::/40", - "region": "ap-northeast-1", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:8000:8000::/40", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d018::/36", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "240f:80ff:8000::/40", - "region": "cn-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d01c::/36", - "region": "eu-west-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d000:6000::/40", - "region": "eu-north-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2a05:d014::/36", - "region": "eu-central-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f18::/33", - "region": "us-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:5000::/40", - "region": "us-gov-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da12::/36", - "region": "ap-northeast-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:daff:6000::/40", - "region": "ap-northeast-3", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1f00:5000::/40", - "region": "us-gov-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2406:da00:ff00::/64", - "region": "us-east-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:1fff:6000::/40", - "region": "us-east-2", - "service": "EC2" - }, - { - "ipv6_prefix": "2a01:578:3::/64", - "region": "eu-west-1", - "service": "EC2" - }, - { - "ipv6_prefix": "2600:9000:eee::/48", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:4000::/36", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:3000::/36", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:f000::/36", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:fff::/48", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:2000::/36", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:1000::/36", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:ddd::/48", - "region": "GLOBAL", - "service": "CLOUDFRONT" - }, - { - "ipv6_prefix": "2600:9000:5300::/40", - "region": "GLOBAL", - "service": "CLOUDFRONT" - } - ] -} \ No newline at end of file diff --git a/lib/markup.py b/lib/markup.py deleted file mode 100644 index 0891d7b2..00000000 --- a/lib/markup.py +++ /dev/null @@ -1,559 +0,0 @@ -# This code is in the public domain, it comes with absolutely no -# warranty and you can do absolutely whatever you want with it. - -__date__ = '17 May 2007' -__version__ = '1.7' -__doc__ = """ -This is markup.py - a Python module that attempts to -make it easier to generate HTML/XML from a Python program -in an intuitive, lightweight, customizable and pythonic way. - -The code is in the public domain. - -Version: %s as of %s. - -Documentation and further info is at http://markup.sourceforge.net/ - -Please send bug reports, feature requests, enhancement -ideas or questions to nogradi at gmail dot com. - -Installation: drop markup.py somewhere into your Python path. -""" % ( __version__, __date__ ) - - -class element: - - """This class handles the addition of a new element.""" - - def __init__(self, tag, case='lower', parent=None): - self.parent = parent - - if case == 'lower': - self.tag = tag.lower() - else: - self.tag = tag.upper() - - def __call__(self, *args, **kwargs): - if len(args) > 1: - raise ArgumentError(self.tag) - - # If class_ was defined in parent, it should be added to every element. - if self.parent is not None and self.parent.class_ is not None: - if 'class_' not in kwargs: - kwargs['class_'] = self.parent.class_ - - if self.parent is None and len(args) == 1: - x = [self.render(self.tag, False, myarg, mydict) - for myarg, mydict in _argsdicts(args, kwargs)] - return '\n'.join(x) - elif self.parent is None and len(args) == 0: - x = [self.render(self.tag, True, myarg, mydict) - for myarg, mydict in _argsdicts(args, kwargs)] - return '\n'.join(x) - - if self.tag in self.parent.twotags: - for myarg, mydict in _argsdicts(args, kwargs): - self.render(self.tag, False, myarg, mydict) - elif self.tag in self.parent.onetags: - if len(args) == 0: - for myarg, mydict in _argsdicts(args, kwargs): - # Here myarg is always None, because len( args ) = 0. - self.render(self.tag, True, myarg, mydict) - else: - raise ClosingError(self.tag) - elif self.parent.mode == 'strict_html' and self.tag in self.parent.deptags: - raise DeprecationError(self.tag) - else: - raise InvalidElementError(self.tag, self.parent.mode) - - def render(self, tag, single, between, kwargs): - """Append the actual tags to content.""" - - out = "<%s" % tag - for key, value in kwargs.items(): - # When value is None, that means stuff like <... checked>. - if value is not None: - # Strip this so class_ will mean class, etc. - key = key.strip('_') - # Special cases, maybe change _ to - overall? - if key == 'http_equiv': - key = 'http-equiv' - elif key == 'accept_charset': - key = 'accept-charset' - out = "%s %s=\"%s\"" % (out, key, escape(value)) - else: - out = "%s %s" % (out, key) - if between is not None: - out = "%s>%s" % (out, between, tag) - else: - if single: - out = "%s />" % out - else: - out = "%s>" % out - if self.parent is not None: - self.parent.content.append(out) - else: - return out - - def close(self): - """Append a closing tag unless element has only opening tag.""" - - if self.tag in self.parent.twotags: - self.parent.content.append("" % self.tag) - elif self.tag in self.parent.onetags: - raise ClosingError(self.tag) - elif self.parent.mode == 'strict_html' and self.tag in self.parent.deptags: - raise DeprecationError(self.tag) - - def open(self, **kwargs): - """Append an opening tag.""" - - if self.tag in self.parent.twotags or self.tag in self.parent.onetags: - self.render(self.tag, False, None, kwargs) - elif self.mode == 'strict_html' and self.tag in self.parent.deptags: - raise DeprecationError(self.tag) - - -class page: - - """This is our main class representing a document. Elements are added as - attributes of an instance of this class.""" - - def __init__(self, mode='strict_html', case='lower', - onetags=None, twotags=None, separator='\n', class_=None): - """Stuff that effects the whole document. - - mode -- 'strict_html' for HTML 4.01 (default) - 'html' alias for 'strict_html' - 'loose_html' to allow some deprecated elements - 'xml' to allow arbitrary elements - - case -- 'lower' element names will be printed in lower case (default) - 'upper' they will be printed in upper case - - onetags -- list or tuple of valid elements with opening tags only - twotags -- list or tuple of valid elements with both opening and closing tags - these two keyword arguments may be used to select - the set of valid elements in 'xml' mode - invalid elements will raise appropriate exceptions - - separator -- string to place between added elements, defaults to newline - - class_ -- a class that will be added to every element if defined""" - - valid_onetags = [ - "AREA", - "BASE", - "BR", - "COL", - "FRAME", - "HR", - "IMG", - "INPUT", - "LINK", - "META", - "PARAM"] - valid_twotags = [ - "A", "ABBR", "ACRONYM", "ADDRESS", "B", "BDO", "BIG", "BLOCKQUOTE", "BODY", "BUTTON", - "CAPTION", "CITE", "CODE", "COLGROUP", "DD", "DEL", "DFN", "DIV", "DL", "DT", "EM", "FIELDSET", - "FORM", "FRAMESET", "H1", "H2", "H3", "H4", "H5", "H6", "HEAD", "HTML", "I", "IFRAME", "INS", - "KBD", "LABEL", "LEGEND", "LI", "MAP", "NOFRAMES", "NOSCRIPT", "OBJECT", "OL", "OPTGROUP", - "OPTION", "P", "PRE", "Q", "SAMP", "SCRIPT", "SELECT", "SMALL", "SPAN", "STRONG", "STYLE", - "SUB", "SUP", "TABLE", "TBODY", "TD", "TEXTAREA", "TFOOT", "TH", "THEAD", "TITLE", "TR", - "TT", "UL", "VAR"] - deprecated_onetags = ["BASEFONT", "ISINDEX"] - deprecated_twotags = [ - "APPLET", - "CENTER", - "DIR", - "FONT", - "MENU", - "S", - "STRIKE", - "U"] - - self.header = [] - self.content = [] - self.footer = [] - self.case = case - self.separator = separator - - # init( ) sets it to True so we know that has to be printed at the end. - self._full = False - self.class_ = class_ - - if mode == 'strict_html' or mode == 'html': - self.onetags = valid_onetags - self.onetags += [str.lower(x) for x in self.onetags] - self.twotags = valid_twotags - self.twotags += [str.lower(x) for x in self.twotags] - self.deptags = deprecated_onetags + deprecated_twotags - self.deptags += [str.lower(x) for x in self.deptags] - self.mode = 'strict_html' - elif mode == 'loose_html': - self.onetags = valid_onetags + deprecated_onetags - self.onetags += [str.lower(x) for x in self.onetags] - self.twotags = valid_twotags + deprecated_twotags - self.onetags += [str.lower(x) for x in self.twotags] - self.mode = mode - elif mode == 'xml': - if onetags and twotags: - self.onetags = onetags - self.twotags = twotags - elif (onetags and not twotags) or (twotags and not onetags): - raise CustomizationError() - else: - self.onetags = russell() - self.twotags = russell() - self.mode = mode - else: - raise ModeError(mode) - - def __getattr__(self, attr): - if attr.startswith("__") and attr.endswith("__"): - raise AttributeError(attr) - return element(attr, case=self.case, parent=self) - - def __str__(self): - - if self._full and (self.mode == 'strict_html' or self.mode == 'loose_html'): - end = ['', ''] - else: - end = [] - - return ( - self.separator.join( - self.header + - self.content + - self.footer + - end) - ) - - def __call__(self, escape=False): - """Return the document as a string. - - escape -- False print normally - True replace < and > by < and > - the default escape sequences in most browsers""" - - if escape: - return _escape(self.__str__()) - else: - return self.__str__() - - def add(self, text): - """This is an alias to addcontent.""" - self.addcontent(text) - - def addfooter(self, text): - """Add some text to the bottom of the document""" - self.footer.append(text) - - def addheader(self, text): - """Add some text to the top of the document""" - self.header.append(text) - - def addcontent(self, text): - """Add some text to the main part of the document""" - self.content.append(text) - - def init(self, lang='en', css=None, metainfo=None, title=None, header=None, - footer=None, charset=None, encoding=None, doctype=None, bodyattrs=None, script=None): - """This method is used for complete documents with appropriate - doctype, encoding, title, etc information. For an HTML/XML snippet - omit this method. - - lang -- language, usually a two character string, will appear - as in html mode (ignored in xml mode) - - css -- Cascading Style Sheet filename as a string or a list of - strings for multiple css files (ignored in xml mode) - - metainfo -- a dictionary in the form { 'name':'content' } to be inserted - into meta element(s) as - (ignored in xml mode) - - bodyattrs --a dictionary in the form { 'key':'value', ... } which will be added - as attributes of the element as - (ignored in xml mode) - - script -- dictionary containing src:type pairs, - - title -- the title of the document as a string to be inserted into - a title element as my title (ignored in xml mode) - - header -- some text to be inserted right after the element - (ignored in xml mode) - - footer -- some text to be inserted right before the element - (ignored in xml mode) - - charset -- a string defining the character set, will be inserted into a - - element (ignored in xml mode) - - encoding -- a string defining the encoding, will be put into to first line of - the document as in - xml mode (ignored in html mode) - - doctype -- the document type string, defaults to - - in html mode (ignored in xml mode)""" - - self._full = True - - if self.mode == 'strict_html' or self.mode == 'loose_html': - if doctype is None: - doctype = "" - self.header.append(doctype) - self.html(lang=lang) - self.head() - if charset is not None: - self.meta( - http_equiv='Content-Type', - content="text/html; charset=%s" % - charset) - if metainfo is not None: - self.metainfo(metainfo) - if css is not None: - self.css(css) - if title is not None: - self.title(title) - if script is not None: - self.scripts(script) - self.head.close() - if bodyattrs is not None: - self.body(**bodyattrs) - else: - self.body() - if header is not None: - self.content.append(header) - if footer is not None: - self.footer.append(footer) - - elif self.mode == 'xml': - if doctype is None: - if encoding is not None: - doctype = "" % encoding - else: - doctype = "" - self.header.append(doctype) - - def css(self, filelist): - """This convenience function is only useful for html. It adds CSS - stylesheet(s) to the document via the element.""" - - if isinstance(filelist, str): - self.link( - href=filelist, - rel='stylesheet', - type='text/css', - media='all') - else: - for file in filelist: - self.link( - href=file, - rel='stylesheet', - type='text/css', - media='all') - - def metainfo(self, mydict): - """This convenience function is only useful for html. It adds meta - information via the element, the argument is a dictionary of - the form { 'name':'content' }.""" - - if isinstance(mydict, dict): - for name, content in mydict.items(): - self.meta(name=name, content=content) - else: - raise TypeError( - "Metainfo should be called with a dictionary argument of name:content pairs.") - - def scripts(self, mydict): - """Only useful in html, mydict is dictionary of src:type pairs will - be rendered as """ - - if isinstance(mydict, dict): - for src, type in mydict.items(): - self.script('', src=src, type='text/%s' % type) - else: - raise TypeError( - "Script should be given a dictionary of src:type pairs.") - - -class _oneliner: - - """An instance of oneliner returns a string corresponding to one element. - This class can be used to write 'oneliners' that return a string - immediately so there is no need to instantiate the page class.""" - - def __init__(self, case='lower'): - self.case = case - - def __getattr__(self, attr): - if attr.startswith("__") and attr.endswith("__"): - raise AttributeError(attr) - return element(attr, case=self.case, parent=None) - - -oneliner = _oneliner(case='lower') -upper_oneliner = _oneliner(case='upper') - - -def _argsdicts(args, mydict): - """A utility generator that pads argument list and dictionary values, will - only be called with len( args ) = 0, 1.""" - - if len(args) == 0: - args = None, - elif len(args) == 1: - args = _totuple(args[0]) - else: - raise Exception("We should have never gotten here.") - - mykeys = list(mydict.keys()) - myvalues = list(map(_totuple, list(mydict.values()))) - maxlength = max(list(map(len, [args] + myvalues))) - for i in range(maxlength): - thisdict = {} - for key, value in zip(mykeys, myvalues): - try: - thisdict[key] = value[i] - except IndexError: - thisdict[key] = value[-1] - try: - thisarg = args[i] - except IndexError: - thisarg = args[-1] - - yield thisarg, thisdict - - -def _totuple(x): - """Utility stuff to convert string, int, float, None or anything to a usable tuple.""" - - if isinstance(x, str): - out = x, - elif isinstance(x, (int, float)): - out = str(x), - elif x is None: - out = None, - else: - out = tuple(x) - - return out - - -def escape(text, newline=False): - """Escape special html characters.""" - - if isinstance(text, str): - if '&' in text: - text = text.replace('&', '&') - if '>' in text: - text = text.replace('>', '>') - if '<' in text: - text = text.replace('<', '<') - if '\"' in text: - text = text.replace('\"', '"') - if '\'' in text: - text = text.replace('\'', '"') - if newline: - if '\n' in text: - text = text.replace('\n', '
') - - return text - - -_escape = escape - - -def unescape(text): - """Inverse of escape.""" - - if isinstance(text, str): - if '&' in text: - text = text.replace('&', '&') - if '>' in text: - text = text.replace('>', '>') - if '<' in text: - text = text.replace('<', '<') - if '"' in text: - text = text.replace('"', '\"') - - return text - - -class dummy: - - """A dummy class for attaching attributes.""" - pass - -doctype = dummy() -doctype.frameset = "" -doctype.strict = "" -doctype.loose = "" - - -class russell: - - """A dummy class that contains anything.""" - - def __contains__(self, item): - return True - - -class MarkupError(Exception): - - """All our exceptions subclass this.""" - - def __str__(self): - return self.message - - -class ClosingError(MarkupError): - - def __init__(self, tag): - self.message = "The element '%s' does not accept non-keyword arguments (has no closing tag)." % tag - - -class OpeningError(MarkupError): - - def __init__(self, tag): - self.message = "The element '%s' can not be opened." % tag - - -class ArgumentError(MarkupError): - - def __init__(self, tag): - self.message = "The element '%s' was called with more than one non-keyword argument." % tag - - -class InvalidElementError(MarkupError): - - def __init__(self, tag, mode): - self.message = "The element '%s' is not valid for your mode '%s'." % ( - tag, - mode) - - -class DeprecationError(MarkupError): - - def __init__(self, tag): - self.message = "The element '%s' is deprecated, instantiate markup.page with mode='loose_html' to allow it." % tag - - -class ModeError(MarkupError): - - def __init__(self, mode): - self.message = "Mode '%s' is invalid, possible values: strict_html, loose_html, xml." % mode - - -class CustomizationError(MarkupError): - - def __init__(self): - self.message = "If you customize the allowed elements, you must define both types 'onetags' and 'twotags'." - - -if __name__ == '__main__': - print(__doc__) diff --git a/lib/port_scanner.py b/lib/port_scanner.py deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/reportgraph.py b/lib/reportgraph.py deleted file mode 100644 index 5b83016f..00000000 --- a/lib/reportgraph.py +++ /dev/null @@ -1,96 +0,0 @@ -from datetime import datetime -from lib import stash -import plotly -import plotly.graph_objs as go -import plotly.plotly as py - -try: - db = stash.stash_manager() - db.do_init() -except Exception: - pass - - class GraphGenerator: - - def __init__(self, domain): - self.domain = domain - self.bardata = [] - self.barcolumns = [] - self.scatterxdata = [] - self.scattercountemails = [] - self.scattercounthosts = [] - self.scattercountips = [] - self.scattercountshodans = [] - self.scattercountvhosts = [] - - def drawlatestscangraph(self, domain, latestscandata): - try: - self.barcolumns = ['email', 'host', 'ip', 'shodan', 'vhost'] - self.bardata.append(latestscandata['email']) - self.bardata.append(latestscandata['host']) - self.bardata.append(latestscandata['ip']) - self.bardata.append(latestscandata['shodan']) - self.bardata.append(latestscandata['vhost']) - layout = dict(title='Latest scan - number of targets identified for ' + domain, - xaxis=dict(title='Targets'), - yaxis=dict(title='Hits'),) - barchartcode = plotly.offline.plot({ - 'data': [go.Bar(x=self.barcolumns, y=self.bardata)], - 'layout': layout, - }, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div') - return barchartcode - except Exception as e: - print(f'Error generating HTML bar graph code for domain: {e}') - - def drawscattergraphscanhistory(self, domain, scanhistorydomain): - try: - scandata = scanhistorydomain - for i in scandata: - self.scatterxdata.append(datetime.date(datetime.strptime(i['date'], '%Y-%m-%d'))) - self.scattercountemails.append(int(i['email'])) - self.scattercounthosts.append(int(i['hosts'])) - self.scattercountips.append(int(i['ip'])) - self.scattercountshodans.append(int(i['shodan'])) - self.scattercountvhosts.append(int(i['vhost'])) - - trace0 = go.Scatter( - x=self.scatterxdata, - y=self.scattercounthosts, - mode='lines+markers', - name='hosts') - - trace1 = go.Scatter( - x=self.scatterxdata, - y=self.scattercountips, - mode='lines+markers', - name='IP address') - - trace2 = go.Scatter( - x=self.scatterxdata, - y=self.scattercountvhosts, - mode='lines+markers', - name='vhost') - - trace3 = go.Scatter( - x=self.scatterxdata, - y=self.scattercountshodans, - mode='lines+markers', - name='shodan') - - trace4 = go.Scatter( - x=self.scatterxdata, - y=self.scattercountemails, - mode='lines+markers', - name='email') - - data = [trace0, trace1, trace2, trace3, trace4] - layout = dict(title='Scanning history for ' + domain, xaxis=dict(title='Date'), yaxis=dict(title='Results')) - scatterchartcode = plotly.offline.plot({ - 'data': data, - 'layout': layout}, auto_open=False, include_plotlyjs=False, filename='report.html', output_type='div') - return scatterchartcode - except Exception as e: - print(f'Error generating HTML for the historical graph for domain: {e}') - -except Exception as e: - print(f'Error in the reportgraph module: {e}') diff --git a/lib/resolvers.txt b/lib/resolvers.txt deleted file mode 100644 index d50a913d..00000000 --- a/lib/resolvers.txt +++ /dev/null @@ -1,2016 +0,0 @@ -1.0.0.1 -1.1.1.1 -141.1.27.249 -194.190.225.2 -194.225.16.5 -91.185.6.10 -194.2.0.50 -66.187.16.5 -83.222.161.130 -69.60.160.196 -194.150.118.3 -84.8.2.11 -195.175.39.40 -193.239.159.37 -205.152.6.20 -82.151.90.1 -144.76.202.253 -103.3.46.254 -5.144.17.119 -195.129.12.122 -211.35.96.6 -202.138.120.4 -209.130.139.2 -64.81.127.2 -202.199.160.206 -195.66.68.2 -103.3.76.7 -202.219.177.121 -216.143.135.12 -141.211.144.17 -101.203.168.123 -217.73.17.110 -205.242.187.234 -62.192.160.39 -187.115.52.101 -122.155.167.38 -203.229.169.69 -69.25.1.1 -121.52.87.38 -209.51.161.58 -80.72.146.2 -195.245.76.6 -149.156.64.210 -195.74.128.6 -81.15.197.10 -213.0.77.5 -212.89.130.180 -91.194.112.10 -203.146.237.222 -1.2.4.8 -200.118.2.88 -213.131.178.10 -203.63.8.27 -62.168.59.67 -200.175.3.232 -205.151.222.250 -213.115.244.69 -81.200.80.11 -195.206.7.98 -213.201.230.20 -63.146.122.11 -188.94.19.10 -114.114.114.119 -203.189.89.29 -190.9.57.2 -193.52.218.19 -62.183.50.230 -129.7.1.6 -202.248.37.74 -141.211.125.15 -91.195.202.131 -146.94.1.3 -35.8.2.41 -206.13.29.12 -63.218.44.186 -83.242.139.11 -217.117.111.1 -66.250.7.154 -213.157.176.3 -38.98.10.132 -84.21.31.230 -213.144.3.210 -89.140.140.8 -195.67.27.18 -200.62.64.1 -212.57.190.166 -82.115.163.2 -207.91.130.4 -213.235.248.245 -67.90.152.122 -79.140.66.38 -208.67.220.220 -195.189.131.1 -212.30.96.211 -202.14.67.4 -205.134.162.209 -213.169.55.10 -217.169.242.2 -212.24.98.97 -209.55.0.110 -15.227.128.50 -159.90.200.8 -216.244.192.3 -212.16.72.254 -195.54.152.2 -147.29.10.6 -69.67.254.2 -110.170.117.15 -217.76.240.2 -202.43.178.244 -101.255.64.74 -85.185.6.35 -72.37.141.91 -129.219.13.81 -204.95.160.2 -103.9.124.89 -210.248.255.82 -205.151.222.251 -212.214.82.198 -82.212.67.100 -108.61.213.134 -213.55.96.166 -121.194.2.2 -93.188.152.3 -198.6.1.3 -64.215.98.148 -193.252.247.52 -164.124.101.82 -82.182.37.49 -212.37.208.3 -213.184.242.6 -212.236.250.4 -193.89.221.2 -194.39.185.10 -70.36.0.5 -91.189.0.5 -217.71.105.254 -203.238.227.100 -203.109.129.68 -115.68.45.3 -193.109.4.5 -134.60.1.111 -78.143.192.10 -212.97.32.2 -212.57.190.166 -200.175.3.30 -193.27.80.34 -165.194.1.1 -194.25.0.60 -203.189.89.36 -216.66.22.2 -213.143.96.1 -213.184.0.42 -62.24.228.202 -91.214.72.34 -194.169.244.33 -192.116.16.26 -95.85.9.86 -91.188.0.5 -211.60.155.5 -209.145.176.20 -210.131.113.123 -217.113.48.1 -131.191.7.12 -64.105.163.106 -203.189.89.82 -69.7.192.2 -110.76.151.254 -212.9.160.1 -216.184.96.5 -61.63.0.66 -103.20.188.35 -195.234.101.234 -62.231.76.49 -208.72.120.204 -209.213.64.2 -213.211.50.2 -83.137.41.9 -195.113.144.194 -66.163.0.173 -109.69.8.34 -202.180.160.1 -216.81.128.132 -103.9.124.145 -92.43.224.1 -63.105.204.164 -212.96.1.70 -213.157.196.130 -81.173.113.30 -216.185.64.6 -212.26.6.11 -64.79.224.3 -62.243.190.9 -194.1.154.37 -193.186.162.3 -212.66.0.1 -195.175.39.39 -198.6.1.5 -62.77.85.100 -178.212.102.76 -217.151.0.50 -212.53.35.20 -101.255.64.62 -203.189.88.148 -213.157.0.193 -217.30.50.100 -178.151.86.169 -193.33.114.2 -193.228.86.5 -195.170.55.1 -148.160.20.195 -194.132.119.151 -64.181.43.34 -203.133.1.8 -83.233.78.163 -62.76.76.62 -64.105.202.138 -217.197.84.69 -212.34.194.211 -202.91.8.219 -122.0.0.13 -216.17.128.2 -195.166.192.1 -200.95.144.4 -202.116.128.1 -193.255.146.53 -202.65.159.4 -216.47.160.13 -117.102.224.26 -64.85.177.11 -168.88.66.6 -195.234.101.234 -83.177.163.51 -84.45.85.23 -101.255.64.114 -198.60.22.2 -66.165.173.235 -50.9.119.3 -195.177.240.3 -194.169.205.1 -151.236.6.156 -194.28.223.2 -195.158.239.4 -178.161.146.10 -64.94.1.33 -216.81.96.68 -63.251.161.33 -199.44.194.2 -159.90.200.7 -217.18.206.22 -101.255.64.227 -217.77.223.114 -122.155.167.8 -194.246.126.68 -93.91.146.150 -205.211.206.141 -82.99.212.18 -80.66.0.30 -212.37.208.4 -203.189.89.209 -209.252.33.101 -212.85.128.2 -196.29.40.3 -61.31.233.1 -213.157.0.194 -203.115.225.25 -195.140.236.250 -62.243.190.7 -193.232.69.22 -87.204.12.134 -209.183.48.21 -85.185.144.136 -206.126.32.101 -217.149.17.1 -111.223.252.193 -200.85.0.105 -194.145.147.195 -194.226.48.12 -216.186.27.15 -216.21.128.22 -77.241.112.23 -89.146.204.5 -207.190.94.129 -211.78.130.10 -210.23.64.1 -95.86.129.42 -200.85.44.70 -83.170.69.2 -193.231.173.2 -193.142.218.3 -157.157.90.193 -213.88.195.147 -83.97.97.3 -194.150.168.168 -212.42.165.37 -217.168.40.198 -66.216.18.222 -194.141.45.4 -198.82.247.34 -216.254.141.2 -213.241.193.250 -202.130.97.65 -193.33.236.1 -42.62.176.38 -195.186.4.110 -69.88.0.17 -69.26.129.2 -212.76.68.200 -210.23.129.34 -198.6.1.195 -202.203.192.33 -66.118.80.5 -213.233.161.69 -206.13.31.12 -84.241.98.36 -218.232.110.36 -67.17.215.132 -193.169.32.1 -78.38.253.138 -177.19.48.144 -188.114.194.2 -209.0.205.50 -139.130.4.4 -80.254.79.157 -202.46.1.2 -195.216.64.144 -201.163.145.101 -212.36.24.3 -210.29.96.33 -89.107.210.172 -194.113.160.68 -195.189.130.1 -213.178.66.111 -62.148.228.2 -216.47.160.12 -195.5.125.3 -186.107.119.118 -209.145.150.10 -209.195.95.95 -187.115.53.162 -62.243.190.8 -77.59.224.11 -91.189.0.2 -93.191.32.131 -62.3.32.17 -209.244.0.4 -212.31.253.69 -62.122.184.81 -213.144.108.117 -80.84.72.20 -208.112.89.187 -217.24.112.2 -206.51.143.55 -213.128.194.2 -212.118.241.1 -81.189.212.129 -81.222.80.2 -165.21.83.88 -87.105.250.3 -212.87.29.6 -68.179.203.94 -213.144.3.210 -180.211.129.42 -200.49.160.35 -38.119.98.220 -104.45.88.179 -219.96.224.90 -193.252.247.52 -82.145.163.1 -93.157.14.65 -212.181.124.8 -154.15.245.2 -200.35.174.126 -193.43.17.4 -204.174.120.45 -212.19.128.4 -203.130.2.3 -117.102.224.118 -213.152.142.12 -217.174.252.116 -202.43.176.14 -89.235.9.9 -194.20.0.24 -213.171.220.209 -203.130.2.4 -91.207.164.4 -84.200.69.80 -195.128.252.4 -119.160.208.252 -212.31.32.131 -204.119.0.2 -114.114.114.114 -62.58.3.11 -209.191.129.65 -202.141.224.34 -80.74.253.18 -212.18.15.3 -67.214.64.6 -193.43.108.3 -208.79.56.204 -208.70.22.22 -218.49.29.140 -195.189.72.2 -88.147.158.1 -66.9.182.1 -212.98.160.65 -213.88.151.150 -195.68.193.10 -203.112.2.5 -58.97.113.158 -203.119.36.106 -63.171.232.38 -194.52.202.98 -212.94.162.33 -195.137.189.203 -199.5.47.164 -114.114.115.115 -83.166.8.18 -202.14.67.14 -82.144.181.1 -195.149.104.186 -85.174.190.2 -212.58.111.1 -195.228.254.165 -205.152.37.23 -194.117.245.2 -91.98.110.15 -213.0.77.8 -212.122.224.10 -194.152.241.2 -85.158.50.50 -64.91.92.22 -202.43.178.245 -85.233.82.86 -210.44.112.66 -200.49.160.31 -217.8.180.98 -208.67.222.222 -217.159.0.17 -69.60.160.203 -207.241.160.34 -94.142.161.73 -151.164.1.8 -216.17.128.1 -217.15.17.2 -212.91.184.2 -63.251.161.1 -220.227.60.12 -202.120.111.3 -195.14.50.21 -209.87.64.70 -195.178.60.2 -41.211.233.10 -217.69.160.18 -217.64.163.1 -208.69.84.9 -81.17.66.14 -209.90.160.220 -200.175.3.68 -213.244.72.31 -95.128.246.2 -66.92.64.2 -217.22.209.254 -193.26.6.130 -200.66.96.1 -83.242.140.10 -153.19.1.254 -8.3.48.20 -152.99.78.136 -79.141.81.250 -206.165.6.11 -148.243.65.16 -213.159.193.54 -195.153.19.10 -8.8.4.4 -188.227.48.254 -80.79.179.2 -203.189.89.15 -203.90.78.65 -217.107.10.254 -218.49.29.141 -195.96.208.1 -207.248.224.71 -89.191.149.2 -213.151.109.1 -216.52.126.1 -212.66.129.98 -77.88.8.2 -8.8.8.8 -203.189.89.134 -61.199.193.162 -93.186.161.211 -83.143.8.220 -194.54.66.242 -82.202.131.1 -194.158.206.206 -62.16.86.100 -195.137.162.149 -193.89.221.124 -219.163.55.74 -62.37.228.20 -193.151.93.3 -193.22.119.195 -151.236.29.92 -217.30.49.100 -217.28.113.13 -78.159.224.224 -122.155.12.215 -212.66.1.1 -212.116.76.76 -64.13.115.12 -62.140.239.1 -82.96.193.12 -212.9.64.12 -213.183.57.55 -193.243.128.91 -212.51.17.1 -62.141.38.230 -206.248.95.194 -194.226.211.11 -74.82.46.6 -213.184.16.1 -216.66.80.98 -158.43.192.1 -195.244.25.3 -213.136.40.32 -217.28.98.62 -212.230.255.1 -213.135.67.1 -212.118.0.2 -141.211.125.17 -195.214.240.136 -202.83.20.101 -193.111.34.18 -217.149.155.180 -142.77.2.85 -130.180.228.2 -89.233.250.137 -106.51.255.133 -91.194.211.134 -195.42.215.17 -64.105.199.76 -202.91.8.234 -193.45.139.20 -213.128.216.115 -217.66.226.8 -211.67.112.1 -129.219.17.5 -217.72.1.2 -213.251.133.164 -202.30.143.11 -213.183.65.31 -208.3.14.1 -207.17.190.5 -94.25.63.2 -217.79.225.8 -83.234.220.253 -198.6.1.1 -87.204.12.130 -200.88.127.23 -81.209.202.46 -210.2.4.8 -195.35.110.4 -213.141.72.250 -24.154.1.5 -194.145.147.194 -95.215.150.15 -205.134.162.209 -83.170.64.2 -81.28.128.34 -202.86.8.100 -207.44.226.173 -89.248.162.3 -82.216.111.122 -187.115.52.91 -200.194.67.214 -203.109.129.67 -194.50.10.2 -88.82.105.19 -213.140.34.65 -200.123.192.244 -141.50.161.12 -217.31.160.30 -192.190.173.40 -82.96.81.10 -37.235.1.174 -187.115.52.78 -207.17.190.7 -209.172.128.2 -219.252.48.67 -62.149.132.2 -91.203.188.1 -82.209.190.82 -194.8.53.1 -198.6.1.4 -200.175.3.69 -212.40.5.51 -195.26.96.2 -203.115.81.38 -8.3.48.30 -194.158.206.205 -212.87.132.53 -194.169.244.34 -63.251.129.33 -69.16.169.11 -31.47.189.170 -190.11.32.42 -202.130.97.65 -203.189.88.211 -193.226.61.1 -204.117.214.10 -83.69.77.2 -81.199.3.7 -35.8.2.45 -84.55.62.75 -213.158.72.1 -94.247.200.3 -210.94.0.7 -89.160.27.232 -120.50.44.141 -201.217.16.89 -196.41.225.11 -62.196.2.70 -203.253.64.1 -148.233.151.8 -194.141.44.130 -62.8.96.38 -202.51.96.5 -46.246.94.136 -91.194.178.5 -212.112.39.25 -203.210.142.132 -213.73.14.227 -209.130.136.2 -149.250.222.22 -212.69.161.100 -91.202.12.10 -213.129.120.3 -88.80.64.200 -220.233.0.1 -216.184.96.6 -212.15.128.1 -211.41.128.71 -194.14.0.6 -212.94.34.34 -216.229.0.25 -216.143.135.11 -216.143.135.12 -203.189.89.1 -195.161.115.3 -195.166.192.8 -8.15.12.5 -202.62.124.238 -212.40.5.50 -216.254.95.2 -62.58.3.11 -217.219.236.8 -80.190.248.146 -89.186.66.6 -194.54.128.232 -194.145.240.6 -62.149.33.134 -69.28.148.102 -79.141.83.250 -203.41.44.20 -208.38.1.15 -82.76.253.115 -91.196.8.2 -205.152.144.23 -200.9.115.2 -62.33.47.253 -188.114.193.254 -202.248.0.34 -91.207.40.2 -210.131.113.123 -202.73.36.135 -142.47.133.81 -204.116.57.2 -185.46.7.100 -217.115.16.2 -66.92.159.2 -217.31.204.130 -185.16.40.143 -220.128.173.228 -212.51.17.1 -81.23.144.250 -193.28.97.130 -89.107.16.2 -88.82.84.129 -91.98.132.60 -194.169.239.10 -42.62.178.65 -199.166.6.2 -62.3.32.16 -193.33.200.22 -90.189.109.2 -213.33.82.1 -199.103.16.5 -141.85.128.1 -209.216.160.2 -110.76.151.1 -193.230.161.4 -213.253.137.17 -222.124.249.115 -81.24.128.146 -194.18.231.5 -5.144.19.8 -62.20.17.205 -194.98.65.165 -194.102.106.1 -4.2.2.6 -101.255.64.134 -158.43.128.1 -212.58.3.2 -89.233.43.71 -193.16.209.2 -77.88.8.8 -62.73.100.4 -81.189.214.162 -158.43.128.72 -115.68.100.103 -69.146.17.3 -200.85.39.206 -64.91.92.21 -200.40.230.36 -90.183.74.1 -84.1.240.34 -83.243.39.61 -202.248.20.133 -81.27.135.50 -195.84.194.3 -195.182.110.132 -203.189.88.213 -80.190.200.10 -207.178.128.21 -212.94.162.33 -195.170.97.254 -77.247.176.114 -82.145.160.140 -152.99.1.10 -212.192.128.3 -142.77.2.36 -42.62.176.30 -195.225.36.16 -84.241.100.31 -217.78.80.74 -166.70.25.18 -216.21.129.22 -205.171.2.65 -195.46.48.22 -147.235.250.2 -130.85.1.3 -91.203.177.4 -178.151.86.169 -201.217.19.225 -204.119.0.2 -88.255.242.6 -91.135.110.132 -190.22.34.170 -213.244.5.67 -117.102.224.154 -91.149.108.10 -194.246.127.11 -194.67.74.2 -64.119.60.9 -216.184.96.4 -216.52.169.1 -83.136.56.52 -194.239.164.25 -216.116.96.3 -84.32.80.20 -216.66.38.58 -206.253.194.65 -61.31.1.1 -217.21.96.1 -91.198.154.133 -212.5.218.3 -78.31.96.2 -194.225.128.22 -76.73.18.50 -129.250.35.251 -161.53.128.16 -203.189.88.54 -89.208.10.10 -87.104.254.39 -66.250.192.11 -218.223.32.1 -213.178.66.2 -82.199.102.38 -193.22.110.251 -212.19.149.226 -213.144.108.117 -199.249.18.1 -69.67.97.18 -8.2.208.2 -212.96.130.140 -217.199.217.200 -195.67.127.137 -212.203.33.12 -64.91.3.46 -213.178.0.33 -121.52.87.56 -216.116.96.2 -212.59.199.6 -216.185.192.1 -110.76.151.241 -203.156.104.21 -61.56.211.185 -194.72.9.61 -209.0.205.11 -93.158.117.138 -84.200.70.40 -101.255.64.154 -212.85.112.32 -211.78.130.11 -81.23.144.250 -84.237.112.3 -83.137.193.83 -193.111.200.191 -207.230.202.28 -80.94.48.254 -66.242.160.5 -79.137.227.122 -217.116.53.13 -200.58.161.25 -66.203.72.10 -212.51.16.1 -93.88.151.138 -200.12.63.10 -203.242.200.15 -203.189.88.152 -64.132.61.131 -81.92.96.22 -139.134.5.51 -89.223.7.242 -95.158.129.2 -62.133.163.171 -202.44.55.193 -91.144.248.227 -81.17.72.70 -193.110.157.2 -203.189.88.54 -193.230.161.3 -64.72.224.34 -85.115.224.18 -193.77.33.18 -203.189.88.214 -212.214.82.194 -216.66.80.30 -194.120.55.3 -81.199.48.244 -212.66.1.1 -83.97.97.2 -202.180.64.2 -67.214.159.198 -213.157.0.194 -77.241.24.5 -195.190.17.6 -217.77.176.10 -72.11.150.74 -66.252.170.3 -94.155.91.8 -200.175.3.59 -194.12.224.34 -213.147.64.1 -84.241.98.37 -207.178.128.20 -202.180.64.9 -187.73.241.67 -195.67.15.102 -78.133.155.218 -194.183.88.41 -212.9.160.1 -208.48.253.106 -193.242.114.129 -85.219.142.1 -101.255.64.42 -82.96.86.20 -200.62.64.65 -220.68.64.1 -216.52.254.33 -66.81.0.252 -193.151.32.40 -63.251.62.1 -203.133.1.7 -202.148.202.4 -193.95.93.243 -212.82.226.212 -212.58.3.7 -62.20.57.226 -216.58.97.20 -170.56.58.53 -193.201.185.3 -62.177.42.174 -212.69.161.100 -64.212.106.85 -83.243.39.59 -62.233.128.17 -204.52.135.2 -217.78.80.70 -213.164.38.66 -62.129.252.215 -50.116.23.211 -80.94.32.240 -200.85.35.158 -200.175.3.58 -129.250.35.250 -91.220.187.3 -202.136.162.11 -115.85.69.162 -212.11.191.72 -213.172.33.34 -213.30.253.65 -202.148.202.3 -213.27.209.8 -198.6.1.2 -160.44.1.4 -216.237.221.42 -194.88.202.11 -212.19.96.2 -212.233.128.1 -141.211.144.15 -93.99.200.1 -62.20.76.35 -201.217.17.74 -101.255.64.90 -80.64.32.2 -114.130.11.66 -122.255.96.132 -203.119.8.106 -69.7.192.1 -216.52.129.1 -194.6.216.5 -203.250.129.214 -103.9.124.154 -193.231.80.7 -85.249.45.253 -208.122.23.23 -210.80.58.66 -196.207.15.42 -217.69.169.25 -200.113.185.227 -63.238.52.1 -64.119.80.100 -204.9.123.122 -206.124.64.1 -193.232.65.2 -193.111.238.5 -209.161.175.30 -166.102.165.32 -212.94.32.32 -129.7.1.1 -160.220.137.2 -95.173.193.3 -139.0.27.186 -66.119.93.10 -103.22.248.62 -206.248.79.244 -121.52.87.128 -91.143.20.6 -82.99.211.195 -66.92.224.2 -193.254.232.1 -216.131.95.20 -115.85.69.162 -83.143.154.234 -206.124.1.254 -101.255.64.241 -207.164.234.193 -222.124.8.50 -147.29.37.19 -199.2.252.10 -194.152.248.42 -83.69.77.6 -174.34.129.34 -207.130.95.40 -193.175.51.10 -87.197.40.58 -193.6.10.1 -209.63.0.18 -212.50.131.153 -80.94.52.254 -62.95.15.107 -80.78.162.2 -67.17.215.133 -213.139.190.3 -213.129.120.6 -217.168.144.127 -66.51.206.100 -193.200.68.230 -217.196.1.5 -212.71.98.250 -64.13.48.12 -170.51.255.100 -194.242.50.66 -216.235.1.3 -173.44.32.2 -128.199.248.105 -195.167.98.3 -119.252.20.75 -212.111.28.5 -217.21.48.1 -62.91.2.20 -206.74.254.2 -81.199.3.7 -165.87.13.129 -194.8.53.1 -64.140.243.112 -147.235.251.3 -212.82.225.7 -187.115.52.83 -101.255.64.150 -216.254.141.13 -213.27.209.53 -79.141.82.250 -194.213.193.5 -148.233.151.6 -200.85.60.210 -193.231.236.25 -62.177.42.174 -190.11.32.199 -207.179.3.25 -202.130.97.66 -199.101.98.178 -91.185.2.10 -217.18.90.105 -195.182.224.11 -69.28.97.4 -209.97.224.3 -94.124.19.16 -194.169.235.2 -87.229.99.1 -88.80.64.201 -62.181.119.131 -147.29.10.55 -194.73.96.50 -84.32.80.20 -216.146.35.230 -190.146.118.41 -110.76.151.17 -58.96.3.34 -193.16.255.2 -61.19.252.238 -208.92.9.21 -85.88.19.11 -83.241.175.98 -203.146.237.237 -64.91.89.2 -194.141.12.1 -194.54.181.90 -193.41.252.146 -201.131.4.9 -62.33.183.254 -119.160.208.251 -217.18.80.105 -202.86.216.1 -62.109.182.2 -64.105.189.26 -72.52.104.74 -81.92.97.12 -87.255.68.242 -134.48.1.32 -216.218.226.238 -85.214.132.203 -62.97.84.4 -210.220.163.82 -103.239.165.34 -213.218.117.85 -203.248.252.2 -65.183.98.90 -168.95.1.1 -209.213.223.18 -200.88.127.22 -217.32.105.66 -62.20.15.234 -149.211.153.51 -193.111.144.145 -203.89.226.26 -203.80.96.10 -193.78.240.12 -109.69.8.51 -78.142.133.43 -212.94.162.1 -77.240.144.164 -213.234.128.211 -91.209.108.17 -64.207.64.5 -213.137.73.254 -205.172.19.79 -83.219.241.2 -88.82.105.18 -209.55.1.220 -193.58.251.251 -206.253.33.130 -141.56.31.3 -161.53.129.139 -158.39.46.248 -122.210.229.161 -203.253.31.1 -195.60.70.5 -202.38.128.58 -62.134.11.4 -207.178.128.21 -195.166.13.4 -192.43.161.22 -200.69.193.2 -203.153.214.14 -81.24.128.146 -208.78.24.238 -211.172.241.54 -185.46.7.110 -198.188.2.69 -66.93.87.2 -194.33.15.3 -193.34.129.253 -91.212.56.5 -81.90.168.3 -216.198.139.68 -193.231.249.1 -195.70.237.42 -65.74.130.6 -91.210.24.22 -65.163.107.11 -202.181.224.2 -195.70.248.1 -208.122.23.22 -210.227.119.194 -79.99.224.24 -168.243.165.225 -202.83.30.5 -212.24.98.98 -194.176.190.2 -77.59.224.10 -80.190.200.55 -91.135.230.231 -212.209.194.170 -65.220.16.14 -66.207.160.111 -66.28.0.45 -216.185.192.2 -216.54.201.11 -68.179.203.94 -216.52.94.1 -193.33.220.3 -194.145.198.226 -212.14.253.242 -62.108.161.200 -66.81.1.252 -217.65.192.1 -122.155.167.70 -195.170.96.2 -198.6.1.146 -168.213.3.10 -64.85.177.10 -66.165.177.69 -85.94.224.1 -193.111.144.161 -64.61.99.2 -85.235.199.199 -193.33.174.3 -149.156.64.210 -115.68.62.222 -119.160.208.252 -216.58.97.21 -194.158.230.53 -202.138.120.6 -218.192.240.2 -152.99.200.6 -202.152.162.66 -173.241.133.178 -194.132.32.32 -193.231.238.1 -195.182.192.10 -212.66.160.2 -89.255.99.131 -212.85.128.2 -65.74.130.5 -63.251.62.33 -200.56.224.11 -103.3.76.82 -212.108.200.77 -194.250.223.1 -194.172.160.4 -195.140.236.253 -209.142.182.250 -106.186.17.181 -58.150.55.34 -103.9.124.154 -206.123.64.245 -87.104.254.135 -64.13.131.34 -148.243.65.17 -103.226.55.129 -81.180.201.99 -50.21.174.18 -216.175.203.51 -66.163.0.161 -66.146.0.1 -216.162.32.20 -89.208.120.10 -202.43.176.13 -77.241.25.3 -212.40.0.10 -206.53.177.3 -75.94.255.12 -93.90.82.50 -64.187.29.134 -217.144.144.211 -195.46.48.21 -4.2.2.1 -62.165.33.250 -212.87.130.92 -205.151.69.200 -198.6.1.142 -66.63.192.2 -82.198.129.146 -209.142.152.253 -103.9.124.90 -213.211.50.1 -212.31.32.130 -64.105.179.138 -190.248.153.98 -94.247.200.3 -206.13.30.12 -92.42.200.66 -212.73.65.40 -64.135.2.250 -69.28.97.4 -195.110.17.40 -158.43.240.3 -82.96.40.83 -164.2.255.241 -206.124.0.254 -216.52.94.33 -200.221.11.101 -216.52.161.33 -198.100.146.51 -203.189.88.133 -193.7.169.9 -212.118.241.33 -200.175.0.91 -164.33.1.4 -89.160.63.190 -212.41.4.1 -198.6.1.122 -65.39.139.53 -64.254.99.13 -64.132.94.250 -195.182.192.2 -81.7.200.80 -202.45.84.59 -212.118.241.33 -91.206.72.2 -206.252.187.110 -164.124.101.51 -38.112.17.138 -195.24.228.3 -195.221.20.10 -87.204.28.12 -217.198.161.1 -146.185.134.104 -193.142.115.131 -203.99.253.1 -81.18.242.100 -66.165.164.250 -103.3.213.210 -80.67.169.12 -193.17.213.10 -159.230.4.130 -203.189.88.156 -199.80.64.202 -212.230.255.129 -194.102.93.2 -93.88.148.138 -201.217.18.178 -77.109.138.45 -41.221.5.11 -203.189.88.212 -216.66.80.26 -12.127.16.67 -202.44.204.63 -203.189.88.11 -218.44.242.98 -85.94.224.2 -193.231.112.1 -195.110.16.40 -77.87.152.9 -94.155.90.7 -193.89.248.1 -207.91.5.32 -149.6.140.30 -208.66.232.66 -91.206.213.2 -213.157.176.2 -62.105.17.252 -213.23.108.129 -205.162.201.2 -193.28.100.200 -203.193.139.150 -212.102.225.2 -220.233.0.3 -217.117.0.38 -194.6.240.1 -173.241.133.189 -193.205.136.1 -4.2.2.4 -212.245.158.66 -193.16.48.66 -193.201.185.2 -212.1.118.3 -82.198.129.138 -193.239.60.19 -212.53.34.1 -209.87.79.232 -213.88.195.146 -216.52.41.1 -78.159.232.232 -89.255.96.3 -195.251.119.23 -82.199.32.36 -165.166.142.42 -38.112.17.142 -62.91.2.20 -142.46.1.130 -81.12.49.100 -4.79.132.219 -91.197.164.11 -79.132.192.2 -203.189.88.11 -203.115.130.74 -202.62.224.2 -217.18.206.12 -206.124.64.253 -195.198.214.72 -69.28.239.8 -84.32.112.202 -83.166.8.18 -195.153.19.5 -203.189.89.241 -85.172.0.250 -77.239.96.2 -59.12.239.70 -203.189.89.131 -212.84.181.99 -82.96.65.2 -216.52.190.33 -202.174.131.19 -213.157.196.132 -37.221.170.105 -190.249.175.122 -64.79.224.27 -83.240.154.200 -216.147.131.34 -200.85.61.90 -216.106.184.6 -204.97.212.10 -194.146.136.1 -194.145.198.6 -81.180.206.137 -218.102.23.228 -194.158.230.54 -85.132.32.41 -212.28.34.90 -101.255.64.82 -67.214.64.27 -211.172.208.2 -81.92.226.181 -210.34.0.18 -163.152.1.1 -91.200.113.1 -195.177.223.3 -217.170.1.1 -77.88.8.88 -62.77.85.98 -67.100.88.27 -103.20.188.83 -198.6.1.6 -213.172.33.35 -206.80.254.4 -193.226.128.129 -62.108.161.161 -217.196.1.6 -66.112.235.200 -194.105.32.2 -122.155.13.155 -83.228.65.52 -66.118.80.4 -209.142.136.85 -74.222.30.2 -193.34.129.253 -168.243.165.226 -164.115.2.132 -80.80.111.254 -195.198.127.20 -188.34.0.4 -62.119.70.3 -194.242.50.65 -195.88.84.100 -217.65.100.7 -193.252.247.53 -82.96.193.10 -195.234.230.67 -218.232.110.37 -213.73.91.35 -119.18.159.222 -200.57.7.61 -64.105.199.74 -216.81.128.132 -195.206.96.47 -213.33.82.2 -93.188.152.3 -89.249.224.1 -195.66.89.4 -216.138.119.6 -89.19.193.1 -200.221.11.100 -91.188.0.35 -202.86.216.2 -199.249.19.2 -194.25.15.11 -204.101.45.5 -217.72.168.34 -78.47.34.12 -83.142.192.2 -193.204.192.2 -195.128.252.7 -195.12.4.247 -61.208.115.242 -194.187.164.20 -101.255.64.138 -91.98.128.112 -122.155.12.91 -212.49.128.65 -42.62.176.150 -213.88.195.148 -194.164.181.2 -193.95.93.77 -190.186.50.31 -142.46.128.130 -69.28.136.102 -194.113.160.68 -195.112.96.34 -203.153.214.26 -194.45.12.2 -101.255.64.58 -194.88.203.6 -212.5.220.252 -62.56.230.100 -194.237.202.250 -210.34.48.34 -195.20.193.11 -213.157.196.131 -203.198.7.66 -202.138.120.87 -62.22.102.5 -221.139.13.130 -69.25.1.33 -195.186.1.110 -212.233.128.2 -93.91.224.2 -80.149.86.20 -37.235.1.177 -194.2.0.20 -195.66.68.2 -209.68.1.11 -91.203.188.1 -216.54.2.11 -207.91.250.34 -203.189.89.65 -203.153.214.14 -80.88.171.16 -208.90.237.9 -216.81.96.67 -89.107.129.15 -194.1.148.1 -209.197.128.2 -77.246.144.5 -211.78.130.11 -192.43.161.22 -83.243.39.59 -62.40.32.34 -195.16.73.1 -166.70.25.18 -213.157.0.193 -62.77.94.72 -77.41.229.2 -203.112.2.4 -62.94.0.41 -81.21.112.130 -88.131.89.37 -62.36.225.150 -207.248.224.72 -200.95.144.3 -62.149.128.2 -216.218.221.6 -64.94.33.33 -101.203.168.123 -212.58.3.8 -81.200.5.165 -212.15.86.12 -115.68.45.3 -103.3.46.105 -216.147.131.33 -203.124.230.100 -61.8.0.113 -195.129.12.114 -205.236.148.130 -209.51.161.14 -12.127.17.72 -203.189.89.210 -164.115.2.132 -209.142.152.254 -194.102.44.130 -94.199.201.199 -217.115.16.3 -77.109.139.29 -202.43.160.50 -90.183.74.2 -164.124.101.47 -88.255.96.196 -203.112.194.243 -86.59.41.180 -82.141.136.2 -194.67.74.3 -115.68.62.210 -203.189.89.117 -91.192.56.2 -193.102.59.190 -216.136.95.2 -89.207.72.138 -208.196.63.2 -111.223.252.161 -193.16.208.114 -203.2.193.67 -207.230.192.254 -160.7.240.20 -195.22.192.252 -83.137.41.8 -194.187.148.1 -72.11.150.10 -60.32.112.42 -216.52.41.33 -212.54.160.7 -193.41.10.1 -202.125.132.154 -65.107.59.67 -194.73.96.62 -203.196.0.6 -69.28.104.5 -207.15.68.36 -66.80.130.18 -122.155.3.119 -209.244.0.53 -212.230.255.129 -212.41.3.147 -165.194.1.1 -216.37.1.19 -122.155.12.41 -213.253.136.17 -80.66.1.42 -195.186.1.111 -69.54.70.15 -198.32.2.10 -212.38.95.254 -187.110.170.74 -217.77.176.11 -201.131.4.5 -193.43.108.62 -211.61.13.227 -194.116.170.66 -5.144.12.202 -194.30.163.5 -213.178.66.112 -195.137.246.17 -78.143.192.20 -207.164.234.129 -95.215.149.5 -94.236.199.8 -82.209.213.60 -61.60.224.5 -94.23.222.19 -206.253.33.131 -211.61.13.126 -202.133.99.11 -213.253.193.2 -194.149.156.140 -193.78.240.12 -58.68.121.230 -210.180.98.69 -216.52.65.1 -216.27.175.2 -193.230.230.1 -211.41.128.70 -211.78.130.10 -62.37.225.56 -62.165.32.250 -211.161.46.84 -83.143.12.246 -220.110.92.202 -4.2.2.2 -209.216.160.131 -193.138.78.117 -209.143.22.182 -203.89.226.24 -217.29.16.250 -66.182.208.5 -201.217.51.45 -217.173.198.3 -147.29.37.20 -69.24.112.10 -88.82.84.129 -195.243.214.4 -195.54.152.3 -193.171.4.60 -81.20.240.34 -69.24.112.11 -93.88.16.66 -221.186.85.74 -80.254.77.39 -193.228.86.5 -194.25.0.52 -91.98.234.4 -89.187.240.60 -129.219.17.200 -194.77.8.1 -62.122.208.68 -74.84.4.139 -160.220.137.2 -203.189.88.151 -193.231.236.30 -63.238.52.2 -87.250.77.204 -91.98.30.222 -69.67.97.18 -168.215.165.186 -205.152.132.23 -119.252.20.75 -208.59.89.20 -208.54.220.20 -66.7.160.122 -61.63.0.66 -64.94.1.1 -85.114.105.3 -146.66.19.238 -217.77.223.114 -200.53.250.1 -66.232.139.10 -193.86.86.2 -121.52.206.130 -216.52.254.1 -115.68.100.102 -70.36.0.6 -212.65.160.43 -193.42.81.68 -212.112.39.22 -87.230.13.136 -194.126.181.47 -64.212.106.84 -193.47.72.17 -24.248.137.39 -83.149.244.194 -91.214.72.33 -111.223.252.225 -89.107.210.171 -141.1.1.1 -62.33.203.33 -194.218.25.250 -80.73.1.1 -23.226.230.72 -195.178.123.130 -165.194.128.1 -213.128.194.2 -95.158.128.2 -212.203.32.11 -208.71.147.74 -69.28.239.9 -210.80.58.3 -203.77.161.12 -202.28.162.1 -62.128.1.42 -46.163.72.207 -67.214.159.199 -202.62.31.18 -207.248.57.10 -24.154.1.4 -65.210.29.34 -192.76.144.66 -217.64.167.1 -14.139.223.100 -41.221.6.38 -66.218.245.13 -192.172.250.8 -194.44.211.194 -195.251.123.232 -213.0.76.5 -117.102.224.230 -212.4.96.22 -89.187.240.59 -64.135.1.20 -189.90.16.20 -201.161.6.46 -42.62.176.74 -203.242.200.5 -64.81.159.2 -208.67.220.222 -195.186.4.111 -80.94.32.240 -213.8.145.133 -194.187.100.2 -212.9.161.2 -194.126.130.6 -209.161.175.29 -66.203.66.203 -158.43.240.4 -91.239.100.100 -202.0.107.125 -211.78.130.3 -216.52.97.33 -212.67.131.4 -211.175.82.66 -203.124.230.21 -80.64.32.2 -193.230.183.201 -217.151.0.195 -208.67.222.220 -124.107.135.126 -103.20.188.82 -61.19.130.42 -64.119.60.5 -149.250.222.21 -195.69.65.98 -210.104.1.3 -213.235.248.228 -194.153.232.17 -164.124.101.2 -194.149.146.2 -83.143.12.249 -66.119.93.4 -62.37.225.57 -217.20.96.100 -91.211.16.6 -122.0.0.12 -64.91.3.60 -81.25.152.2 -205.236.148.131 -142.103.1.1 -193.178.124.1 -168.215.210.50 -80.74.160.11 -211.237.65.31 -173.241.133.190 -219.250.36.130 -203.189.88.10 -211.237.65.21 -216.131.94.5 -216.52.1.1 -103.20.184.62 -83.142.9.30 -195.145.22.37 -207.15.68.164 -200.57.2.108 -216.52.1.33 -217.27.240.20 -216.194.28.33 -213.241.193.250 -77.72.17.17 -220.233.0.4 -205.172.19.193 -85.119.72.2 -217.107.11.35 -195.114.173.153 -121.152.231.196 -194.149.133.11 -62.29.160.228 -206.80.254.68 -216.181.31.11 -208.86.117.40 -211.63.64.11 -202.180.64.9 -195.66.156.26 -189.38.95.96 -62.231.100.14 -208.48.253.106 -81.180.201.98 -219.252.2.100 -217.14.128.50 -212.216.172.222 -195.149.138.3 -193.58.204.59 -213.235.248.228 -213.16.104.61 -195.27.1.1 -50.116.28.138 -211.115.194.2 -217.144.6.6 -194.54.148.129 -212.85.32.3 -164.124.107.9 -61.70.87.96 -203.176.144.20 -168.213.3.11 -206.104.144.62 -85.88.19.10 -212.59.199.2 -111.223.252.27 -194.105.156.2 -81.90.168.3 -193.46.84.2 -207.15.68.36 -195.146.81.130 -82.216.111.121 -151.11.85.5 -217.20.82.4 -216.22.81.60 -62.94.0.42 -208.116.30.21 -94.247.200.2 -203.239.131.1 -211.115.194.3 -83.228.65.52 -193.95.93.77 -216.106.1.2 -72.52.104.74 -212.110.122.132 -64.105.97.90 -62.133.163.171 -204.9.122.102 -66.165.183.87 -194.20.8.1 -193.15.251.65 -62.128.1.53 -193.148.29.100 -212.85.32.2 -203.124.250.70 -72.46.0.2 -209.142.136.220 -193.148.29.103 -203.115.71.66 -217.156.106.1 -114.114.115.119 -213.159.0.55 -212.62.98.10 -193.7.168.1 -209.206.136.8 -217.148.122.40 -66.9.5.15 -42.62.176.125 -193.111.212.5 -196.29.40.4 -67.214.64.7 -63.171.232.39 -63.105.204.164 -212.73.209.34 -88.216.8.69 -80.78.208.2 -85.249.40.8 -203.113.11.37 -62.233.181.26 -187.115.53.163 -193.41.59.151 -202.62.120.4 -203.189.88.154 -139.175.55.244 -193.34.170.162 -210.204.251.22 -85.124.252.33 -213.158.72.44 -218.248.240.23 -89.186.66.7 -77.72.192.3 -77.73.104.3 -193.226.145.2 -64.56.129.2 -194.95.141.1 -77.72.178.77 -80.92.178.98 -63.246.63.142 -64.135.1.22 -213.211.50.2 -49.0.124.46 -213.27.209.55 -82.115.23.3 -216.52.65.33 -87.241.63.4 -178.254.21.113 -69.51.76.26 -195.138.160.3 -46.246.46.246 -81.27.133.50 -61.72.225.1 -65.203.109.2 -203.153.41.28 -194.183.88.40 -85.132.32.42 -192.121.170.170 -209.251.33.2 -74.207.242.213 -194.126.159.20 -193.189.114.254 -194.250.223.2 -103.20.188.82 -89.185.75.244 -213.133.224.2 -213.159.0.70 -190.41.153.24 -212.214.229.170 -66.218.44.5 -195.7.64.3 -195.18.161.132 -207.249.163.155 -203.176.144.12 -216.244.192.32 -213.146.65.11 -83.151.112.193 -66.92.64.2 -93.157.233.3 -77.88.8.1 -195.67.15.73 -121.52.87.65 -194.20.8.4 -217.20.240.5 -82.212.67.101 -203.189.89.210 -217.24.113.214 -193.254.22.13 -62.129.252.252 -76.10.192.201 -193.101.111.10 -62.192.128.60 -193.43.181.62 -194.242.50.65 -64.105.172.26 -193.109.53.2 -37.19.5.135 -94.153.224.74 -91.199.139.1 -101.255.64.86 -165.87.201.244 -217.159.1.126 -62.116.30.200 -195.129.12.83 -221.151.200.206 -119.252.167.229 -168.126.63.1 -200.85.61.90 -117.102.224.190 -195.67.160.3 -212.73.154.2 -131.155.140.130 -216.218.221.6 -208.38.1.15 -66.28.0.45 -212.9.64.11 -63.251.129.33 -35.8.98.43 -221.156.218.31 -94.155.91.4 -203.113.25.71 -211.61.13.227 -195.13.38.3 -80.78.66.66 -193.22.119.22 -194.42.108.135 -193.67.79.39 -62.72.87.4 -80.93.177.182 -206.13.28.12 -8.5.244.5 -209.183.52.21 -35.8.2.42 -81.18.97.50 -178.212.102.76 -213.239.204.35 -212.98.160.50 -194.126.130.7 -200.123.192.251 -87.103.133.167 -196.2.45.101 -212.24.97.97 -173.241.133.172 -212.211.132.4 -85.119.74.2 -101.255.64.210 -64.91.92.21 -85.119.136.158 -212.96.128.140 -207.230.202.29 -193.2.64.45 -187.115.52.142 -137.82.1.1 -101.255.64.34 -194.1.185.122 -194.179.109.10 -217.28.96.190 -217.17.34.68 -87.106.220.85 -12.173.168.201 -217.198.160.130 -194.179.1.100 -89.140.186.3 -195.99.66.220 -165.21.100.88 -149.211.153.50 -81.189.121.68 -209.142.152.253 -195.2.195.1 -203.229.169.1 -66.28.0.61 -69.16.170.11 -81.95.128.218 -209.143.0.10 -193.27.192.98 -194.75.147.212 -217.148.0.17 -81.196.170.20 -168.188.1.1 \ No newline at end of file diff --git a/lib/stash.py b/lib/stash.py deleted file mode 100644 index 2bf751c4..00000000 --- a/lib/stash.py +++ /dev/null @@ -1,291 +0,0 @@ -import datetime -import sqlite3 - - -class stash_manager: - - def __init__(self): - self.db = "stash.sqlite" - self.results = "" - self.totalresults = "" - self.latestscandomain = {} - self.domainscanhistory = [] - #self.scanboarddata = [] - self.scanboarddata = {} - self.scanstats = [] - self.latestscanresults = [] - self.previousscanresults = [] - - def do_init(self): - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('CREATE TABLE results (domain text, resource text, type text, find_date date, source text)') - conn.commit() - conn.close() - return - - def store(self, domain, resource, res_type, source): - self.domain = domain - self.resource = resource - self.type = res_type - self.source = source - self.date = datetime.date.today() - try: - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('INSERT INTO results (domain,resource, type, find_date, source) VALUES (?,?,?,?,?)', - (self.domain, self.resource, self.type, self.date, self.source)) - conn.commit() - conn.close() - except Exception as e: - print(e) - return - - def store_all(self, domain, all, res_type, source): - self.domain = domain - self.all = all - self.type = res_type - self.source = source - self.date = datetime.date.today() - for x in self.all: - try: - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('INSERT INTO results (domain,resource, type, find_date, source) VALUES (?,?,?,?,?)', - (self.domain, x, self.type, self.date, self.source)) - conn.commit() - conn.close() - except Exception as e: - print(e) - return - - def generatedashboardcode(self, domain): - try: - self.latestscandomain["domain"] = domain - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host"''', (domain,)) - data = c.fetchone() - self.latestscandomain["host"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email"''', (domain,)) - data = c.fetchone() - self.latestscandomain["email"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip"''', (domain,)) - data = c.fetchone() - self.latestscandomain["ip"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost"''', (domain,)) - data = c.fetchone() - self.latestscandomain["vhost"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan"''', (domain,)) - data = c.fetchone() - self.latestscandomain["shodan"] = data[0] - c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) - data = c.fetchone() - self.latestscandomain["latestdate"] = data[0] - latestdate = data[0] - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="host"''', (domain, latestdate,)) - scandetailshost = c.fetchall() - self.latestscandomain["scandetailshost"] = scandetailshost - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="email"''', - (domain, latestdate,)) - scandetailsemail = c.fetchall() - self.latestscandomain["scandetailsemail"] = scandetailsemail - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="ip"''', (domain, latestdate,)) - scandetailsip = c.fetchall() - self.latestscandomain["scandetailsip"] = scandetailsip - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="vhost"''', - (domain, latestdate,)) - scandetailsvhost = c.fetchall() - self.latestscandomain["scandetailsvhost"] = scandetailsvhost - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="shodan"''', - (domain, latestdate,)) - scandetailsshodan = c.fetchall() - self.latestscandomain["scandetailsshodan"] = scandetailsshodan - return self.latestscandomain - except Exception as e: - print(e) - finally: - conn.close() - - def getlatestscanresults(self, domain, previousday=False): - try: - conn = sqlite3.connect(self.db) - if previousday: - try: - c = conn.cursor() - c.execute(''' - SELECT DISTINCT(find_date) - FROM results - WHERE find_date=date('now', '-1 day') and domain=?''', (domain,)) - previousscandate = c.fetchone() - if not previousscandate: # When theHarvester runs first time/day this query will return. - self.previousscanresults = ["No results", "No results", "No results", "No results", "No results"] - else: - c = conn.cursor() - c.execute(''' - SELECT find_date, domain, source, type, resource - FROM results - WHERE find_date=? and domain=? - ORDER BY source,type - ''', (previousscandate[0], domain,)) - results = c.fetchall() - self.previousscanresults = results - return self.previousscanresults - except Exception as e: - print('Error in getting the previous scan results from the database: ' + str(e)) - else: - try: - c = conn.cursor() - c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) - latestscandate = c.fetchone() - c = conn.cursor() - c.execute(''' - SELECT find_date, domain, source, type, resource - FROM results - WHERE find_date=? and domain=? - ORDER BY source,type - ''', (latestscandate[0], domain,)) - results = c.fetchall() - self.latestscanresults = results - return self.latestscanresults - except Exception as e: - print('Error in getting the latest scan results from the database: ' + str(e)) - except Exception as e: - print('Error connecting to theHarvester database: ' + str(e)) - finally: - conn.close() - - def getscanboarddata(self): - try: - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE type="host"''') - data = c.fetchone() - self.scanboarddata["host"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE type="email"''') - data = c.fetchone() - self.scanboarddata["email"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE type="ip"''') - data = c.fetchone() - self.scanboarddata["ip"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE type="vhost"''') - data = c.fetchone() - self.scanboarddata["vhost"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE type="shodan"''') - data = c.fetchone() - self.scanboarddata["shodan"] = data[0] - c.execute('''SELECT COUNT(DISTINCT(domain)) FROM results ''') - data = c.fetchone() - self.scanboarddata["domains"] = data[0] - return self.scanboarddata - except Exception as e: - print(e) - finally: - conn.close() - - def getscanhistorydomain(self, domain): - try: - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('''SELECT DISTINCT(find_date) FROM results WHERE domain=?''', (domain,)) - dates = c.fetchall() - for date in dates: - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host" AND find_date=?''', - (domain, date[0])) - counthost = c.fetchone() - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email" AND find_date=?''', - (domain, date[0])) - countemail = c.fetchone() - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip" AND find_date=?''', - (domain, date[0])) - countip = c.fetchone() - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost" AND find_date=?''', - (domain, date[0])) - countvhost = c.fetchone() - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan" AND find_date=?''', - (domain, date[0])) - countshodan = c.fetchone() - results = { - "date": str(date[0]), - "hosts": str(counthost[0]), - "email": str(countemail[0]), - "ip": str(countip[0]), - "vhost": str(countvhost[0]), - "shodan": str(countshodan[0]) - } - self.domainscanhistory.append(results) - return self.domainscanhistory - except Exception as e: - print(e) - finally: - conn.close() - - def getpluginscanstatistics(self): - try: - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute(''' - SELECT domain,find_date, type, source, count(*) - FROM results - GROUP BY domain, find_date, type, source - ''') - results = c.fetchall() - self.scanstats = results - return self.scanstats - except Exception as e: - print(e) - finally: - conn.close() - - def latestscanchartdata(self, domain): - try: - self.latestscandomain["domain"] = domain - conn = sqlite3.connect(self.db) - c = conn.cursor() - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="host"''', (domain,)) - data = c.fetchone() - self.latestscandomain["host"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="email"''', (domain,)) - data = c.fetchone() - self.latestscandomain["email"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="ip"''', (domain,)) - data = c.fetchone() - self.latestscandomain["ip"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="vhost"''', (domain,)) - data = c.fetchone() - self.latestscandomain["vhost"] = data[0] - c.execute('''SELECT COUNT(*) from results WHERE domain=? AND type="shodan"''', (domain,)) - data = c.fetchone() - self.latestscandomain["shodan"] = data[0] - c.execute('''SELECT MAX(find_date) FROM results WHERE domain=?''', (domain,)) - data = c.fetchone() - self.latestscandomain["latestdate"] = data[0] - latestdate = data[0] - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="host"''', (domain, latestdate,)) - scandetailshost = c.fetchall() - self.latestscandomain["scandetailshost"] = scandetailshost - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="email"''', - (domain, latestdate,)) - scandetailsemail = c.fetchall() - self.latestscandomain["scandetailsemail"] = scandetailsemail - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="ip"''', (domain, latestdate,)) - scandetailsip = c.fetchall() - self.latestscandomain["scandetailsip"] = scandetailsip - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="vhost"''', - (domain, latestdate,)) - scandetailsvhost = c.fetchall() - self.latestscandomain["scandetailsvhost"] = scandetailsvhost - c.execute('''SELECT * FROM results WHERE domain=? AND find_date=? AND type="shodan"''', - (domain, latestdate,)) - scandetailsshodan = c.fetchall() - self.latestscandomain["scandetailsshodan"] = scandetailsshodan - return self.latestscandomain - except Exception as e: - print(e) - finally: - conn.close() diff --git a/lib/statichtmlgenerator.py b/lib/statichtmlgenerator.py deleted file mode 100644 index cf9a5953..00000000 --- a/lib/statichtmlgenerator.py +++ /dev/null @@ -1,176 +0,0 @@ -class htmlgenerator: - - def __init__(self, word): - self.domain = word - - def generatepreviousscanresults(self, previousscanresults): - try: - if previousscanresults[0]=='No results': - html=''' -

Previous scan report

-

 

- - - - - - - - - - -''' - for i in previousscanresults: - html += '" - html += '" - html += '" - html += '" - html += '" - html += '' - else: - html = ''' -

Previous scan report

-

 

-
DateDomainPluginRecord typeResult
' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "' + str(i) + "
- - - - - - - - - -''' - for i in previousscanresults: - html += '" - html += '" - html += '" - html += '" - html += '" - html += '' - html += ''' - -
DateDomainPluginRecord typeResult
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
-

 

-

 

-

 

-

 

-''' - return html - except Exception as e: - print('Error generating the previous scan results HTML code: ' + str(e)) - - def generatelatestscanresults(self, latestscanresults): - try: - html=''' -

Latest scan report

-

 

- - - - - - - - - - -''' - for i in latestscanresults: - html += '" - html += '" - html += '" - html += '" - html += '" - html += '' - html += ''' - -
DateDomainPluginRecord typeResult
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
-

 

-

 

-

 

-

 

-''' - return html - except Exception as e: - print('Error generating the latest scan results HTML code: ' + str(e)) - - def beginhtml(self): - html = ''' - - - -

theHarvester Scan Report

- ''' - return html - - def generatedashboardcode(self, scanboarddata): - try: - totalnumberofdomains = scanboarddata['domains'] - totalnumberofhosts = scanboarddata['host'] - totalnumberofip = scanboarddata['ip'] - totalnumberofvhost= scanboarddata['vhost'] - totalnumberofemail= scanboarddata['email'] - totalnumberofshodan= scanboarddata['shodan'] - html=''' -

Scan dashboard

- - - - - - - - - - - - - - - - - - - -

Domains

Hosts

IP Addresses

Vhosts

Emails

Shodan

'''+str(totalnumberofdomains)+'''

'''+str(totalnumberofhosts)+'''

'''+str(totalnumberofip)+'''

'''+str(totalnumberofvhost)+'''

'''+str(totalnumberofemail)+'''

'''+str(totalnumberofshodan)+'''

-

 

-

 

-''' - return html - except Exception as e: - print('Error generating dashboard HTML code: ' + str(e)) - - def generatepluginscanstatistics(self, scanstatistics): - try: - html = ''' -

theHarvester plugin statistics

-

 

- - - - - - - - - - -''' - for i in scanstatistics: - html += '" - html += '" - html += '" - html += '" - html += '" - html += '' - html += ''' - -
DomainDateRecordtypeSourceTotal results
' + str(i[0]) + "' + str(i[1]) + "' + str(i[2]) + "' + str(i[3]) + "' + str(i[4]) + "
-

 

-

 

-''' - return html - except Exception as e: - print('Error generating scan statistics HTML code: ' + str(e)) From 9bb4d7aa3991108b372096038b0dc6097202763d Mon Sep 17 00:00:00 2001 From: NotoriousRebel Date: Thu, 8 Aug 2019 16:36:32 -0400 Subject: [PATCH 13/16] Removed unused directory. --- parsers/__init__.py | 0 parsers/censysparser.py | 67 -------------- parsers/cymonparser.py | 19 ---- parsers/intelxparser.py | 27 ------ parsers/myparser.py | 158 -------------------------------- parsers/securitytrailsparser.py | 38 -------- 6 files changed, 309 deletions(-) delete mode 100644 parsers/__init__.py delete mode 100644 parsers/censysparser.py delete mode 100644 parsers/cymonparser.py delete mode 100644 parsers/intelxparser.py delete mode 100644 parsers/myparser.py delete mode 100644 parsers/securitytrailsparser.py diff --git a/parsers/__init__.py b/parsers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/parsers/censysparser.py b/parsers/censysparser.py deleted file mode 100644 index e4662298..00000000 --- a/parsers/censysparser.py +++ /dev/null @@ -1,67 +0,0 @@ -from bs4 import BeautifulSoup -import re - - -class Parser: - - def __init__(self, resultstoparse): - self.ipaddresses = [] - self.souphosts = BeautifulSoup(resultstoparse.total_resultshosts, features='html.parser') - self.soupcerts = BeautifulSoup(resultstoparse.total_resultscerts, features='html.parser') - self.hostnames = [] - self.hostnamesfromcerts = [] - self.urls = [] - self.numberofpageshosts = 0 - self.numberofpagescerts = 0 - self.domain = resultstoparse.word - - def search_hostnamesfromcerts(self): - try: - hostnamelist = self.soupcerts.findAll('i', 'fa fa-fw fa-home') - for hostnameitem in hostnamelist: - hostitems = hostnameitem.next_sibling - hostnames = str(hostitems) - hostnamesclean = re.sub('[ \'\[\]]', '', hostnames) - hostnamesclean = re.sub(r'\.\.\.', r'', hostnamesclean) - self.hostnamesfromcerts.extend(hostnamesclean.split(',')) - self.hostnamesfromcerts = list(filter(None, self.hostnamesfromcerts)) - matchingdomains = [s for s in self.hostnamesfromcerts if str(self.domain) in s] # filter out domains issued to other sites - self.hostnamesfromcerts = matchingdomains - return self.hostnamesfromcerts - except Exception as e: - print('Error occurred in the Censys module: certificate hostname parser: ' + str(e)) - - def search_ipaddresses(self): - try: - ipaddresslist = self.souphosts.findAll('a', 'SearchResult__title-text') - for ipaddressitem in ipaddresslist: - self.ipaddresses.append(ipaddressitem.text.strip()) - return self.ipaddresses - except Exception as e: - print('Error occurred in the Censys module: IP address parser: ' + str(e)) - - def search_totalpageshosts(self): - try: - items = self.souphosts.findAll('span', 'SearchResultSectionHeader__statistic') - if items == [] or items is None: - self.numberofpageshosts = 0 - return self.numberofpageshosts - numbers = re.findall(r"/\d*", items[0].text) - pagenumber = numbers[0].replace('/', '') - self.numberofpageshosts = int(pagenumber) - return self.numberofpageshosts - except Exception as e: - print('Error occurred in the Censys module IP search: page parser: ' + str(e)) - - def search_totalpagescerts(self): - try: - items = self.soupcerts.findAll('span', 'SearchResultSectionHeader__statistic') - if items == [] or items is None: - self.numberofpageshosts = 0 - return self.numberofpageshosts - numbers = re.findall(r"/\d*", items[0].text) - pagenumber = numbers[0].replace('/', '') - self.numberofpagescerts = int(pagenumber) - return self.numberofpagescerts - except Exception as e: - print('Error occurred in the Censys module IP search: page parser: ' + str(e)) diff --git a/parsers/cymonparser.py b/parsers/cymonparser.py deleted file mode 100644 index f424e97b..00000000 --- a/parsers/cymonparser.py +++ /dev/null @@ -1,19 +0,0 @@ -import re -from bs4 import BeautifulSoup - - -class Parser: - - def __init__(self, results): - self.results = results - self.ipaddresses = [] - self.soup = BeautifulSoup(results.results, features='html.parser') - - def search_ipaddresses(self): - try: - tags = self.soup.findAll('td') - allip = re.findall(r'[0-9]+(?:\.[0-9]+){3}', str(tags)) - self.ipaddresses = set(allip) - return self.ipaddresses - except Exception as e: - print('Error occurred: ' + str(e)) diff --git a/parsers/intelxparser.py b/parsers/intelxparser.py deleted file mode 100644 index 8c12b969..00000000 --- a/parsers/intelxparser.py +++ /dev/null @@ -1,27 +0,0 @@ -class Parser: - - def __init__(self): - self.emails = set() - self.hosts = set() - - def parse_dictionaries(self, results): - """ - Parse method to parse json results - :param results: Dictionary containing a list of dictionaries known as selectors - :return: tuple of emails and hosts - """ - if results is not None: - for dictionary in results["selectors"]: - field = dictionary['selectorvalue'] - if '@' in field: - self.emails.add(field) - else: - field = str(field) - if 'http' in field or 'https' in field: - if field[:5] == 'https': - field = field[8:] - else: - field = field[7:] - self.hosts.add(field.replace(')', '').replace(',', '')) - return self.emails, self.hosts - return None, None diff --git a/parsers/myparser.py b/parsers/myparser.py deleted file mode 100644 index a63b0612..00000000 --- a/parsers/myparser.py +++ /dev/null @@ -1,158 +0,0 @@ -import re - - -class Parser: - - def __init__(self, results, word): - self.results = results - self.word = word - self.temp = [] - - def genericClean(self): - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('%2f', ' ', self.results) - self.results = re.sub('%3a', ' ', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - - for e in ('<', '>', ':', '=', ';', '&', '%3A', '%3D', '%3C', '/', '\\'): - self.results = self.results.replace(e, ' ') - - def urlClean(self): - self.results = re.sub('', '', self.results) - self.results = re.sub('', '', self.results) - self.results = re.sub('%2f', ' ', self.results) - self.results = re.sub('%3a', ' ', self.results) - - for e in ('<', '>', ':', '=', ';', '&', '%3A', '%3D', '%3C'): - self.results = self.results.replace(e, ' ') - - def emails(self): - self.genericClean() - reg_emails = re.compile( - # Local part is required, charset is flexible. - # https://tools.ietf.org/html/rfc6531 (removed * and () as they provide FP mostly) - r'[a-zA-Z0-9.\-_+#~!$&\',;=:]+' + - '@' + - '[a-zA-Z0-9.-]*' + - self.word) - self.temp = reg_emails.findall(self.results) - emails = self.unique() - return emails - - def fileurls(self, file): - urls = [] - reg_urls = re.compile('', '', self.results) - self.results = re.sub('', '', self.results) - reg_people = re.compile(r'>[a-zA-Z0-9._ ]* - Google\+') - self.temp = reg_people.findall(self.results) - resul = [] - for x in self.temp: - y = x.replace(' | LinkedIn', '') - y = y.replace(' profiles ', '') - y = y.replace('LinkedIn', '') - y = y.replace('"', '') - y = y.replace('>', '') - if y != " ": - resul.append(y) - return resul - - def hostnames_all(self): - reg_hosts = re.compile('(.*?)') - temp = reg_hosts.findall(self.results) - for x in temp: - if x.count(':'): - res = x.split(':')[1].split('/')[2] - else: - res = x.split('/')[0] - self.temp.append(res) - hostnames = self.unique() - return hostnames - - def people_linkedin(self): - reg_people = re.compile(r'">[a-zA-Z0-9._ -]* \| LinkedIn') - self.temp = reg_people.findall(self.results) - resul = [] - for x in self.temp: - y = x.replace(' | LinkedIn', '') - y = y.replace(' profiles ', '') - y = y.replace('LinkedIn', '') - y = y.replace('"', '') - y = y.replace('>', '') - if y != " ": - resul.append(y) - return resul - - def people_twitter(self): - reg_people = re.compile(r'(@[a-zA-Z0-9._ -]*)') - self.temp = reg_people.findall(self.results) - users = self.unique() - resul = [] - for x in users: - y = x.replace(' | LinkedIn', '') - y = y.replace(' profiles ', '') - y = y.replace('LinkedIn', '') - y = y.replace('"', '') - y = y.replace('>', '') - if y != " ": - resul.append(y) - return resul - - def profiles(self): - reg_people = re.compile(r'">[a-zA-Z0-9._ -]* - Google Profile') - self.temp = reg_people.findall(self.results) - resul = [] - for x in self.temp: - y = x.replace(' Google Profile', '') - y = y.replace('-', '') - y = y.replace('">', '') - if y != " ": - resul.append(y) - return resul - - def set(self): - reg_sets = re.compile(r'>[a-zA-Z0-9]*') - self.temp = reg_sets.findall(self.results) - sets = [] - for x in self.temp: - y = x.replace('>', '') - y = y.replace(' 0: - if ']' in line: - sub_domain_flag = 0 - else: - if 'www' in self.word: - self.word = str(self.word).replace('www.', '').replace('www', '') - # Remove www from word if entered - self.hostnames.add(str(line).replace('"', '').replace(',', '') + '.' + self.word) - else: - continue - return list(self.ips), list(self.hostnames) From e74cdacd64bf39c1b202085cb5d4ddd54cc73714 Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Thu, 8 Aug 2019 22:57:30 +0100 Subject: [PATCH 14/16] add missing return call in crtsh.py and now run it this module as part of ci --- .travis.yml | 2 +- theHarvester/discovery/crtsh.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f1dc5228..2b313ae7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_install: install: - python setup.py test script: -- python theHarvester.py -d metasploit.com -x trello,google,intelx,bingapi,crtsh,hunter -b all +- python theHarvester.py -d metasploit.com -x trello,google,intelx,bingapi,hunter -b all - pytest notifications: email: false diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 8bfbde2a..9caacc8e 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -17,6 +17,7 @@ def do_search(self): data = set([dct['name_value'][2:] if '*.' == dct['name_value'][:2] else dct['name_value'] for dct in content]) except ValueError as error: print(f'Error when requesting data from crt.sh: {error}') + return data def process(self): print('\tSearching results.') From 9401eda3402c8e2d1ca5223da75aeced9cf01007 Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Fri, 9 Aug 2019 00:01:39 +0100 Subject: [PATCH 15/16] remove google certs lookup and slight tweaks to crtsh --- README.md | 2 -- theHarvester/__main__.py | 19 +------------------ theHarvester/discovery/__init__.py | 1 - theHarvester/discovery/crtsh.py | 14 ++++++-------- theHarvester/lib/core.py | 1 - 5 files changed, 7 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 86040d68..ffd87303 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,6 @@ Passive: * google: Google search engine (Optional Google dorking.) - www.google.com -* google-certificates: Google Certificate Transparency report - * hunter: Hunter search engine (Requires API key, see below.) - www.hunter.io * intelx: Intelx search engine (Requires API key, see below.) - www.intelx.io diff --git a/theHarvester/__main__.py b/theHarvester/__main__.py index 9932fef3..fb43e147 100644 --- a/theHarvester/__main__.py +++ b/theHarvester/__main__.py @@ -54,7 +54,7 @@ def start(): parser.add_argument('-f', '--filename', help='save the results to an HTML and/or XML file', default='', type=str) parser.add_argument('-b', '--source', help='''baidu, bing, bingapi, censys, crtsh, dnsdumpster, dogpile, duckduckgo, github-code, google, - google-certificates, hunter, intelx, + hunter, intelx, linkedin, netcraft, securityTrails, threatcrowd, trello, twitter, vhost, virustotal, yahoo, all''') parser.add_argument('-x', '--exclude', help='exclude options when using all sources', type=str) @@ -223,15 +223,6 @@ def start(): db.store_all(word, all_hosts, 'host', 'google') db.store_all(word, all_emails, 'email', 'google') - elif engineitem == 'google-certificates': - print('\033[94m[*] Searching Google Certificate transparency report. \033[0m') - search = googlecertificates.SearchGoogleCertificates(word, limit, start) - search.process() - hosts = filter(search.get_domains()) - all_hosts.extend(hosts) - db = stash.stash_manager() - db.store_all(word, all_hosts, 'host', 'google-certificates') - elif engineitem == 'hunter': print('\033[94m[*] Searching Hunter. \033[0m') from theHarvester.discovery import huntersearch @@ -488,14 +479,6 @@ def start(): db = stash.stash_manager() db.store_all(word, all_hosts, 'host', 'google') - print('\033[94m[*] Searching Google Certificate transparency report. \033[0m') - search = googlecertificates.SearchGoogleCertificates(word, limit, start) - search.process() - domains = filter(search.get_domains()) - all_hosts.extend(domains) - db = stash.stash_manager() - db.store_all(word, all_hosts, 'host', 'google-certificates') - print('\033[94m[*] Searching Hunter. \033[0m') from theHarvester.discovery import huntersearch # Import locally. diff --git a/theHarvester/discovery/__init__.py b/theHarvester/discovery/__init__.py index ffe63379..5dd6f419 100644 --- a/theHarvester/discovery/__init__.py +++ b/theHarvester/discovery/__init__.py @@ -6,7 +6,6 @@ 'dogpilesearch', 'duckduckgosearch', 'exaleadsearch', - 'googlecertificates', 'googlesearch', 'huntersearch', 'intelxsearch', diff --git a/theHarvester/discovery/crtsh.py b/theHarvester/discovery/crtsh.py index 9caacc8e..d5dc5b2d 100644 --- a/theHarvester/discovery/crtsh.py +++ b/theHarvester/discovery/crtsh.py @@ -1,6 +1,6 @@ -#from theHarvester.lib.core import * +from theHarvester.lib.core import * import requests - +import urllib3 class SearchCrtsh: @@ -10,13 +10,11 @@ def __init__(self, word): def do_search(self): url = f'https://crt.sh/?q=%25.{self.word}&output=json' - request = requests.get(url) + headers = {'User-Agent': Core.get_user_agent()} + request = requests.get(url, params=headers, timeout=30) if request.ok: - try: - content = request.json() - data = set([dct['name_value'][2:] if '*.' == dct['name_value'][:2] else dct['name_value'] for dct in content]) - except ValueError as error: - print(f'Error when requesting data from crt.sh: {error}') + content = request.json() + data = set([dct['name_value'][2:] if '*.' == dct['name_value'][:2] else dct['name_value'] for dct in content]) return data def process(self): diff --git a/theHarvester/lib/core.py b/theHarvester/lib/core.py index 497b96fa..1038a560 100644 --- a/theHarvester/lib/core.py +++ b/theHarvester/lib/core.py @@ -74,7 +74,6 @@ def get_supportedengines(): 'duckduckgo', 'github-code', 'google', - 'google-certificates', 'hunter', 'intelx', 'linkedin', From b54243e63e4097fe806b23d637f85b9515c82a7d Mon Sep 17 00:00:00 2001 From: Jay Townsend Date: Fri, 9 Aug 2019 00:09:45 +0100 Subject: [PATCH 16/16] Put a note for censys module --- theHarvester/discovery/censys.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/theHarvester/discovery/censys.py b/theHarvester/discovery/censys.py index f0275cd5..697de756 100644 --- a/theHarvester/discovery/censys.py +++ b/theHarvester/discovery/censys.py @@ -2,6 +2,9 @@ from theHarvester.parsers import censysparser import requests + # TODO rewrite this module to use the censys api as the current way does notwork + # TODO And not really that maintainable as it currently stands + class SearchCensys: