From 65707e252924de14fddae4654714cae4b8cb614c Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Wed, 9 Aug 2017 18:36:23 -0500 Subject: [PATCH] Fixed handshake directory missing bug. --- attacks/Handshake Snooper/attack.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/attacks/Handshake Snooper/attack.sh b/attacks/Handshake Snooper/attack.sh index 2cbb979..05ad11d 100755 --- a/attacks/Handshake Snooper/attack.sh +++ b/attacks/Handshake Snooper/attack.sh @@ -29,6 +29,13 @@ function handshake_verifier_daemon() { # If handshake didn't pass verification, it was aborted. if [ $handshakeCheckResult -ne 0 ]; then return 1; fi + # Assure we've got a directory to store hashes into. + local hashDirectory=$(dirname "$2") + if [ ! -d "$hashDirectory" ]; then + mkdir -p "$hashDirectory" + fi + + # Move handshake to storage if one was acquired. mv "${4/.cap/-clean.cap}" "$2" # Signal parent process the verification terminated. @@ -43,9 +50,7 @@ function handshake_stop_verifier() { HANDSHAKEVerifierPID="" } -# Parameters: path, SSID, MAC function handshake_start_verifier() { - # if [ ${#@} -lt 3 ]; then return 1; fi handshake_verifier_daemon $$ \ $FLUXIONPath/attacks/Handshake\ Snooper/handshakes/$APTargetSSIDClean-$APTargetMAC.cap \ $HANDSHAKEVerifier $FLUXIONWorkspacePath/capture/dump-01.cap \