Fixed a recent bug caused by a missing directory.
The bug was caused by a new procedure trying to access a missing directory. The directory was only created once a password attempt occured. Removed inert code (code that wasn't doing anything).
This commit is contained in:
parent
3ef08c80e7
commit
ef09b4adac
|
@ -346,10 +346,8 @@ function captive_portal_unset_attack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function captive_portal_get_client_IP() {
|
function captive_portal_get_client_IP() {
|
||||||
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)
|
||||||
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
|
else
|
||||||
MatchedClientIP="unknown"
|
MatchedClientIP="unknown"
|
||||||
fi
|
fi
|
||||||
|
@ -358,7 +356,7 @@ function captive_portal_get_client_IP() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function captive_portal_get_IP_MAC() {
|
function captive_portal_get_IP_MAC() {
|
||||||
if [ -f "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" ] && [ "$(captive_portal_get_client_IP)" != "" ] && [ -f "$FLUXIONWorkspacePath/clients.txt" ]; then
|
if [ -f "$CaptivePortalPassLog/$APTargetSSIDClean-$APTargetMAC-IP.log" ] && [ "$(captive_portal_get_client_IP)" != "" ] && [ -f "$FLUXIONWorkspacePath/clients.txt" ]; then
|
||||||
IP=$(captive_portal_get_client_IP)
|
IP=$(captive_portal_get_client_IP)
|
||||||
MatchedClientMAC=$(cat $FLUXIONWorkspacePath/clients.txt | grep $IP | awk '{print $5}' | grep : | head -n 1 | 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
|
if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then
|
||||||
|
@ -594,6 +592,16 @@ trap handle_abort_authenticator SIGABRT
|
||||||
echo > \"$FLUXIONWorkspacePath/candidate.txt\"
|
echo > \"$FLUXIONWorkspacePath/candidate.txt\"
|
||||||
echo -n \"0\"> \"$FLUXIONWorkspacePath/hit.txt\"
|
echo -n \"0\"> \"$FLUXIONWorkspacePath/hit.txt\"
|
||||||
|
|
||||||
|
# Assure we've got a directory to store net logs into.
|
||||||
|
if [ ! -d \"$CaptivePortalNetLog\" ]; then
|
||||||
|
mkdir -p \"$CaptivePortalNetLog\"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Assure we've got a directory to store pwd logs into.
|
||||||
|
if [ ! -d \"$CaptivePortalPassLog\" ]; then
|
||||||
|
mkdir -p \"$CaptivePortalPassLog\"
|
||||||
|
fi
|
||||||
|
|
||||||
# Make console cursor invisible, cnorm to revert.
|
# Make console cursor invisible, cnorm to revert.
|
||||||
tput civis
|
tput civis
|
||||||
clear
|
clear
|
||||||
|
@ -636,11 +644,6 @@ while [ \$AuthenticatorState = \"running\" ]; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f \"$FLUXIONWorkspacePath/pwdattempt.txt\" -a -s \"$FLUXIONWorkspacePath/pwdattempt.txt\" ]; then
|
if [ -f \"$FLUXIONWorkspacePath/pwdattempt.txt\" -a -s \"$FLUXIONWorkspacePath/pwdattempt.txt\" ]; then
|
||||||
# Assure we've got a directory to store pwd logs into.
|
|
||||||
if [ ! -d \"$CaptivePortalPassLog\" ]; then
|
|
||||||
mkdir -p \"$CaptivePortalPassLog\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Save any new password attempt.
|
# Save any new password attempt.
|
||||||
cat \"$FLUXIONWorkspacePath/pwdattempt.txt\" >> \"$CaptivePortalPassLog/${APTargetSSIDClean//\"/\\\"}-$APTargetMAC.log\"
|
cat \"$FLUXIONWorkspacePath/pwdattempt.txt\" >> \"$CaptivePortalPassLog/${APTargetSSIDClean//\"/\\\"}-$APTargetMAC.log\"
|
||||||
|
|
||||||
|
@ -732,11 +735,6 @@ sleep 3
|
||||||
|
|
||||||
signal_stop_attack
|
signal_stop_attack
|
||||||
|
|
||||||
# Assure we've got a directory to store net logs into.
|
|
||||||
if [ ! -d \"$CaptivePortalNetLog\" ]; then
|
|
||||||
mkdir -p \"$CaptivePortalNetLog\"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo \"
|
echo \"
|
||||||
FLUXION $FLUXIONVersion.$FLUXIONRevision
|
FLUXION $FLUXIONVersion.$FLUXIONRevision
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue