forked from FDX100/Auto_Tor_IP_changer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoTOR.py
86 lines (64 loc) · 2.19 KB
/
autoTOR.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- coding: utf-8 -*-
import time
import os
import subprocess
try:
check_pip3 = subprocess.check_output('dpkg -s python3-pip', shell=True)
if str('install ok installed') in str(check_pip3):
pass
except subprocess.CalledProcessError:
print('[+] pip3 not installed')
subprocess.check_output('sudo apt update',shell=True)
subprocess.check_output('sudo apt install python3-pip -y', shell=True)
print('[!] pip3 installed succesfully')
try:
import requests
except Exception:
print('[+] python3 requests is not installed')
os.system('pip3 install requests')
os.system('pip3 install requests[socks]')
print('[!] python3 requests is installed ')
try:
check_tor = subprocess.check_output('which tor', shell=True)
except subprocess.CalledProcessError:
print('[+] tor is not installed !')
subprocess.check_output('sudo apt update',shell=True)
subprocess.check_output('sudo apt install tor -y',shell=True)
print('[!] tor is installed succesfully ')
os.system("clear")
def ma_ip():
url='https://www.myexternalip.com/raw'
get_ip= requests.get(url,proxies=dict(http='socks5://127.0.0.1:9050',https='socks5://127.0.0.1:9050'))
return get_ip.text
def change():
os.system("service tor reload")
print ('[+] Your IP has been Changed to : '+str(ma_ip()))
print('''\033[1;32;40m \n
_ _______
/\ | | |__ __|
/ \ _ _| |_ ___ | | ___ _ __
/ /\ \| | | | __/ _ \ | |/ _ \| '__|
/ ____ \ |_| | || (_) | | | (_) | |
/_/ \_\__,_|\__\___/ |_|\___/|_|
V 2.1
from mrFD
''')
print("\033[1;40;31m http://facebook.com/ninja.hackerz.kurdish/\n")
os.system("service tor start")
time.sleep(3)
print("\033[1;32;40m change your SOCKES to 127.0.0.1:9050 \n")
os.system("service tor start")
x = input("[+] time to change Ip in Sec [type=60] >> ")
lin = input("[+] how many time do you want to change your ip [type=1000]for infinte ip change type [0] >>")
if int(lin) ==int(0):
while True:
try:
time.sleep(int(x))
change()
except KeyboardInterrupt:
print('\nauto tor is closed ')
quit()
else:
for i in range(int(lin)):
time.sleep(int(x))
change()