-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathssid_detective.py
90 lines (64 loc) · 3.19 KB
/
ssid_detective.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
# Program to discover all ssid's including hidden and the number of the connected clients
# Author: Zach Fleming
#14/08/18
# Import the relevant python libraries
from termcolor import colored
from core import functions
from core import network_functions
import os
import time
class Main_Menu():
interface_selected = False
mac_address_spoofed = False
monitor_mode = ''
interface = ''
# Initialize class
def __init__(self):
self.menu()
def additional_banner_info(self):
if self.monitor_mode != '':
print colored(self.monitor_mode,'red')
if self.mac_address_spoofed == True:
print colored(self.mac_address_info,'magenta'),
print colored(" [Spoofed]",'magenta', attrs=['bold'])
def menu(self):
while 1:
try:
functions.banner()
self.additional_banner_info()
print colored("\nPlease Select 1 Of The Following Options\n", 'yellow',attrs=['bold'])
print("1. Select Wireless Interface")
print("2. List Wireless Networks")
print("3. Exit\n")
choice = functions.user_input_integer(3)
if choice == 1:
self.interface = functions.user_select_interface() # check for wireless interfaces
functions.system_clear() # clear the screen
if self.interface is not None: # if wireless interfaces are found
self.interface_selected = True # set interface selected to true
self.mac_address_info = functions.spoof_mac_address(self.interface) # spoof mac address
self.mac_address_spoofed = True # Set mac address spoofed indicator to true
functions.enable_monitor_mode(self.interface) # endable monitor mode
self.monitor_mode = ("Monitor Mode: " + "[" + self.interface + "]") # set banner for monitor mode
else:
print colored("[!] No available wireless interfaces found ... Exiting Now",'red',attrs=['bold'])
elif choice == 2 and self.interface_selected is True:
functions.system_clear() # clear screen
functions.banner() # print banner
self.additional_banner_info() # print additional banner info
print colored("\nPlease Select Script Mode:\n", 'yellow',attrs=['bold']) # ask user which mode the wish to run the script in
print("1. Aggressive Mode (Actively disconnect clients to determine hidden ssid's)")
print("2. Passive Mode (Never disconnect clients to determine hidden ssid's)")
mode = functions.user_input_integer(2) # pass to function to determine which option user selected and perform basic error checking
functions.system_clear() # clear screen
functions.banner() # print banner
self.additional_banner_info() # print additional banner info
network_functions.launch(self.interface, mode)
elif choice == 3:
functions.cleanup(self.interface,self.interface_selected,self.mac_address_spoofed)
else:
functions.system_clear()
print colored ("[!!] An interface must be selected",'yellow',attrs=['bold'])
except KeyboardInterrupt:
functions.cleanup(self.interface,self.interface_selected,self.mac_address_spoofed)
Main_Menu()