-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathclient_source.py
More file actions
20 lines (16 loc) · 953 Bytes
/
client_source.py
File metadata and controls
20 lines (16 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#########################################################################################
# This file is used on the client to source the encrypted IP address from the internet. #
# You can change the way the IP sourced by change the import below "platform_disk" to #
# any medium that you would like to use. #
#########################################################################################
import getpass
from platform_constants import get_read_function
from cryptography import decrypt_ip
import configparser
if __name__ == "__main__":
settings = configparser.ConfigParser()
settings.read('client_configuration.ini')
private_key_path = settings.get('private-key', 'path')
platform_type = settings.get('platform-configuration', 'type')
read_function = get_read_function(platform_type)
print(decrypt_ip(private_key_path, read_function(), getpass.getpass()))