From c66dc92033f27c65cc2f19908df8fdf467cb5af9 Mon Sep 17 00:00:00 2001 From: acidvegas Date: Thu, 8 Feb 2024 14:37:36 -0500 Subject: [PATCH] Fixed typo --- torglass.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/torglass.py b/torglass.py index edf950b..801a686 100644 --- a/torglass.py +++ b/torglass.py @@ -62,20 +62,20 @@ if __name__ == '__main__': print('loading Tor descriptors... (this could take a while)') tor_data = get_descriptors() - + with open('tor.json', 'w') as fd: json.dump(tor_data['relay'], fd) with open('tor.exit.json', 'w') as fd: json.dump(tor_data['exit'], fd) - print('Relays: {0:,}'.foramt(len(tor_data['relay']))) + print('Relays: {0:,}'.format(len(tor_data['relay']))) print('Exits : {0:,}'.format(len(tor_data['exit']))) try: import ipinfo except ImportError: raise ImportError('missing optional library \'ipinfo\' (https://pypi.org/project/ipinfo/) for map visualization') - + try: handler = ipinfo.getHandler('changeme') # put your ipinfo.io API key here print('Relay Map: ' + handler.getMap([ip['address'] for ip in tor_data['relay']])) @@ -83,4 +83,4 @@ if __name__ == '__main__': except ipinfo.errors.AuthorizationError: print('error: invalid ipinfo.io API key (https://ipinfo.io/signup)') except Exception as ex: - print(f'error generating ipinfo map ({ex})') \ No newline at end of file + print(f'error generating ipinfo map ({ex})')