From c57bffcae83d6c6d07ae8b9e5f688ac9b9c313ca Mon Sep 17 00:00:00 2001 From: Arinerron Date: Sat, 3 Feb 2018 21:22:34 -0800 Subject: [PATCH] Fix two bugs --- onionr/communicator.py | 4 ++-- onionr/onionr.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index 9fd31550..a1d840f9 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -198,9 +198,9 @@ class OnionrCommunicate: '''We use socks5h to use tor as DNS''' proxies = {'http': 'socks5h://127.0.0.1:' + str(socksPort), 'https': 'socks5h://127.0.0.1:' + str(socksPort)} headers = {'user-agent': 'PyOnionr'} - url = 'http://' + peer + '/public/?action=' + urlencode(action) + url = 'http://' + peer + '/public/?action=' + self.urlencode(action) if data != None: - url = url + '&data=' + urlencode(data) + url = url + '&data=' + self.urlencode(data) try: r = requests.get(url, headers=headers, proxies=proxies, timeout=(15, 30)) except requests.exceptions.RequestException as e: diff --git a/onionr/onionr.py b/onionr/onionr.py index 48ffc758..9c12b1b7 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -21,7 +21,7 @@ along with this program. If not, see . ''' import sys, os, configparser, base64, random, getpass, shutil, subprocess, requests, time, logger, platform -import api, core +import api, core, gui from onionrutils import OnionrUtils from netcontroller import NetController