Changed signal to quality & fixed value bug.
This commit is contained in:
parent
71076314ee
commit
2602de8738
21
fluxion.sh
21
fluxion.sh
|
@ -10,6 +10,7 @@ FLUXIONHashPath="$FLUXIONPath/attacks/Handshake Snooper/handshakes"
|
||||||
FLUXIONScanDB="dump"
|
FLUXIONScanDB="dump"
|
||||||
|
|
||||||
FLUXIONNoiseFloor=-90
|
FLUXIONNoiseFloor=-90
|
||||||
|
FLUXIONNoiseCeiling=-60
|
||||||
|
|
||||||
FLUXIONVersion=3
|
FLUXIONVersion=3
|
||||||
FLUXIONRevision=0
|
FLUXIONRevision=0
|
||||||
|
@ -700,17 +701,29 @@ function set_target_ap() {
|
||||||
TargetAPCandidatesChannel[i]=$(echo $candidateAPInfo | cut -d , -f 4)
|
TargetAPCandidatesChannel[i]=$(echo $candidateAPInfo | cut -d , -f 4)
|
||||||
TargetAPCandidatesSecurity[i]=$(echo $candidateAPInfo | cut -d , -f 6)
|
TargetAPCandidatesSecurity[i]=$(echo $candidateAPInfo | cut -d , -f 6)
|
||||||
TargetAPCandidatesPower[i]=$(echo $candidateAPInfo | cut -d , -f 9)
|
TargetAPCandidatesPower[i]=$(echo $candidateAPInfo | cut -d , -f 9)
|
||||||
# Bug: If value < -90, it'll be < 0%, if > -60 it'll be > 100%, too tired to fix this now.
|
|
||||||
TargetAPCandidatesSignal[i]=$((( ${TargetAPCandidatesPower[i]} * 10 - $FLUXIONNoiseFloor * 10 ) / 3 ))
|
|
||||||
TargetAPCandidatesESSID[i]=$(echo $candidateAPInfo | cut -d , -f 14)
|
TargetAPCandidatesESSID[i]=$(echo $candidateAPInfo | cut -d , -f 14)
|
||||||
TargetAPCandidatesColor[i]=$([ ${TargetAPCandidatesClientsCount[i]} -gt 0 ] && echo $CGrn || echo $CClr)
|
TargetAPCandidatesColor[i]=$([ ${TargetAPCandidatesClientsCount[i]} -gt 0 ] && echo $CGrn || echo $CClr)
|
||||||
|
|
||||||
|
local power=${TargetAPCandidatesPower[i]}
|
||||||
|
if [ $power -eq -1 ]; then
|
||||||
|
# airodump-ng's man page says -1 means unsupported value.
|
||||||
|
TargetAPCandidatesQuality[i]="??";
|
||||||
|
elif [ $power -le $FLUXIONNoiseFloor ]; then
|
||||||
|
TargetAPCandidatesQuality[i]=0;
|
||||||
|
elif [ $power -gt $FLUXIONNoiseCeiling ]; then
|
||||||
|
TargetAPCandidatesQuality[i]=100;
|
||||||
|
else
|
||||||
|
# Bash doesn't support floating point division, so I gotta work around it...
|
||||||
|
# The function is Q = ((P - F) / (C - F)); Q - quality, P - power, F - floor, C - Ceiling.
|
||||||
|
TargetAPCandidatesQuality[i]=$((( ${TargetAPCandidatesPower[i]} * 10 - $FLUXIONNoiseFloor * 10 ) / ( ( $FLUXIONNoiseCeiling - $FLUXIONNoiseFloor ) / 10 ) ))
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
local header=$(printf "%44s\n\n$CRed[$CYel * $CRed]$CClr %-30s %4s %3s %3s %4s %6s %18s\n" "WIFI LIST" "ESSID" "SIG" "PWR" "CL" "CH" "SEC" "MAC ADDRESS")
|
local header=$(printf "%44s\n\n$CRed[$CYel * $CRed]$CClr %-30s %4s %3s %3s %4s %6s %18s\n" "WIFI LIST" "ESSID" "QLTY" "PWR" "CL" "CH" "SEC" "MAC ADDRESS")
|
||||||
io_query_format_fields "$header" "$CRed[$CYel%03d$CRed]%b %-30s %3s%% %3s %3d %4s %6s %18s\n" \
|
io_query_format_fields "$header" "$CRed[$CYel%03d$CRed]%b %-30s %3s%% %3s %3d %4s %6s %18s\n" \
|
||||||
TargetAPCandidatesColor[@] \
|
TargetAPCandidatesColor[@] \
|
||||||
TargetAPCandidatesESSID[@] \
|
TargetAPCandidatesESSID[@] \
|
||||||
TargetAPCandidatesSignal[@] \
|
TargetAPCandidatesQuality[@] \
|
||||||
TargetAPCandidatesPower[@] \
|
TargetAPCandidatesPower[@] \
|
||||||
TargetAPCandidatesClientsCount[@] \
|
TargetAPCandidatesClientsCount[@] \
|
||||||
TargetAPCandidatesChannel[@] \
|
TargetAPCandidatesChannel[@] \
|
||||||
|
|
Loading…
Reference in New Issue