-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathYaraCapper.sh
executable file
·58 lines (50 loc) · 1.18 KB
/
YaraCapper.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
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# version
VERSION="v3.0"
source sources/colors.sh
trap resetApp INT
resetApp()
{
sleep 1s
echo
echo -e "${RED}${ERR}${NRML} Caught Keyboard Interrupt.."
echo -e "${YELLOW}${STAR}${NRML} Resetting YaraCapper to stable state.."
sleep 2s
airmon-ng stop wlan0mon &> /dev/null && service NetworkManager restart &> /dev/null
echo -e "${GREEN}${GOOD}${NRML} Done, Exiting YaraCapper with code 1"
exit 1
}
print_help()
{
echo "Usage: $0 <option>"
echo "Options:"
echo "-h : help"
echo "-e : Ethernet Capture"
echo "-w : Wireless Capture"
echo "-b : "Prints Banner
}
wired()
{
bannerPrinter "$(cat banner.txt | base64 -d)"
sleep 3s
./WiredPacketCapture.sh && python3 ./YaraValidateMail.py -p ./postauth/ -r ./rules/
}
wireless()
{
bannerPrinter "$(cat banner.txt | base64 -d)"
sleep 3s
./WirelessPacketCapture.sh && python3 ./YaraValidateMail.py -p ./postauth/ -r ./rules/
}
# Check arguments
if [[ $# -eq 0 || $# -gt 1 ]];
then
print_help
exit 1
fi
case "$1" in
-h) print_help ;;
-e) wired ;;
-w) wireless ;;
-b) bannerPrinter "$(cat banner.txt | base64 -d)" ;;
*)echo -e "${RED}${ERR}${NRML} $1 is unknown option" && print_help ;;
esac