Fix two bugs

This commit is contained in:
Arinerron 2018-02-03 21:22:34 -08:00
parent efd7c287b7
commit c57bffcae8
No known key found for this signature in database
GPG Key ID: 99383627861C62F0
2 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -21,7 +21,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
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