fixed pgp generation, work on onion

This commit is contained in:
Kevin Froman 2018-01-20 01:23:09 -06:00
parent cb3de7056c
commit 6a1a448eab
No known key found for this signature in database
GPG key ID: 0D414D0FE405B63B
6 changed files with 46 additions and 6 deletions

View file

@ -78,7 +78,10 @@ class Onionr:
if self.debug:
randomPort = 8080
else:
randomPort = random.randint(1024, 65535)
while True:
randomPort = random.randint(1024, 65535)
if self.onionrUtils.checkPort(randomPort):
break
self.config['CLIENT'] = {'CLIENT HMAC': base64.b64encode(os.urandom(32)).decode('utf-8'), 'PORT': randomPort, 'API VERSION': '0.0.0'}
with open('data/config.ini', 'w') as configfile:
self.config.write(configfile)