Fixed minor bugs caused by obsolecense.

This commit is contained in:
Matias Barcenas 2018-01-17 15:26:04 -06:00
parent 304939d0b9
commit cdbce5dbf6
3 changed files with 25 additions and 11 deletions

View File

@ -237,13 +237,14 @@ handshake_snooper_set_jammer_interface() {
if [ "$HANDSHAKEDeauthenticatorIdentifier" = \
"$HandshakeSnooperMonitorMethodOption" ]; then return 0; fi
echo "Running get interface." > $FLUXIONOutputDevice
if ! fluxion_get_interface attack_targetting_interfaces; then
echo "Failed to get interface" > $FLUXIONOutputDevice
echo "Running get jammer interface." > $FLUXIONOutputDevice
if ! fluxion_get_interface attack_targetting_interfaces \
"$HandshakeSnooperJammerInterfaceQuery"; then
echo "Failed to get jammer interface" > $FLUXIONOutputDevice
return 1
fi
echo "Succeeded get interface." > $FLUXIONOutputDevice
echo "Succeeded get jammer interface." > $FLUXIONOutputDevice
HandshakeSnooperJammerInterface=${FluxionInterfaces[$FluxionInterfaceSelected]}
}
@ -345,7 +346,9 @@ if [ ! "$HandshakeSnooperCLIArguments" ]; then
--longoptions="verifier:,interval:,jammer:,asynchronous" \
--name="Handshake Snooper V$FLUXIONVersion.$FLUXIONRevision" -- "$@"
); then
echo -e "${CRed}Aborted$CClr, parameter error detected..."; exit 10
echo -e "${CRed}Aborted$CClr, parameter error detected..."
sleep 5
fluxion_handle_exit
fi
declare -r HandshakeSnooperCLIArguments=$HandshakeSnooperCLIArguments
@ -371,6 +374,7 @@ while [ "$1" != "" -a "$1" != "--" ]; do
shift # Shift new parameters
done
# ============================================================ #
# ===================== < Fluxion Hooks > ==================== #
# ============================================================ #
@ -388,6 +392,7 @@ unprep_attack() {
handshake_snooper_unset_verifier_synchronicity
handshake_snooper_unset_verifier_interval
handshake_snooper_unset_verifier_identifier
handshake_snooper_unset_jammer_interface
handshake_snooper_unset_deauthenticator_identifier
sandbox_remove_workfile "$FLUXIONWorkspacePath/capture"

View File

@ -2,6 +2,8 @@
# identifier: Handshake Snopper
# description: Acquires WPA/WPA2 encryption hashes.
HandshakeSnooperJammerInterfaceQuery="Select an interface for jamming."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
HandshakeSnooperMethodQuery="Select a method of handshake retrieval"
HandshakeSnooperMonitorMethodOption="Monitor (${CYel}passive$CClr)"

19
fluxion
View File

@ -583,7 +583,7 @@ fluxion_do_sequence() {
fi
__fluxion_do_sequence__instruction=${__fluxion_do_sequence__sequence[$__fluxion_do_sequence__instructionIndex]}
echo "Next Instruction: $__fluxion_do_sequence__instruction" \
echo "Running next: $__fluxion_do_sequence__instruction" \
> $FLUXIONOutputDevice
done
}
@ -865,6 +865,12 @@ fluxion_allocate_interface() { # Reserve interfaces
fluxion_get_interface() {
if ! type -t "$1" &> /dev/null; then return 1; fi
if [ "$2" ]; then
local -r interfaceQuery="$2"
else
local -r interfaceQuery=$FLUXIONInterfaceQuery
fi
while true; do
local interfacesAvailable
readarray -t interfacesAvailable < <($1)
@ -923,7 +929,7 @@ fluxion_get_interface() {
"$CRed[$CSYel%1d$CClr$CRed]%b %-8b %3s$CClr %-*.*s\n"
io_query_format_fields \
"$FLUXIONVLine $FLUXIONInterfaceQuery" "$FormatApplyAutosize" \
"$FLUXIONVLine $interfaceQuery" "$FormatApplyAutosize" \
interfacesAvailableColor[@] interfacesAvailable[@] \
interfacesAvailableState[@] interfacesAvailableInfo[@]
@ -1163,7 +1169,7 @@ fluxion_get_target() {
# shit'll hit the fan and we'll have an extremly distressed user.
# Replacing ' ', '/', '.', '~', '\' with '_'
FluxionTargetSSIDClean=$(
echo "$FLUXIONGetTargetSSID" | sed -r 's/( |\/|\.|\~|\\)+/_/g'
echo "$FluxionTargetSSID" | sed -r 's/( |\/|\.|\~|\\)+/_/g'
)
# We'll change a single hex digit from the target AP's MAC address.
@ -1214,7 +1220,7 @@ fluxion_hash_verify() {
echo -e "$FLUXIONVLine $FLUXIONHashVerificationMethodQuery"
echo
fluxion_show_ap_info
fluxion_target_show \
"$hashESSID" \
"$hashEncryption" \
"$hashChannel" \
@ -1264,6 +1270,7 @@ fluxion_hash_verify() {
}
fluxion_hash_unset_path() {
if [ ! "$FluxionHashPath" ]; then return 1; fi
FluxionHashPath=""
}
@ -1333,12 +1340,12 @@ fluxion_hash_set_path() {
}
# Paramters: <defaultHashPath> <bssid> <essid>
fluxion_hash_get() {
fluxion_hash_get_path() {
# Assure we've got the bssid and the essid passed in.
if [ ${#@} -lt 2 ]; then return 1; fi
while true; do
if ! fluxion_hash_set_path "$1"; then return $?; fi
if ! fluxion_hash_set_path "$@"; then return $?; fi
if fluxion_hash_verify "$FluxionHashPath" "${@:1}"; then
break;