1
1
mirror of https://github.com/r4sas/PBinCLI synced 2025-03-13 05:41:08 +00:00

use secrets for random server choosing

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2025-02-15 20:06:37 +03:00
parent bf35207211
commit 1d6d91c8bf
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -47,6 +47,7 @@ wheels/
*.egg-info/
.installed.cfg
*.egg
*.exe
MANIFEST
# PyInstaller

View File

@ -194,9 +194,9 @@ def main():
# Set server and re-validate instance URL
if CONFIG['random_server']:
import random
import secrets
url_arr = CONFIG['random_server'].split(',')
CONFIG['server'] = validate_url_ending(random.choice(url_arr))
CONFIG['server'] = validate_url_ending(secrets.choice(url_arr))
else:
CONFIG['server'] = validate_url_ending(CONFIG['server'])