-
Notifications
You must be signed in to change notification settings - Fork 2
/
pull.py
222 lines (200 loc) · 5.46 KB
/
pull.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
import os
import sys
import random
__help__ = """Usage:
wifijammer.py [--argument] [value]
Args Description Default
-h, --help Throwback this help manaul False
-i, --interface Monitor Mode Interface to use
for scanning & deauthentication None
-c, --channel Channel to put monitor interface
on All
-a, --accesspoints Comma-seperated list of access-
points to target All
-s, --stations Comma-seperated list of stations
to target All
-f, --filters Comma-seperated list of Mac-
addresses to skip target None
-p, --packets Number of deauthentication
packets to send per turn. 5
-d, --delay Delay b/w transmission of pkts 0.1s
-r, --reset To refresh the target list after
the list has reached a specific
number, like --reset 5 None
--code (Int) Deauthentication Code
to send with packets 7
--world Scan for channels from 1-14,
default is 1-11 False
--aggressive Run in Aggressive Mode. Send
Continuous frames to Broadcast
Doesn't work when hoppping. False
--no-broadcast Don't send deauthentication
packets to broadcast address False
--verbose Print device manufacturing
details False
"""
class PULL:
WHITE = '\033[0m'
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
LINEUP = '\033[F'
MIXTURE = {
'WHITE': '\033[0m',
'PURPLE': '\033[95m',
'CYAN': '\033[96m',
'DARKCYAN': '\033[36m',
'BLUE': '\033[94m',
'GREEN': '\033[92m',
'YELLOW': '\033[93m',
'RED': '\033[91m',
'BOLD': '\033[1m',
'UNDERLINE': '\033[4m',
'END': '\033[0m',
'LINEUP': '\033[F'
}
VACANT = {
'WHITE': '',
'PURPLE': '',
'CYAN': '',
'DARKCYAN': '',
'BLUE': '',
'GREEN': '',
'YELLOW': '',
'RED': '',
'BOLD': '',
'UNDERLINE': '',
'END': '',
'LINEUP': ''
}
def __init__(self):
if not self.support_colors:
self.win_colors()
def support_colors(self):
plat = sys.platform
supported_platform = plat != 'Pocket PC' and (plat != 'win32' or \
'ANSICON' in os.environ)
is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
if not supported_platform or not is_a_tty:
return False
return True
def win_colors(self):
self.WHITE = ''
self.PURPLE = ''
self.CYAN = ''
self.DARKCYAN = ''
self.BLUE = ''
self.GREEN = ''
self.YELLOW = ''
self.RED = ''
self.BOLD = ''
self.UNDERLINE = ''
self.END = ''
self.MIXTURE = {
'WHITE': '',
'PURPLE': '',
'CYAN': '',
'DARKCYAN': '',
'BLUE': '',
'GREEN': '',
'YELLOW': '',
'RED': '',
'BOLD': '',
'UNDERLINE': '',
'END': '',
'LINEUP': ''
}
for key in list(self.MIXTURE.items()):
self.MIXTURE[ key ] = ''
def linebreak(self, howmany=1):
for n in range(0, howmany):
sys.stdout.write( "\n" )
def print(self, sig, statement, *colors):
cc = ''
cc = "".join([color for color in colors])
print("{mix}[{sig}]{end} {statement}".format(
sig=sig,
mix=cc,
end=self.END,
statement=statement
))
def verbose(self, sig, statement, verbose, *colors):
if verbose:
cc = ''
cc = "".join([color for color in colors])
print("{mix}[{sig}]{end} {statement}".format(
sig=sig,
mix=cc,
end=self.END,
statement=statement
))
def input(self, sig, statement, validation=(), *colors):
cc = ''
cc = "".join([color for color in colors])
value = input("{mix}[{sig}]{end} {statement}".format(
sig=sig,
mix=cc,
end=self.END,
statement=statement
))
if value:
if validation:
if validation[0].lower() == value.lower():
return True
elif validation[1].lower() == value.lower():
return False
else:
self.print("!", "Something Not Valid here. Enter a Valid Value.", self.RED)
value = self.input(sig, statement, validation, cc)
else:
return value
else:
self.print("!", "Something Not Valid here. Enter a Valid Value.", self.RED)
value = self.input(statement, validation, cc)
return value
def halt(self, statement, exit, *colors):
cc = ''
cc = "".join([color for color in colors])
print("{mix}[~]{end} {statement}".format(
mix=cc,
end=self.END,
statement=statement
))
if exit:
sys.exit(-1)
def get_mac(self, bss):
retval = ''
if os.path.isfile(os.path.join(os.getcwd(), 'maclist', 'macs.txt')):
lines = open(os.path.join(os.getcwd(), 'maclist', 'macs.txt'))
for line in lines:
line = line.split( " ~ " )
if bss.lower().startswith(line[0].lower()[:8]):
retval = line[1].split(" ")[0]
return retval
def help(self):
sys.exit(
__help__
)
def logo(self):
color = random.choice([
self.DARKCYAN,
self.RED,
self.YELLOW,
])
print(
"{mcolor}{bcolor}{body}{ecolor}\n\t\t{amcolor}@hash3liZer v1.0{aecolor}\n".format(
mcolor=color,
bcolor=self.BOLD,
body=__logo__,
ecolor=self.END,
amcolor=self.BOLD,
aecolor=self.END
)
)