mirror of
https://github.com/0x5t4l1n/NexTOR_IP_CHANGER.git
synced 2026-05-26 19:56:30 +00:00
All
This commit is contained in:
@@ -22,8 +22,8 @@ def check_dependencies():
|
||||
missing.append("python3-stem")
|
||||
|
||||
try:
|
||||
subprocess.check_output('which tor', shell=True, stderr=subprocess.DEVNULL)
|
||||
except subprocess.CalledProcessError:
|
||||
subprocess.check_output(['/usr/bin/tor', '--version'], stderr=subprocess.DEVNULL)
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
missing.append("tor")
|
||||
|
||||
if missing:
|
||||
@@ -90,7 +90,7 @@ def main():
|
||||
|
||||
# Start Tor service
|
||||
try:
|
||||
subprocess.check_call(['sudo', 'systemctl', 'start', 'tor'],
|
||||
subprocess.check_call(['/usr/bin/sudo', '/bin/systemctl', 'start', 'tor'],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL)
|
||||
except Exception as e:
|
||||
|
||||
@@ -22,11 +22,11 @@ except Exception:
|
||||
|
||||
# Check if Tor is installed
|
||||
try:
|
||||
check_tor = subprocess.check_output('which tor', shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
check_tor = subprocess.check_output(['/usr/bin/tor', '--version'], stderr=subprocess.DEVNULL)
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
print('[+] tor is not installed!')
|
||||
subprocess.check_output('sudo apt update', shell=True)
|
||||
subprocess.check_output('sudo apt install tor -y', shell=True)
|
||||
subprocess.check_output(['/usr/bin/sudo', '/usr/bin/apt', 'update'])
|
||||
subprocess.check_output(['/usr/bin/sudo', '/usr/bin/apt', 'install', 'tor', '-y'])
|
||||
print('[!] Tor is installed successfully')
|
||||
|
||||
os.system("clear")
|
||||
|
||||
Reference in New Issue
Block a user