From b0271e77798ae4858db81056313bc6b2d7aae401 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 25 Apr 2018 02:09:28 -0500 Subject: [PATCH] removed secrets --- onionr/communicator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index 03ed35c5..5baf140f 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -19,7 +19,7 @@ and code to operate as a daemon, getting commands from the command queue databas You should have received a copy of the GNU General Public License along with this program. If not, see . ''' -import sqlite3, requests, hmac, hashlib, time, sys, os, math, logger, urllib.parse, base64, binascii, secrets +import sqlite3, requests, hmac, hashlib, time, sys, os, math, logger, urllib.parse, base64, binascii import core, onionrutils, onionrcrypto, netcontroller, onionrproofs, btc, config, onionrplugins as plugins class OnionrCommunicate: @@ -149,7 +149,8 @@ class OnionrCommunicate: peersCheck = len(peerList) while peersCheck > peersChecked: - i = secrets.randbelow(maxN) + #i = secrets.randbelow(maxN) # cant use prior to 3.6 + i = random.randint(0, maxN) logger.info('Using ' + peerList[i] + ' to find new peers', timestamp=True) try: newAdders = self.performGet('pex', peerList[i], skipHighFailureAddress=True)