Skip to content

Commit

Permalink
Create startCapture.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredgamulo authored Aug 3, 2020
1 parent 0c6d612 commit 22b3f26
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions WCTF/WiFi/Aircrack/startCapture.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

echo "sudo airmon-ng check kill"
sudo airmon-ng check kill

echo "starting wlan0"

echo "sudo airmon-ng start wlan0"
sudo airmon-ng start wlan0

echo "......."
echo "......."
echo "Environment scan is next. Press Enter then CTRL+C to stop scan."
read TEMP

sudo airodump-ng -i wlan0mon

#echo "ifconfig"
#ifconfig

echo "Enter all or part of the ESSID to Filter ->"
read FILTER

echo "Enter channel (blank to scan) ->"
read CHANNEL

TIME=$( date +%H,%M,%S,%Y.%m.%d)
echo "$TIME"

PRE=""

if [ -z "$CHANNEL" ]
then
PRE="scan"
echo "sudo airodump-ng -w $PRE-$TIME --output-format --essid-regex $FILTER* pcap wlan0mon --band abg"
sudo airodump-ng -w "$PRE-$TIME" --output-format pcap --essid-regex "$FILTER*" wlan0mon --band abg
else
PRE="chan$CHANNEL"
echo "sudo airodump-ng -w $PRE-$TIME --output-format --essid-regex $FILTER* pcap wlan0mon -c $CHANNEL"
sudo airodump-ng -w "$PRE-$TIME" --output-format pcap --essid-regex "$FILTER*" wlan0mon -c $CHANNEL
fi

sudo airmon-ng stop wlan0mon

sudo ifconfig wlan0 up

echo "Results saved in $PRE-$TIME.pcap"
echo ""

0 comments on commit 22b3f26

Please sign in to comment.