Began implementation of attack resume system.

This commit is contained in:
Matias Barcenas 2018-03-17 00:55:43 -05:00
parent 488b1141c3
commit e6a5b268c7
1 changed files with 42 additions and 0 deletions

View File

@ -398,6 +398,15 @@ attack_targetting_interfaces() {
done done
} }
attack_tracking_interfaces() {
interface_list_wireless
local interface
for interface in "${InterfaceListWireless[@]}"; do
echo "$interface"
done
echo "" # This enables the Skip option.
}
unprep_attack() { unprep_attack() {
HandshakeSnooperState="Not Ready" HandshakeSnooperState="Not Ready"
@ -415,6 +424,31 @@ prep_attack() {
IOUtilsHeader="handshake_snooper_header" IOUtilsHeader="handshake_snooper_header"
local -r attackPath="$FLUXIONPath/attacks/Handshake Snooper"
# Attempt loading configuration if one is available.
# TODO: Enable this by removing extraneous " -a ! " when properly implemented.
if [ -f "$attackPath/attack.conf" -a ! ]; then
local choice=${1:+Y}
# TODO: This doesn't translate choices to the selected language.
while ! echo "$choice" | grep -q "^[ynYN]$" &> /dev/null; do
echo -ne "$FLUXIONVLine Would you like to repeat the last attack? [Y/n] "
read choice
if [ ! "$choice" ]; then break; fi
done
if [ "${choice,,}" != "n" ]; then
local configuration
readarray -t configuration < <(more "$attackPath/attack.conf")
HandshakeSnooperDeauthenticatorIdentifier=${configuration[0]}
HandshakeSnooperJammerInterface=${configuration[1]}
HandshakeSnooperVerifierIdentifier=${configuration[2]}
HandshakeSnooperVerifierInterval=${configuration[3]}
HandshakeSnooperVerifierSynchronicity=${configuration[4]}
fi
fi
# Removed read-only due to local constant shadowing bug. # Removed read-only due to local constant shadowing bug.
# I've reported the bug, we can add it when fixed. # I've reported the bug, we can add it when fixed.
local sequence=( local sequence=(
@ -429,6 +463,14 @@ prep_attack() {
return 1 return 1
fi fi
# Store/overwrite attack configuration for pause & resume.
# Order: DeauthID, JammerWI, VerifId, VerifInt, VerifSync
echo "$HandshakeSnooperDeauthenticatorIdentifier" > "$attackPath/attack.conf"
echo "$HandshakeSnooperJammerInterface" >> "$attackPath/attack.conf"
echo "$HandshakeSnooperVerifierIdentifier" >> "$attackPath/attack.conf"
echo "$HandshakeSnooperVerifierInterval" >> "$attackPath/attack.conf"
echo "$HandshakeSnooperVerifierSynchronicity" >> "$attackPath/attack.conf"
HandshakeSnooperState="Ready" HandshakeSnooperState="Ready"
} }