-
Notifications
You must be signed in to change notification settings - Fork 0
/
TorKangaroo.py
67 lines (49 loc) · 1.54 KB
/
TorKangaroo.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
import os
import sys
import time
import signal
import threading
import requests
#From Section
from termcolor import colored, cprint
# Script Starting
#trying to add KeyboardInterrupt
def sigint_handler(signal, frame):
print(' You pressed Ctrl+C!')
time.sleep(3)
print('Turn off TorGhost...')
time.sleep(3)
os.system('torghost stop')
os.system('clear')
print('And you are back on your public IP: ')
print(requests.get('http://ip.42.pl/raw').text)
sys.exit(0)
signal.signal(signal.SIGINT, sigint_handler)
#Does TorGhost path exist?
dirExist = os.path.exists('./torghost')
if dirExist == False: #If not, Downloading and Installing it.
os.system('git clone https://github.com/susmithHCK/torghost.git')
os.system('cd torghost/')
os.system('chmod +x torghost/install.sh')
os.system('torghost/./install.sh')
os.system('clear')
# Setting Timer Value (In second)
userTimer = int(input('Enter [In seconds] timer between ip change [Min: 20] : '))
t = userTimer
# Starting The Engine..
print('Starting Tor Bouncing')
time.sleep(3)
os.system('torghost start')
while(True):
os.system('torghost switch')
time.sleep(t)
# If TorGhost Directory exist, Just start the engine.
if dirExist == True:
userTimer = int(input('Enter [In seconds] timer between ip change [Min: 20] : '))
t = userTimer
print('Starting Tor Bouncing')
time.sleep(3)
os.system('torghost start')
while(True):
os.system('torghost switch')
time.sleep(t)