tor browser only exists for x86
This commit is contained in:
parent
62b8c34e65
commit
4fcad3bddf
1 changed files with 13 additions and 8 deletions
21
oml/tor.py
21
oml/tor.py
|
@ -1,19 +1,20 @@
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
import time
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import distutils
|
import distutils
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
|
from Crypto.PublicKey import RSA
|
||||||
import ox
|
import ox
|
||||||
import stem
|
import stem
|
||||||
from stem import Signal
|
from stem import Signal
|
||||||
from stem.control import Controller
|
from stem.control import Controller
|
||||||
from Crypto.PublicKey import RSA
|
|
||||||
import settings
|
|
||||||
|
|
||||||
|
import settings
|
||||||
import state
|
import state
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
@ -236,6 +237,11 @@ def torbrowser_url(sys_platform=None):
|
||||||
if not sys_platform:
|
if not sys_platform:
|
||||||
sys_platform = sys.platform
|
sys_platform = sys.platform
|
||||||
|
|
||||||
|
if sys_platform.startswith('linux'):
|
||||||
|
machine = platform.machine()
|
||||||
|
if machine not in ('x86_64', 'i386', 'i686'):
|
||||||
|
return
|
||||||
|
|
||||||
base_url = 'https://dist.torproject.org/torbrowser/'
|
base_url = 'https://dist.torproject.org/torbrowser/'
|
||||||
data = read_url(base_url, timeout=3*24*60*60).decode()
|
data = read_url(base_url, timeout=3*24*60*60).decode()
|
||||||
versions = []
|
versions = []
|
||||||
|
@ -248,7 +254,6 @@ def torbrowser_url(sys_platform=None):
|
||||||
url = base_url + current
|
url = base_url + current
|
||||||
language = '.*?en'
|
language = '.*?en'
|
||||||
if sys_platform.startswith('linux'):
|
if sys_platform.startswith('linux'):
|
||||||
import platform
|
|
||||||
if platform.architecture()[0] == '64bit':
|
if platform.architecture()[0] == '64bit':
|
||||||
osname = 'linux64'
|
osname = 'linux64'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue