Fixed pkg-manager bug, and other minor issues.

Fixed a bug caused by not resetting the package manager after finishing.
The bug occured only when the installer was interrupted.
Removed obsolete code from fluxion's exit procedure.
Added better message feedback to the apt manager.
Updated languages' dialog for new package manager reset notice.
This commit is contained in:
Matias Barcenas 2017-12-20 18:30:09 -06:00
parent bfcb897f23
commit 3df7ec512d
16 changed files with 29 additions and 10 deletions

View File

@ -92,12 +92,14 @@ function fluxion_exitmode() {
echo -e "$CWht[$CRed-$CWht]$CRed $FLUXIONCleanupAndClosingNotice$CClr" echo -e "$CWht[$CRed-$CWht]$CRed $FLUXIONCleanupAndClosingNotice$CClr"
# List currently running processes which we might have to kill before exiting.
local processes local processes
readarray processes < <(ps -A) readarray processes < <(ps -A)
# Currently, fluxion is only responsible for killing airodump-ng, # Currently, fluxion is only responsible for killing airodump-ng, because
# since it uses it to scan for candidate target access points. # fluxion explicitly it uses it to scan for candidate target access points.
# Everything else should be taken care of by the custom attack abort handler. # NOTICE: Processes started by subscripts, such as an attack script,
# MUST BE TERMINATED BY THAT SAME SCRIPT in the subscript's abort handler.
local targets=("airodump-ng") local targets=("airodump-ng")
local targetID # Program identifier/title local targetID # Program identifier/title
@ -109,10 +111,13 @@ function fluxion_exitmode() {
killall $targetPID &> $FLUXIONOutputDevice killall $targetPID &> $FLUXIONOutputDevice
done done
if [ "$WIAccessPoint" ]; then
echo -e "$CWht[$CRed-$CWht] $FLUXIONDisablingExtraInterfacesNotice$CGrn $WIAccessPoint$CClr" # If the installer activated the package manager, make sure to undo any changes.
iw dev $WIAccessPoint del &> $FLUXIONOutputDevice if [ "$PackageManagerCLT" ]; then
fi echo -e "$CWht[$CRed-$CWht] "$(io_dynamic_output "$FLUXIONRestoringPackageManagerNotice")"$CClr"
unprep_package_manager
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"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Čištění a zavírání" FLUXIONCleanupAndClosingNotice="Čištění a zavírání"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Vypínání monitorovacího rozhraní" FLUXIONDisablingMonitorNotice="Vypínání monitorovacího rozhraní"
FLUXIONDisablingExtraInterfacesNotice="Vypínání rozhraní" FLUXIONDisablingExtraInterfacesNotice="Vypínání rozhraní"
FLUXIONDisablingPacketForwardingNotice="Vypínání ${CGry}směrování packetů" FLUXIONDisablingPacketForwardingNotice="Vypínání ${CGry}směrování packetů"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Xterm Terminal konnte nicht gestartet we
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Aufräumen und schließen" FLUXIONCleanupAndClosingNotice="Aufräumen und schließen"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Deaktivierung der Netzwerkkarte" FLUXIONDisablingMonitorNotice="Deaktivierung der Netzwerkkarte"
FLUXIONDisablingExtraInterfacesNotice="Deaktivierung der Netzwerkkarte" FLUXIONDisablingExtraInterfacesNotice="Deaktivierung der Netzwerkkarte"
FLUXIONDisablingPacketForwardingNotice="Deaktivierung ${CGry}von der Weiterleitung von Paketen" FLUXIONDisablingPacketForwardingNotice="Deaktivierung ${CGry}von der Weiterleitung von Paketen"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Καθαρισμός και τερματισμός" FLUXIONCleanupAndClosingNotice="Καθαρισμός και τερματισμός"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Απενεργοποίση εποπτείας περιβάλλοντος" FLUXIONDisablingMonitorNotice="Απενεργοποίση εποπτείας περιβάλλοντος"
FLUXIONDisablingExtraInterfacesNotice="Απενεργοποίηση περιβάλλοντος" FLUXIONDisablingExtraInterfacesNotice="Απενεργοποίηση περιβάλλοντος"
FLUXIONDisablingPacketForwardingNotice="Απενεργοποίηση ${CGry}προώθησης των πακέτων" FLUXIONDisablingPacketForwardingNotice="Απενεργοποίηση ${CGry}προώθησης των πακέτων"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Cleaning and closing" FLUXIONCleanupAndClosingNotice="Cleaning and closing"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Disabling monitoring interface" FLUXIONDisablingMonitorNotice="Disabling monitoring interface"
FLUXIONDisablingExtraInterfacesNotice="Disabling extra interfaces" FLUXIONDisablingExtraInterfacesNotice="Disabling extra interfaces"
FLUXIONDisablingPacketForwardingNotice="Disabling ${CGry}forwarding of packets" FLUXIONDisablingPacketForwardingNotice="Disabling ${CGry}forwarding of packets"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Limpiando y cerrando" FLUXIONCleanupAndClosingNotice="Limpiando y cerrando"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Deshabilitando interfaz de monitoreo" FLUXIONDisablingMonitorNotice="Deshabilitando interfaz de monitoreo"
FLUXIONDisablingExtraInterfacesNotice="Deshabilitando interfaz" FLUXIONDisablingExtraInterfacesNotice="Deshabilitando interfaz"
FLUXIONDisablingPacketForwardingNotice="Deshabilitando ${CGry}reenvio de paquetes" FLUXIONDisablingPacketForwardingNotice="Deshabilitando ${CGry}reenvio de paquetes"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed} Echec au lancement de la session xterm
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Nettoyage et fermeture" FLUXIONCleanupAndClosingNotice="Nettoyage et fermeture"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Désactivation de l'interface de monitoring" FLUXIONDisablingMonitorNotice="Désactivation de l'interface de monitoring"
FLUXIONDisablingExtraInterfacesNotice="Désactivation de l'interface" FLUXIONDisablingExtraInterfacesNotice="Désactivation de l'interface"
FLUXIONDisablingPacketForwardingNotice="Désactivation de ${CGry}transmission de paquets" FLUXIONDisablingPacketForwardingNotice="Désactivation de ${CGry}transmission de paquets"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Errore nell'avvio della sessione XTerm (
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Pulizia e chiusura" FLUXIONCleanupAndClosingNotice="Pulizia e chiusura"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Disabilito l'Interfaccia Monitor" FLUXIONDisablingMonitorNotice="Disabilito l'Interfaccia Monitor"
FLUXIONDisablingExtraInterfacesNotice="Disabilito l'Interfaccia" FLUXIONDisablingExtraInterfacesNotice="Disabilito l'Interfaccia"
FLUXIONDisablingPacketForwardingNotice="Disabilito ${CGry}l'invio dei pacchetti" FLUXIONDisablingPacketForwardingNotice="Disabilito ${CGry}l'invio dei pacchetti"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed} Start xterm niemożliwy (źle skonfigur
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Sprzątanie i zamykanie" FLUXIONCleanupAndClosingNotice="Sprzątanie i zamykanie"
FLUXIONKillingProcessNotice="Zabijanie procesu ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Zabijanie procesu ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Wyłączanie karty monitorującej" FLUXIONDisablingMonitorNotice="Wyłączanie karty monitorującej"
FLUXIONDisablingExtraInterfacesNotice="Disabling extra interfaces" FLUXIONDisablingExtraInterfacesNotice="Disabling extra interfaces"
FLUXIONDisablingPacketForwardingNotice="Disabling ${CGry}forwarding of packets" FLUXIONDisablingPacketForwardingNotice="Disabling ${CGry}forwarding of packets"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Falha ao iniciar a sessão xterm (possiv
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Limpando e saindo" FLUXIONCleanupAndClosingNotice="Limpando e saindo"
FLUXIONKillingProcessNotice="Matando ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Matando ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Desabilitando interface do modo monitor" FLUXIONDisablingMonitorNotice="Desabilitando interface do modo monitor"
FLUXIONDisablingExtraInterfacesNotice="Desabilitando interfaces extras" FLUXIONDisablingExtraInterfacesNotice="Desabilitando interfaces extras"
FLUXIONDisablingPacketForwardingNotice="Desabilitando ${CGry}encaminhador de pacotes" FLUXIONDisablingPacketForwardingNotice="Desabilitando ${CGry}encaminhador de pacotes"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Curatire si inchidere" FLUXIONCleanupAndClosingNotice="Curatire si inchidere"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Dezacticati interfata monitorizata" FLUXIONDisablingMonitorNotice="Dezacticati interfata monitorizata"
FLUXIONDisablingExtraInterfacesNotice="Dezactivati interfata" FLUXIONDisablingExtraInterfacesNotice="Dezactivati interfata"
FLUXIONDisablingPacketForwardingNotice="Dezactivati ${CGry}forwarding of packets" FLUXIONDisablingPacketForwardingNotice="Dezactivati ${CGry}forwarding of packets"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Nepodarilo sa spustiť 'xterm session' (
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Čistím a zatváram" FLUXIONCleanupAndClosingNotice="Čistím a zatváram"
FLUXIONKillingProcessNotice="Ukončujem ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Ukončujem ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Vypínam monitorovací adaptér" FLUXIONDisablingMonitorNotice="Vypínam monitorovací adaptér"
FLUXIONDisablingExtraInterfacesNotice="Vypínam extra adaptéry" FLUXIONDisablingExtraInterfacesNotice="Vypínam extra adaptéry"
FLUXIONDisablingPacketForwardingNotice="Vypínam ${CGry}smerovanie packet-ov" FLUXIONDisablingPacketForwardingNotice="Vypínam ${CGry}smerovanie packet-ov"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Čiščenje in zapiranje" FLUXIONCleanupAndClosingNotice="Čiščenje in zapiranje"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Onemogočanje nadzornega načina" FLUXIONDisablingMonitorNotice="Onemogočanje nadzornega načina"
FLUXIONDisablingExtraInterfacesNotice="Onemogočanje vmesnika" FLUXIONDisablingExtraInterfacesNotice="Onemogočanje vmesnika"
FLUXIONDisablingPacketForwardingNotice="Onemogočanje ${CGry}posredovanja paketov" FLUXIONDisablingPacketForwardingNotice="Onemogočanje ${CGry}posredovanja paketov"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="Temizleniyor ve Kapatiliyor" FLUXIONCleanupAndClosingNotice="Temizleniyor ve Kapatiliyor"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="Monitor modu kapatiliyor" FLUXIONDisablingMonitorNotice="Monitor modu kapatiliyor"
FLUXIONDisablingExtraInterfacesNotice="Ag Arayuzu kapatiliyor" FLUXIONDisablingExtraInterfacesNotice="Ag Arayuzu kapatiliyor"
FLUXIONDisablingPacketForwardingNotice="Kapatiliyor ${CGry}forwarding of packets" FLUXIONDisablingPacketForwardingNotice="Kapatiliyor ${CGry}forwarding of packets"

View File

@ -66,6 +66,7 @@ FLUXIONGeneralXTermFailureError="${CRed}Failed to start xterm session (possible
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
FLUXIONCleanupAndClosingNotice="清理进程并退出" FLUXIONCleanupAndClosingNotice="清理进程并退出"
FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr" FLUXIONKillingProcessNotice="Killing ${CGry}\$targetID$CClr"
FLUXIONRestoringPackageManagerNotice="Restoring ${CCyn}\$PackageManagerCLT$CClr"
FLUXIONDisablingMonitorNotice="关闭监听模式界面" FLUXIONDisablingMonitorNotice="关闭监听模式界面"
FLUXIONDisablingExtraInterfacesNotice="关闭USB外部网卡接口" FLUXIONDisablingExtraInterfacesNotice="关闭USB外部网卡接口"
FLUXIONDisablingPacketForwardingNotice="关闭 ${CGry}转发数据包" FLUXIONDisablingPacketForwardingNotice="关闭 ${CGry}转发数据包"

View File

@ -14,7 +14,7 @@ PackageManagerLog="$InstallerUtilsWorkspacePath/package_manager.log"
function installer_utils_run_spinner() { function installer_utils_run_spinner() {
local pid=$1 local pid=$1
local delay=0.15 local delay=0.15
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