-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathL.I.T.T by @L0WK3Y_IAANSEC.py
executable file
·378 lines (315 loc) · 21.4 KB
/
L.I.T.T by @L0WK3Y_IAANSEC.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
############
####NOTES###
############
# -Use escape charaters to style the program in terminal
# -Add news and weather API
#!/usr/bin/env python
import pyfiglet
import subprocess
import random
import string
import time
import sys
import optparse
import sys, traceback
import termcolor
from sys import platform
def osCheck():
if platform == "linux" or platform == "linux2":
def linux():#Linux Commands
def intro():
subprocess.call(["clear"])
print('[+] L.I.T.T v1.0 by @L0WK3Y_IAANSEC [+]')
custom_fig = pyfiglet.Figlet(font='isometric1')
print(custom_fig.renderText("LITT"))
time.sleep(2)
intro()
try:
nums = random.choice(string.digits)
randomString = 'a' + 'b' + 'c' + 'd' + 'e' + 'f'
numberList = '0', '2', '4', '6', '8'
randomNums = random.choice(numberList)
subprocess.call(["clear"])
modeSelection = raw_input ("1. Network Interface Modes \n2. System Commands \n\n\n\n0. Exit\nMode: ")
if modeSelection == '1':
subprocess.call('clear')
subModeSelect = raw_input("1. MAC Changer\n2. IP Generator\n3. Network Interface Modes\n\n\n\n0. Back\nMode: ")
if subModeSelect == "1": #MAC Changer
def MACchanger():
subprocess.call(['clear'])
print('[+] MAC Changer\n')
macChanger = raw_input ("1. Auto MAC Generator \n2. Manual MAC Entry\n\n\n\n0. Back\nMode: ")
if macChanger == '0':
def returnToMenu():
subprocess.call(['clear'])
osCheck()
returnToMenu()
if macChanger == '1':
subprocess.call(['clear'])
def autoMacGenerator():
print("[+] Mode 1. |Auto MAC Generator| selected.")
time.sleep(1.5)
subprocess.call(['clear'])
subprocess.call(["ifconfig"])
time.sleep(1)
interface = raw_input("Enter name of wireless interface : ")
zero = '0'
a = random.choice(randomString)
b = random.choice(randomString)
c = random.choice(randomString)
d = random.choice(randomString)
e = random.choice(randomString)
macArray = [zero + zero + ':' + randomNums + a + ':' + zero + b + ':' + randomNums + c + ':' + zero + d + ':' + randomNums + e]
mac=''.join(macArray)
def generationAnimation():
print("[+] Generating new MAC address.")
animation = "|/-\\"
for i in range(10):
time.sleep(0.1)
sys.stdout.write("\r" + animation[i % len(animation)])
sys.stdout.flush()
time.sleep(.5)
generationAnimation()
print('\n' + "[+] MAC generation complete.")
time.sleep(.5)
print("[+] Your new MAC address is " + mac)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " down", shell=True) (Less secure way, subprocess.call() can be exploited and used to execute other linux commands using ";" after defining the interface input)
#More secure usage of subprocess.call()
subprocess.call(["sudo", "ifconfig", interface, "down"])
print('[+] Shutting down ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " hw ether " + mac, shell=True)
subprocess.call(["sudo", "ifconfig", interface, "hw", "ether", mac])
print('[+] Applying new MAC address to ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " up", shell=True)
subprocess.call(["sudo", "ifconfig", interface, "up"])
print('[+] Bringing ' + interface + ' back online')
time.sleep(.5)
print('[+] Operation Complete')
def continueToMenu():
subprocess.call(['clear'])
anyKey = raw_input("Press any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
autoMacGenerator()
if macChanger == '2':
def manualEntry():
print("[+] Mode 2. |Manual MAC Entry| selected.")
time.sleep(1.5)
subprocess.call(['clear'])
subprocess.call(["ifconfig"])
time.sleep(1)
interface = raw_input("Enter name of wireless interface : ")
manualMac = raw_input("Enter your new MAC address: ")
time.sleep(.5)
print("[+] Your new MAC address is " + manualMac)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " down", shell=True) (Less secure way, subprocess.call() can be exploited and used to execute other linux commands using ";" after defining the interface input)
#More secure usage of subprocess.call()
subprocess.call(["sudo", "ifconfig", interface, "down"])
print('[+] Shutting down ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " hw ether " + mac, shell=True)
subprocess.call(["sudo", "ifconfig", interface, "hw", "ether", manualMac])
print('[+] Applying new MAC address to ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " up", shell=True)
subprocess.call(["sudo", "ifconfig", interface, "up"])
print('[+] Bringing ' + interface + ' back online')
time.sleep(.5)
print('[+] Operation Complete')
def continueToMenu():
subprocess.call(['clear'])
anyKey = raw_input("Press any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
manualEntry()
MACchanger()
if subModeSelect == '2': #IP Generator
subprocess.call('clear')
print("[+] Mode 2. |IP Address Generator| selected.")
time.sleep(1.5)
def ipGenerator():
def generationAnimation():
print("[+] Generating IP addresses.")
animation = "|/-\\"
for i in range(10):
time.sleep(0.1)
sys.stdout.write("\r" + animation[i % len(animation)])
sys.stdout.flush()
time.sleep(.5)
generationAnimation()
print('\n' + "[+] IP generation complete.")
time.sleep(.2)
subprocess.call(['clear'])
def ipList():
ipArray = [1,'.', 2,'.',3,'.',4]
ipArray[0] = random.randint(0, 255)
ipArray[2] = random.randint(0, 255)
ipArray[4] = random.randint(0, 255)
ipArray[6] = random.randint(0, 255)
ipString = ''.join(str(e) for e in ipArray)
print('\n' + ipString)
for i in range(10):
ipList()
time.sleep(.5)
def continueToMenu():
anyKey = raw_input("\n\nPress any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
ipGenerator()
if subModeSelect == '3': #NIC Modes
subprocess.call(['clear'])
interfaceModeSelection = raw_input("1. Monitor Mode\n2. Managed Mode\n\n\n\n0. Back\nMode: ")
if interfaceModeSelection == '0':
def returnToMenu():
subprocess.call(['clear'])
osCheck()
returnToMenu()
if interfaceModeSelection == '1':
subprocess.call(['clear'])
def monitorMode():
print("[+] Mode 1. |Monitor Mode| selected.")
time.sleep(.5)
def autoMacGenerator():
subprocess.call(['clear'])
subprocess.call(["ifconfig"])
time.sleep(1)
interface = raw_input("Enter name of wireless interface: ")
zero = '0'
a = random.choice(randomString)
b = random.choice(randomString)
c = random.choice(randomString)
d = random.choice(randomString)
e = random.choice(randomString)
macArray = [zero + zero + ':' + randomNums + a + ':' + zero + b + ':' + randomNums + c + ':' + zero + d + ':' + randomNums + e]
mac=''.join(macArray)
def generationAnimation():
print("[+] Generating new MAC address.")
animation = "|/-\\"
for i in range(10):
time.sleep(0.1)
sys.stdout.write("\r" + animation[i % len(animation)])
sys.stdout.flush()
time.sleep(.5)
generationAnimation()
print('\n' + "[+] MAC generation complete.")
time.sleep(.5)
print("[+] Your new MAC address is " + mac)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " down", shell=True) (Less secure way, subprocess.call() can be exploited and used to execute other linux commands using ";" after defining the interface input)
#More secure usage of subprocess.call()
subprocess.call(["sudo", "ifconfig", interface, "down"])
print('[+] Shutting down ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " hw ether " + mac, shell=True)
subprocess.call(["sudo", "ifconfig", interface, "hw", "ether", mac])
print('[+] Applying new MAC address to ' + interface)
time.sleep(.5)
subprocess.call(['sudo', 'iwconfig', interface, 'mode', 'monitor'])
print('[+] Monitor mode now active on ' + interface)
time.sleep(.5)
# subprocess.call("sudo ifconfig " + interface + " up", shell=True)
subprocess.call(["sudo", "ifconfig", interface, "up"])
print('[+] Bringing ' + interface + ' back online')
time.sleep(.5)
print('[+] Operation Complete')
def continueToMenu():
subprocess.call(['clear'])
anyKey = raw_input("Press any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
autoMacGenerator()
monitorMode()
if interfaceModeSelection == '2':
subprocess.call(['clear'])
def managedMode():
print("[+] Mode 2. |Managed Mode| selected.")
time.sleep(.5)
subprocess.call(['clear'])
subprocess.call(["ifconfig"])
time.sleep(1)
interface = raw_input("Enter name of wireless interface : ")
subprocess.call(["sudo", "ifconfig", interface, "down"])
print('[+] Shutting down ' + interface)
time.sleep(.5)
subprocess.call(["sudo", "ifconfig", interface, "up"])
print('[+] Bringing ' + interface + ' back online')
time.sleep(.5)
print('[+] Managed mode now active on ' + interface)
time.sleep(.5)
print('[+] Operation Complete')
time.sleep(1)
def continueToMenu():
subprocess.call(['clear'])
anyKey = raw_input("Press any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
managedMode()
if modeSelection == '2':
subprocess.call(['clear'])
modeSelect = raw_input("1. System Updates & Upgrades\n2. System Info\n\n\n\n0. Back\nMode: ")
if modeSelect == "1":
subprocess.call(['clear'], shell=True)
subprocess.call("sudo apt-get update && sudo apt-get upgrade", shell=True)
print("[+] Operation Complete")
time.sleep(.5)
def continueToMenu():
anyKey = raw_input("\nPress any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
if modeSelect == "2":
subprocess.call(['clear'], shell=True)
subprocess.call(['sudo lshw -short'], shell=True)
time.sleep(.5)
def continueToMenu():
anyKey = raw_input("\nPress any key to continue...")
if anyKey == anyKey:
osCheck()
continueToMenu()
if modeSelect == '0':
def returnToMenu():
subprocess.call(['clear'])
osCheck()
returnToMenu()
if modeSelection == '0':
subprocess.call(['clear'])
termcolor.cprint(text="\nExiting...\n", color="red")
time.sleep(1)
subprocess.call(['clear'])
exit
except KeyboardInterrupt:
subprocess.call(['clear'])
termcolor.cprint(text="\nShutdown requested, exiting...\n", color="red")
time.sleep(2)
subprocess.call(['clear'])
except Exception:
traceback.print_exc(file=sys.stdout)
sys.exit(0)
if __name__ == "__main__":
linux()
elif platform == "darwin":
print('os x')
elif platform == "win32":
def intro():
subprocess.call(["cls"], shell=True)
print('[+] Toolbelt v1.0 by @L0WK3Y_IAANSEC [+]')
custom_fig = pyfiglet.Figlet(font='isometric1')
print(custom_fig.renderText("IAAN"))
time.sleep(2)
intro()
print('windows')
osCheck()
#Adds command options such as "--help" or "-i"
# parser = optparse.OptionParser()
# parser.add_option("-i", "--interface", dest="interface", help="Set interface to change MAC address.")
# parser.add_option("-m", "--mac", dest="manualMac", help="Manually set a MAC address.")
# (options, arguments) = parser.parse_args()