-
Notifications
You must be signed in to change notification settings - Fork 84
/
ad.sh
46 lines (41 loc) · 1.17 KB
/
ad.sh
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
#!/bin/bash
read_interface() {
interface=$(cat .interface.txt)
}
output_dir_check() {
if [ -d "Output/$output" ]
then
echo -e "[${red}!${default}] Directory already exists!"
echo -ne "[${green}+${default}] Enter the name for output and the output directory: "
read output
output_dir_check
fi
}
airodump() {
clear
echo -ne "[${green}+${default}] Enter the MAC address of access point (BSSID): "
read bssid
echo $bssid > .current_target.txt
echo -ne "[${green}+${default}] Enter the access point channel: "
read channel
echo -ne "[${green}+${default}] Enter the name for output and the output directory: "
read output
output_dir_check
mkdir Output/$output
echo $output > .output.txt
cd Output/$output
echo -e "[${green}+${default}] Capturing packets on $bssid. Use Ctrl+C to stop the operation."
echo -e "[${green}+${default}] Press Enter to continue."
read
airodump-ng --bssid $bssid -c $channel -w $output $interface
echo -e -n "\n[${red}*${default}] Operation stopped. Press Enter to restart."
read
cd ../../
airodump
}
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
default='\033[0;39m'
read_interface
airodump