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