Added fluxion xterm-failure checking.

This commit is contained in:
Matias Barcenas 2017-08-27 15:36:45 -05:00
parent 8a1ed66713
commit 593d821d07
12 changed files with 21 additions and 2 deletions

View File

@ -62,11 +62,17 @@ if [ $EUID -ne 0 ]; then
exit 1
fi
################################### < XTerm Checks > ###################################
if [ ! "${DISPLAY:-}" ]; then
echo -e "${CRed}The script should be exected inside a X (graphical) session.$CClr"
exit 2
fi
#if ! xdpyinfo &> /dev/null; then
# echo -e "${CRed}The script failed to initialize an xterm test session.$CClr"
# exit 3
#fi
################################# < Default Language > #################################
source language/en.sh
@ -310,7 +316,7 @@ function set_resolution() { # Windows + Resolution
TOPRIGHTBIG="-geometry 90x27-0+0"
}
detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3)
detectedresolution=$(xdpyinfo 2> /dev/null | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3)
## A) 1024x600
## B) 1024x768
@ -606,7 +612,9 @@ function run_scanner() {
if [ "$channels" ]; then local channelsQuery="--channel $channels"; fi
# Begin scanner and output all results to "dump-01.csv."
xterm $FLUXIONHoldXterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e airodump-ng -Mat WPA $channelsQuery -w "$FLUXIONWorkspacePath/dump" $monitor
if ! xterm $FLUXIONHoldXterm -title "$FLUXIONScannerHeader" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e "airodump-ng -Mat WPA $channelsQuery -w \"$FLUXIONWorkspacePath/dump\" $monitor" 2> /dev/null; then
echo -e "$FLUXIONVLine$CRed $FLUXIONGeneralXTermFailureError"; sleep 5; return 1
fi
local scannerResultsExist=$([ -f "$FLUXIONWorkspacePath/dump-01.csv" ] && echo true)
local scannerResultsReadable=$([ -s "$FLUXIONWorkspacePath/dump-01.csv" ] && echo true)

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Zpět"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Nenalezeno"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Čištění a zavírání"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Zurück"
FLUXIONGeneralExitOption="${CRed}Ausgang"
FLUXIONGeneralRepeatOption="${CRed}Wiederholen Sie den Vorgang"
FLUXIONGeneralNotFoundError="Nicht gefunden"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Aufräumen und schließen"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Πίσω"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Δένρέθηκε"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Καθαρισμός και τερματισμός"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Back"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Not Found"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Cleaning and closing"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Atrás"
FLUXIONGeneralExitOption="${CRed}Salir"
FLUXIONGeneralRepeatOption="${CRed}Repetir la operación"
FLUXIONGeneralNotFoundError="No_Encontrado"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Limpiando y cerrando"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Retour"
FLUXIONGeneralExitOption="${CRed}Sortie"
FLUXIONGeneralRepeatOption="${CRed}Répéter l'opération"
FLUXIONGeneralNotFoundError="Non trouvé"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Nettoyage et fermeture"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Indietro"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Non_Trovato"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Pulizia e chiusura"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Inapoi"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Nu a fost gasit"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Curatire si inchidere"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Nazaj"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Ni_najdeno"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Čiščenje in zapiranje"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}Geri"
FLUXIONGeneralExitOption="${CRed}Exit"
FLUXIONGeneralRepeatOption="${CRed}Repeat operation"
FLUXIONGeneralNotFoundError="Bulunamadi"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Temizleniyor ve Kapatiliyor"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"

View File

@ -64,6 +64,7 @@ FLUXIONGeneralBackOption="${CRed}返回"
FLUXIONGeneralExitOption="${CRed}退出"
FLUXIONGeneralRepeatOption="${CRed}重复操作"
FLUXIONGeneralNotFoundError="未找到"
FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible misconfiguration)."
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="清理进程并退出"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"