-
Notifications
You must be signed in to change notification settings - Fork 0
/
printUtils.py
112 lines (75 loc) · 5.12 KB
/
printUtils.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import os
import sys
import time
import cursor
global stop_animation
stop_animation=False
class Color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[32m'
LIGHTGREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
ORANGE = '\033[33m'
WHITE = '\33[97m'
END = '\033[0m'
class PrintUtils:
def __init__(self):
self.stop_animation=False
def heading():
spaces = " " * 76
sys.stdout.write(Color.RED + spaces + """
██╗ ██╗██╗███████╗██╗ ███████╗██████╗ ██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗████████╗
██║ ██║██║██╔════╝██║ ██╔════╝██╔══██╗██╔═══██╗██╔═══██╗██╔════╝ ██╔═══██╗██║ ██║╚══██╔══╝
██║ █╗ ██║██║█████╗ ██║ ███████╗██████╔╝██║ ██║██║ ██║█████╗ ██║ ██║██║ ██║ ██║
██║███╗██║██║██╔══╝ ██║ ╚════██║██╔═══╝ ██║ ██║██║ ██║██╔══╝ ██║ ██║██║ ██║ ██║
╚███╔███╔╝██║██║ ██║ ███████║██║ ╚██████╔╝╚██████╔╝██║ ╚██████╔╝╚██████╔╝ ██║
╚══╝╚══╝ ╚═╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
""" +Color.END + Color.BLUE +
'\n' + '{}Kick unwanted devices from wifi{}'.format(Color.YELLOW,Color.RED,Color.YELLOW,Color. BLUE).center(120)+
'\n'+'Creator: {}abidkiller({}Abid Ahsan Samin{}{})'.format(Color.RED,Color.BLUE,Color.END,Color.RED).center(128))
def menu():
print('\nChoose an option from the menu:\n')
print('\t\t{}[{}O{}]{} Spoof out {}ONE{} device'.format(Color.GREEN,Color. RED, Color.GREEN,Color. YELLOW,Color.RED,Color.YELLOW))
print('\t\t{}[{}M{}]{} Spoof out {}MULTIPLE{} devices'.format(Color.GREEN,Color. RED, Color.GREEN,Color. YELLOW,Color.RED,Color.YELLOW))
print('\t\t{}[{}A{}]{} Spoof Out {}ALL{} devices'.format(Color.GREEN,Color. RED,Color. GREEN,Color. YELLOW,Color.RED,Color.YELLOW))
print('\t\t{}[{}L{}]{} Spoof Out {}Limit ONE{} device'.format(Color.GREEN,Color. RED,Color. GREEN,Color. YELLOW,Color.RED,Color.YELLOW))
print('\n\t\t{}[{}E{}]{} Exit\n'.format(Color.GREEN, Color.RED, Color.GREEN, Color.YELLOW))
def scanning_animation(self,text):
global stop_animation
try:
animation = ["■ □ □ □ □ □ □ □ □ □ □ □ □",
"■ ■ □ □ □ □ □ □ □ □ □ □ □",
"■ ■ ■ □ □ □ □ □ □ □ □ □ □",
"■ ■ ■ ■ □ □ □ □ □ □ □ □ □",
"■ ■ ■ ■ ■ □ □ □ □ □ □ □ □",
"■ ■ ■ ■ ■ ■ □ □ □ □ □ □ □",
"■ ■ ■ ■ ■ ■ ■ □ □ □ □ □ □",
"■ ■ ■ ■ ■ ■ ■ ■ □ □ □ □ □",
"■ ■ ■ ■ ■ ■ ■ ■ ■ □ □ □ □",
"■ ■ ■ ■ ■ ■ ■ ■ ■ ■ □ □ □",
"■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ □ □",
"■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ □",
"■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■"]
dummy="Runnin,Please Wait!"
cursor.hide()
sys.stdout.write('{}{}{}'.format(Color.YELLOW,text,dummy))
i=0
length=len(animation)
stop_animation=False
reverse=False
while stop_animation==False:
reverse = True if i==length-1 else (False if i==0 else reverse)
time.sleep(0.2)
sys.stdout.write("\r" + '{}{}'.format(Color.YELLOW,animation[i % len(animation)]))
sys.stdout.flush()
i= (i-1 if reverse else i+1)
sys.stdout.write("\x1b[1A\x1b[2K")
sys.stdout.write('\r'+text+' DONE..!'.format(Color.GREEN))
except:
os._exit(1)