diff --git a/.gitattributes b/.gitattributes index f784c7877..b3968395e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,4 @@ *.md text # Binary image formats -*.png binary - -# Standard to msysgit -*.ods diff=odf \ No newline at end of file +*.png binary \ No newline at end of file diff --git a/README.md b/README.md index eccb0d698..2994c58ec 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ This is a multi-use bash script for Linux systems to audit wireless networks.
- Easy targeting and selection in every section.
- Drag and drop files on console window for entering file paths.
+- Screen resolution detection for optimal windows viewing.
- Controlled Exit. Cleaning tasks and temp files. Option to keep monitor mode if desired.
- Multilanguage support and autodetect OS language feature (see supported languages section).
- Help hints in every zone/menu for easy use.
@@ -49,12 +50,17 @@ Optional tools: <- *not necessary to work, only needed for some features*

Update tools: <- *not necessary to work, only used for auto-update*
`curl`
-
+ +#Known incompatibilities Impossible compatibility for Mac OSX at the moment. Some reasons:
*-Bash version* <- it can be avoided upgrading to 4 or later, this is not the real problem :)
*-Aircrack suite* <- this suite for OSX doesn't support airodump and aireplay
*-Wireless tools* <- iwconfig doesn't exists for OSX, and airport command can't be used. It generates very different outputs
+Incompatible with OpenBSD and FreeBSD. They are Unix systems but they have some differences with Linux:
+*-Bash* <- They have no bash. It can be installed, this is not the real problem
+*-Wireless tools* <- iwconfig doesn't exists for these systems, they use ifconfig instead and it generates very different outputs
+ #Disclaimer This script must be used only for educational purposes and Pen testing.
Use it only on your own networks.
@@ -77,16 +83,14 @@ You can join the project:
-Testing and feedback is needed too.

*For collaborating translators:*
-There is a `.ods` file to work with. This file extension (Open Document SpreadSheet) is like an Excel but in non propietary format. It contains all the strings to translate.
-Fill or review your language strings and mark with `X` the corresponding reviewed cell each time
-Respect the color style (light red for non reviewed and soft green for reviewed cells).
+You can take the strings to translate from the code or you can ask me directly by mail. I'll inform you how to proceed.

*For collaborating developers:*
Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1
Please, respect the code style and the UTF-8 files format only using at the end of the lines LF (not CRLF).

*For beta testers:*
-You can download the master version or the beta testing version from the development branch called `dev` +You can download the master version or the beta testing version from the development branch called `dev`
#Changelog See Changelog file to review changes.
diff --git a/airgeddon.sh b/airgeddon.sh index 48e912688..6fe62e9cf 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1,6 +1,6 @@ #!/bin/bash -airgeddon_version="3.42" +airgeddon_version="3.44" #Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 debug_mode=0 @@ -69,6 +69,7 @@ resume_message=224 abort_question=12 pending_of_translation="[PoT]" escaped_pending_of_translation="\[PoT\]" +standard_resolution="1024x768" #Distros vars known_compatible_distros=( @@ -444,11 +445,11 @@ function language_strings() { arr["catalan",49]="4. Explorar per buscar objectius (es requereix mode monitor)" arr["portuguese",49]="$pending_of_translation 4. Procurar para procurar objetivos (modo monitor obrigatório)" - arr["english",50]="----------(monitor mode needed for attacks)----------" - arr["spanish",50]="---------(modo monitor requerido en ataques)---------" - arr["french",50]="----(modo moniteur obligatoire pour ces attaques)----" - arr["catalan",50]="----------(mode monitor requerit per atacs)----------" - arr["portuguese",50]="$pending_of_translation ---------(Necessário no modo ataques monitor)--------" + arr["english",50]="monitor mode needed for attacks" + arr["spanish",50]="modo monitor requerido en ataques" + arr["french",50]="modo moniteur obligatoire pour ces attaques" + arr["catalan",50]="mode monitor requerit per atacs" + arr["portuguese",50]="$pending_of_translation necessário no modo ataques monitor" arr["english",51]="5. Deauth / disassoc amok mdk3 attack" arr["spanish",51]="5. Ataque Deauth / Disassoc amok mdk3" @@ -468,11 +469,11 @@ function language_strings() { arr["catalan",53]="7. Atac WIDS / WIPS / WDS Confusion" arr["portuguese",53]="$pending_of_translation 7. Ataque WIDS / WIPS / Confusão WDS" - arr["english",54]="-----(Old \"obsolete/non very effective\" attacks)-----" - arr["spanish",54]="---(Antiguos ataques \"obsoletos/no muy efectivos\")---" - arr["french",54]="----(Anciennes attaques \"obsolètes/peu efficaces\")---" - arr["catalan",54]="-----(Antics atacs \"obsolets/no gaire efectius\")-----" - arr["portuguese",54]="$pending_of_translation ----(Ataques antigos \"obsoleta/não muito eficaz\")----" + arr["english",54]="old \"obsolete/non very effective\" attacks" + arr["spanish",54]="antiguos ataques \"obsoletos/no muy efectivos\"" + arr["french",54]="anciennes attaques \"obsolètes/peu efficaces\"" + arr["catalan",54]="antics atacs \"obsolets/no gaire efectius\"" + arr["portuguese",54]="$pending_of_translation ataques antigos \"obsoleta/não muito eficaz\"" arr["english",55]="2. Put interface in monitor mode" arr["spanish",55]="2. Poner la interfaz en modo monitor" @@ -888,11 +889,11 @@ function language_strings() { arr["catalan",123]="7. Tornar al menú principal" arr["portuguese",123]="$pending_of_translation 7. Volte ao menu principal" - arr["english",124]="---------(monitor mode needed for capturing)---------" - arr["spanish",124]="---------(modo monitor requerido en captura)---------" - arr["french",124]="------(modo moniteur nécessaire pour la capture)------" - arr["catalan",124]="---------(mode monitor requerit en captura)----------" - arr["portuguese",124]="$pending_of_translation ---------(Modo de captura do monitor necessário)---------" + arr["english",124]="monitor mode needed for capturing" + arr["spanish",124]="modo monitor requerido en captura" + arr["french",124]="modo moniteur nécessaire pour la capture" + arr["catalan",124]="mode monitor requerit en captura" + arr["portuguese",124]="$pending_of_translation modo de captura do monitor necessário" arr["english",125]="There is no valid target network selected. You'll be redirected to select one" arr["spanish",125]="No hay una red objetivo válida seleccionada. Serás redirigido para seleccionar una" @@ -1200,11 +1201,11 @@ function language_strings() { arr["catalan",175]="2. (aircrack + crunch) Atac de força bruta sobre fitxer de captura" arr["portuguese",175]="$pending_of_translation 2. (aircrack + crunch) Ataque de força bruta em arquivo de captura" - arr["english",176]="----------(aircrack CPU, non GPU attacks)------------" - arr["spanish",176]="-----------(ataques aircrack CPU, no GPU)------------" - arr["french",176]="-----------(attaques aircrack CPU, pas GPU)-----------" - arr["catalan",176]="------------(atacs aircrack CPU, no GPU)-------------" - arr["portuguese",176]="$pending_of_translation -----------(ataques aircrack CPU, não GPU)------------" + arr["english",176]="aircrack CPU, non GPU attacks" + arr["spanish",176]="ataques aircrack CPU, no GPU" + arr["french",176]="attaques aircrack CPU, pas GPU" + arr["catalan",176]="atacs aircrack CPU, no GPU" + arr["portuguese",176]="$pending_of_translation ataques aircrack CPU, não GPU" arr["english",177]="Selected captured file: "${pink_color}"None"${normal_color} arr["spanish",177]="Fichero capturado seleccionado: "${pink_color}"Ninguno"${normal_color} @@ -1518,11 +1519,11 @@ function language_strings() { arr["catalan",228]=" Desenvolupat per $author" arr["portuguese",228]=" Programado por $author" - arr["english",229]="-----------(hashcat CPU, non GPU attacks)------------" - arr["spanish",229]="-------------(ataques hashcat CPU, no GPU)-----------" - arr["french",229]="-----------(attaques hashcat CPU, pas GPU)-----------" - arr["catalan",229]="-------------(atacs hashcat CPU, no GPU)-------------" - arr["portuguese",229]="$pending_of_translation ------------(ataques hashcat CPU, não GPU)-----------" + arr["english",229]="hashcat CPU, non GPU attacks" + arr["spanish",229]="ataques hashcat CPU, no GPU" + arr["french",229]="attaques hashcat CPU, pas GPU" + arr["catalan",229]="atacs hashcat CPU, no GPU" + arr["portuguese",229]="$pending_of_translation ataques hashcat CPU, não GPU" arr["english",230]="3. (hashcat) Dictionary attack against capture file" arr["spanish",230]="3. (hashcat) Ataque de diccionario sobre fichero de captura" @@ -1629,7 +1630,7 @@ function language_strings() { arr["english",247]="Despite having all essential tools installed, your system uses airmon-zc instead of airmon-ng. In order to work properly you need to install ethtool and you don't have it right now. Please, install it and launch the script again" arr["spanish",247]="A pesar de tener todas las herramientas esenciales instaladas, tu sistema usa airmon-zc en lugar de airmon-ng. Para poder funcionar necesitas tener instalado ethtool y tú no lo tienes en este momento. Por favor, instálalo y vuelve a lanzar el script" arr["french",247]="En dépit d'avoir tous les outils essentiels installés votre système utilise airmon-zc au lieu de airmon-ng. Vous devez installer ethtool que vous n'avez pas à ce moment. S'il vous plaît, installez-le et relancez le script" - arr["catalan",247]="$pending_of_translation Tot i tenir totes les eines essencials instal·lades, el teu sistema fa servir airmon-zc en lloc del airmon-ng. Per poder funcionar necessites tenir instal·lat ethtool i tu no el tens en aquest moment. Si us plau, instal·la-ho i torna a llançar el script" + arr["catalan",247]="Tot i tenir totes les eines essencials instal·lades, el teu sistema fa servir airmon-zc en lloc del airmon-ng. Per poder funcionar necessites tenir instal·lat ethtool i tu no el tens en aquest moment. Si us plau, instal·la-ho i torna a executar el script" arr["portuguese",247]="$pending_of_translation Apesar de ter todas as ferramentas essenciais instalado, o sistema utiliza airmon-zc vez de airmon-ng. Para funcionar você precisa instalar ethtool e você não tem neste momento. Por favor, instale e execute o script novamente" arr["english",248]="Language changed to Portuguese" @@ -1647,15 +1648,27 @@ function language_strings() { arr["english",250]="If you see any bad translation or just want "${cyan_color}"$pending_of_translation"${pink_color}" marks to dissapear, write me to $mail to collaborate with translations" arr["spanish",250]="Si ves alguna traducción incorrecta o quieres que desparezcan las marcas "${cyan_color}"$pending_of_translation"${pink_color}", escríbeme a $mail para colaborar con las traducciones" arr["french",250]="Si vous voyez des erreurs contresens ou voulez voir les marques "${cyan_color}"$pending_of_translation"${pink_color}" disparaitre, écrivez à $mail pour collaborer avec les traductions" - arr["catalan",250]="$pending_of_translation Si veus alguna traducció incorrecta o vols que desapareguin les marques "${cyan_color}"$pending_of_translation"${pink_color}", escriu-me a $mail per col·laborar amb les traduccions" + arr["catalan",250]="Si veus alguna traducció incorrecta o vols que desapareguin les marques "${cyan_color}"$pending_of_translation"${pink_color}", escriu-me a $mail per col·laborar amb les traduccions" arr["portuguese",250]="$pending_of_translation Se você ver qualquer erro de tradução ou quer marcas "${cyan_color}"$pending_of_translation"${pink_color}", escreva para $mail para colaborar com traduções desaparecer" arr["english",251]="You have chosen the same language that was selected. No changes will be done" arr["spanish",251]="Has elegido el mismo idioma que estaba seleccionado. No se realizarán cambios" arr["french",251]="Vous venez de choisir la langue qui est en usage. Pas de changements" - arr["catalan",251]="$pending_of_translation Has triat el mateix idioma que estava seleccionat. No es realitzaran canvis" + arr["catalan",251]="Has triat el mateix idioma que estava seleccionat. No es realitzaran canvis" arr["portuguese",251]="$pending_of_translation Você escolheu o mesmo idioma que foi selecionado. Nenhuma alteração será feita" + arr["english",294]="Detecting resolution... Detected! : "${normal_color}"$resolution" + arr["spanish",294]="Detectando resolución... Detectada! : "${normal_color}"$resolution" + arr["french",294]="$pending_of_translation Détection du résolution... Détectée! : "${normal_color}"$resolution" + arr["catalan",294]="$pending_of_translation Detecció resolució... Detectada! : "${normal_color}"$resolution" + arr["portuguese",294]="$pending_of_translation Detecção de resolução... Detectada! : "${normal_color}"$resolution" + + arr["english",295]="Detecting resolution... Can't be detected!, using standard : "${normal_color}"$resolution" + arr["spanish",295]="Detectando resolución... No se ha podido detectar!, usando estándar : "${normal_color}"$resolution" + arr["french",295]="$pending_of_translation Détection du résolution... Impossible de détecter!, en utilisant la norme : "${normal_color}"$resolution" + arr["catalan",295]="$pending_of_translation Detecció resolució... No s'ha pogut detectar!, usant estàndard : "${normal_color}"$resolution" + arr["portuguese",295]="$pending_of_translation Detectando resolução... Não foi possível detectar!, usando o padrão : "${normal_color}"$resolution" + case "$3" in "yellow") interrupt_checkpoint ${2} ${3} @@ -1676,8 +1689,8 @@ function language_strings() { "pink") echo_pink "${arr[$1,$2]}" ;; - "titlered") - generate_title "${arr[$1,$2]}" "red" + "title") + generate_dynamic_line "${arr[$1,$2]}" "title" ;; "read") interrupt_checkpoint ${2} ${3} @@ -1689,6 +1702,9 @@ function language_strings() { "hint") echo_brown "$hintvar "${pink_color}"${arr[$1,$2]}" ;; + "separator") + generate_dynamic_line "${arr[$1,$2]}" "separator" + ;; *) if [ -z "$3" ]; then last_echo "${arr[$1,$2]}" ${normal_color} @@ -1741,11 +1757,18 @@ function special_text_missed_optional_tool() { fi } -function generate_title() { +function generate_dynamic_line() { - ncharstitle=78 - titlechar="*" - titletext=$1 + local type=${2} + if [ "$type" = "title" ]; then + ncharstitle=78 + titlechar="*" + elif [ "$type" = "separator" ]; then + ncharstitle=58 + titlechar="-" + fi + + titletext=${1} titlelength=${#titletext} finaltitle="" @@ -1753,7 +1776,12 @@ function generate_title() { finaltitle="$finaltitle$titlechar" done - finaltitle="$finaltitle $titletext " + if [ "$type" = "title" ]; then + finaltitle="$finaltitle $titletext " + + elif [ "$type" = "separator" ]; then + finaltitle="$finaltitle ($titletext) " + fi for ((i=0; i < ($ncharstitle/2 - $titlelength+($titlelength/2)); i++)); do finaltitle="$finaltitle$titlechar" @@ -1763,26 +1791,12 @@ function generate_title() { finaltitle+="$titlechar" fi - case "$2" in - "yellow") - echo_yellow "$finaltitle" - ;; - "red") - echo_red "$finaltitle" - ;; - "blue") - echo_blue "$finaltitle" - ;; - "green") - echo_green "$finaltitle" - ;; - "pink") - echo_pink "$finaltitle" - ;; - *) - last_echo "$finaltitle" - ;; - esac + if [ "$type" = "title" ]; then + echo_red "$finaltitle" + + elif [ "$type" = "separator" ]; then + echo_blue "$finaltitle" + fi } function check_to_set_managed() { @@ -1946,7 +1960,7 @@ function check_interface_mode() { function language_menu() { clear - language_strings ${language} 87 "titlered" + language_strings ${language} 87 "title" current_menu="language_menu" initialize_menu_and_print_selections echo @@ -2061,7 +2075,7 @@ function set_chipset() { function select_interface() { clear - language_strings ${language} 88 "titlered" + language_strings ${language} 88 "title" current_menu="select_interface_menu" language_strings ${language} 24 "green" print_simple_separator @@ -2181,7 +2195,7 @@ function ask_essid() { function exec_mdk3deauth() { echo - language_strings ${language} 89 "titlered" + language_strings ${language} 89 "title" language_strings ${language} 32 "green" tmpfiles_toclean=1 @@ -2191,13 +2205,13 @@ function exec_mdk3deauth() { echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "mdk3 amok attack" -e mdk3 ${interface} d -b ${tmpdir}"bl.txt" -c ${channel} + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "mdk3 amok attack" -e mdk3 ${interface} d -b ${tmpdir}"bl.txt" -c ${channel} } function exec_aireplaydeauth() { echo - language_strings ${language} 90 "titlered" + language_strings ${language} 90 "title" language_strings ${language} 32 "green" ${airmon} start ${interface} ${channel} > /dev/null 2>&1 @@ -2205,61 +2219,61 @@ function exec_aireplaydeauth() { echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "aireplay deauth attack" -e aireplay-ng --deauth 0 -a ${bssid} --ignore-negative-one ${interface} + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "aireplay deauth attack" -e aireplay-ng --deauth 0 -a ${bssid} --ignore-negative-one ${interface} } function exec_wdsconfusion() { echo - language_strings ${language} 91 "titlered" + language_strings ${language} 91 "title" language_strings ${language} 32 "green" echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "wids / wips / wds confusion attack" -e mdk3 ${interface} w -e ${essid} -c ${channel} + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "wids / wips / wds confusion attack" -e mdk3 ${interface} w -e ${essid} -c ${channel} } function exec_beaconflood() { echo - language_strings ${language} 92 "titlered" + language_strings ${language} 92 "title" language_strings ${language} 32 "green" echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "beacon flood attack" -e mdk3 ${interface} b -n ${essid} -c ${channel} -s 1000 -h + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "beacon flood attack" -e mdk3 ${interface} b -n ${essid} -c ${channel} -s 1000 -h } function exec_authdos() { echo - language_strings ${language} 93 "titlered" + language_strings ${language} 93 "title" language_strings ${language} 32 "green" echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "auth dos attack" -e mdk3 ${interface} a -a ${bssid} -m -s 1024 + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "auth dos attack" -e mdk3 ${interface} a -a ${bssid} -m -s 1024 } function exec_michaelshutdown() { echo - language_strings ${language} 94 "titlered" + language_strings ${language} 94 "title" language_strings ${language} 32 "green" echo language_strings ${language} 33 "blue" language_strings ${language} 4 "read" - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "michael shutdown attack" -e mdk3 ${interface} m -t ${bssid} -w 1 -n 1024 -s 1024 + xterm +j -sb -rightbar -geometry ${g1_topleft_window} -T "michael shutdown attack" -e mdk3 ${interface} m -t ${bssid} -w 1 -n 1024 -s 1024 } function mdk3_deauth_option() { echo - language_strings ${language} 95 "titlered" + language_strings ${language} 95 "title" language_strings ${language} 35 "green" check_monitor_enabled @@ -2278,7 +2292,7 @@ function mdk3_deauth_option() { function aireplay_deauth_option() { echo - language_strings ${language} 96 "titlered" + language_strings ${language} 96 "title" language_strings ${language} 36 "green" check_monitor_enabled @@ -2297,7 +2311,7 @@ function aireplay_deauth_option() { function wds_confusion_option() { echo - language_strings ${language} 97 "titlered" + language_strings ${language} 97 "title" language_strings ${language} 37 "green" check_monitor_enabled @@ -2316,7 +2330,7 @@ function wds_confusion_option() { function beacon_flood_option() { echo - language_strings ${language} 98 "titlered" + language_strings ${language} 98 "title" language_strings ${language} 38 "green" check_monitor_enabled @@ -2335,7 +2349,7 @@ function beacon_flood_option() { function auth_dos_option() { echo - language_strings ${language} 99 "titlered" + language_strings ${language} 99 "title" language_strings ${language} 39 "green" check_monitor_enabled @@ -2353,7 +2367,7 @@ function auth_dos_option() { function michael_shutdown_option() { echo - language_strings ${language} 100 "titlered" + language_strings ${language} 100 "title" language_strings ${language} 40 "green" check_monitor_enabled @@ -2555,7 +2569,7 @@ function print_hint() { function main_menu() { clear - language_strings ${language} 101 "titlered" + language_strings ${language} 101 "title" current_menu="main_menu" initialize_menu_and_print_selections echo @@ -2614,15 +2628,15 @@ function main_menu() { function decrypt_menu() { clear - language_strings ${language} 170 "titlered" + language_strings ${language} 170 "title" current_menu="decrypt_menu" initialize_menu_and_print_selections echo language_strings ${language} 47 "green" - language_strings ${language} 176 "blue" + language_strings ${language} 176 "separator" language_strings ${language} 172 language_strings ${language} 175 aircrack_attacks_dependencies[@] - language_strings ${language} 229 "blue" + language_strings ${language} 229 "separator" language_strings ${language} 230 hashcat_attacks_dependencies[@] language_strings ${language} 231 hashcat_attacks_dependencies[@] language_strings ${language} 232 hashcat_attacks_dependencies[@] @@ -3027,7 +3041,7 @@ function set_minlength_and_maxlength() { function set_charset() { clear - language_strings ${language} 238 "titlered" + language_strings ${language} 238 "title" language_strings ${language} 196 "green" print_simple_separator language_strings ${language} 197 @@ -3181,7 +3195,7 @@ function convert_cap_to_hashcat_format() { function handshake_tools_menu() { clear - language_strings ${language} 120 "titlered" + language_strings ${language} 120 "title" current_menu="handshake_tools_menu" initialize_menu_and_print_selections echo @@ -3191,7 +3205,7 @@ function handshake_tools_menu() { language_strings ${language} 55 language_strings ${language} 56 language_strings ${language} 49 - language_strings ${language} 124 "blue" + language_strings ${language} 124 "separator" language_strings ${language} 121 print_simple_separator language_strings ${language} 122 clean_handshake_dependencies[@] @@ -3279,7 +3293,7 @@ function clean_handshake_file_option() { function dos_attacks_menu() { clear - language_strings ${language} 102 "titlered" + language_strings ${language} 102 "title" current_menu="dos_attacks_menu" initialize_menu_and_print_selections echo @@ -3289,11 +3303,11 @@ function dos_attacks_menu() { language_strings ${language} 55 language_strings ${language} 56 language_strings ${language} 49 - language_strings ${language} 50 "blue" + language_strings ${language} 50 "separator" language_strings ${language} 51 mdk3_attack_dependencies[@] language_strings ${language} 52 aireplay_attack_dependencies[@] language_strings ${language} 53 mdk3_attack_dependencies[@] - language_strings ${language} 54 "blue" + language_strings ${language} 54 "separator" language_strings ${language} 62 mdk3_attack_dependencies[@] language_strings ${language} 63 mdk3_attack_dependencies[@] language_strings ${language} 64 mdk3_attack_dependencies[@] @@ -3548,7 +3562,7 @@ function attack_handshake_menu() { fi clear - language_strings ${language} 138 "titlered" + language_strings ${language} 138 "title" current_menu="attack_handshake_menu" initialize_menu_and_print_selections echo @@ -3572,7 +3586,7 @@ function attack_handshake_menu() { capture_handshake_window rm -rf ${tmpdir}"bl.txt" > /dev/null 2>&1 echo ${bssid} > ${tmpdir}"bl.txt" - xterm +j -sb -rightbar -geometry 119x20+60+350 -T "mdk3 amok attack" -e mdk3 ${interface} d -b ${tmpdir}"bl.txt" -c ${channel} & + xterm +j -sb -rightbar -geometry ${g1_bottomleft_window} -T "mdk3 amok attack" -e mdk3 ${interface} d -b ${tmpdir}"bl.txt" -c ${channel} & sleeptimeattack=12 fi ;; @@ -3584,7 +3598,7 @@ function attack_handshake_menu() { else capture_handshake_window ${airmon} start ${interface} ${channel} > /dev/null 2>&1 - xterm +j -sb -rightbar -geometry 119x20+60+350 -T "aireplay deauth attack" -e aireplay-ng --deauth 0 -a ${bssid} --ignore-negative-one ${interface} & + xterm +j -sb -rightbar -geometry ${g1_bottomleft_window} -T "aireplay deauth attack" -e aireplay-ng --deauth 0 -a ${bssid} --ignore-negative-one ${interface} & sleeptimeattack=12 fi ;; @@ -3595,7 +3609,7 @@ function attack_handshake_menu() { attack_handshake_menu "new" else capture_handshake_window - xterm +j -sb -rightbar -geometry 119x20+60+350 -T "wids / wips / wds confusion attack" -e mdk3 ${interface} w -e ${essid} -c ${channel} & + xterm +j -sb -rightbar -geometry ${g1_bottomleft_window} -T "wids / wips / wds confusion attack" -e mdk3 ${interface} w -e ${essid} -c ${channel} & sleeptimeattack=16 fi ;; @@ -3622,14 +3636,14 @@ function capture_handshake_window() { language_strings ${language} 115 "read" rm -rf ${tmpdir}"handshake"* > /dev/null 2>&1 - xterm +j -sb -rightbar -geometry 119x20+1000+10 -T "Capturing Handshake" -e airodump-ng -c ${channel} -d ${bssid} -w ${tmpdir}"handshake" ${interface} & + xterm +j -sb -rightbar -geometry ${g1_topright_window} -T "Capturing Handshake" -e airodump-ng -c ${channel} -d ${bssid} -w ${tmpdir}"handshake" ${interface} & processidcapture=$! } function explore_for_targets_option() { echo - language_strings ${language} 103 "titlered" + language_strings ${language} 103 "title" language_strings ${language} 65 "green" check_monitor_enabled @@ -3646,7 +3660,7 @@ function explore_for_targets_option() { tmpfiles_toclean=1 rm -rf ${tmpdir}"nws"* > /dev/null 2>&1 rm -rf ${tmpdir}"clts.csv" > /dev/null 2>&1 - xterm +j -sb -rightbar -geometry 119x35+350+350 -T "Exploring for targets" -e airodump-ng -w ${tmpdir}"nws" ${interface} + xterm +j -sb -rightbar -geometry ${g1_topright_window} -T "Exploring for targets" -e airodump-ng -w ${tmpdir}"nws" ${interface} targetline=`cat ${tmpdir}"nws-01.csv" | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}'` targetline=`expr ${targetline} - 1` @@ -3701,7 +3715,7 @@ function explore_for_targets_option() { function select_target() { clear - language_strings ${language} 104 "titlered" + language_strings ${language} 104 "title" language_strings ${language} 69 "green" print_large_separator i=0 @@ -3787,7 +3801,7 @@ function select_target() { function credits_option() { clear - language_strings ${language} 105 "titlered" + language_strings ${language} 105 "title" language_strings ${language} 74 "pink" echo language_strings ${language} 73 "blue" @@ -3872,7 +3886,7 @@ function exit_script_option() { action_on_exit_taken=0 echo - language_strings ${language} 106 "titlered" + language_strings ${language} 106 "title" language_strings ${language} 11 "blue" echo @@ -4262,6 +4276,237 @@ function initialize_script_settings() { autochanged_language=0 } +function detect_screen_resolution() { + + resolution_detected=0 + if hash xdpyinfo 2> /dev/null; then + resolution=$(xdpyinfo | grep -A 3 "screen #0" | grep "dimensions" | tr -s " " | cut -d " " -f 3 | grep "x") + + if [ "$?" = "0" ]; then + resolution_detected=1 + fi + fi + + if [ ${resolution_detected} -eq 0 ]; then + resolution=${standard_resolution} + fi + + [[ ${resolution} =~ ^([0-9]{3,4})x(([0-9]{3,4}))$ ]] && resolution_x="${BASH_REMATCH[1]}" && resolution_y="${BASH_REMATCH[2]}" +} + +function set_windows_sizes() { + + # 1) 1024x768 + # 2) 1280x768 + # 3) 1280x1024 + # 4) 1366x768 + # 5) 1366x1024 + # 6) 1440x900 + # 7) 1600x1200 + # 8) 1920x1080 + + case ${resolution_x} in + [0-9]|[0-9][0-9]|[0-9][0-9][0-9]|10[0-1][0-9]|102[0-4]) + #Until 1024 | 1) + set_windows_sizes_standard + ;; + 102[5-9]|10[3-9][0-9]|11[0-9][0-9]|12[0-7][0-9]) + #From 1025 until 1279 | 1) + set_windows_sizes_standard + ;; + 128[0-9]|129[0-9]|13[0-5][0-9]|136[0-5]) + #From 1280 until 1365 | 2-3) + case ${resolution_y} in + [0-9]|[0-9][0-9]|[0-6][0-9][0-9]|7[0-5][0-9]|76[0-8]) + #Until 768 | 2) + set_windows_sizes_1280x768 + ;; + 769|7[7-9][0-9]|[8-9][0-9][0-9]|10[0-1][0-9]|102[0-4]) + #From 769 until 1024 | 2) + set_windows_sizes_1280x768 + ;; + *) + #From 1025 and so on | 3) + set_windows_sizes_1280x1024 + ;; + esac + ;; + 136[6-9]|13[7-9][0-9]|14[0-3][0-9]) + #From 1366 until 1439 | 4-5) + case ${resolution_y} in + [0-9]|[0-9][0-9]|[0-6][0-9][0-9]|7[0-5][0-9]|76[0-8]) + #Until 768 | 4) + set_windows_sizes_1366x768 + ;; + 769|7[7-9][0-9]|[8-9][0-9][0-9]|10[0-1][0-9]|102[0-4]) + #From 769 until 1024 | 4) + set_windows_sizes_1366x768 + ;; + *) + #From 1025 and so on | 5) + set_windows_sizes_1366x1024 + ;; + esac + ;; + 14[4-9][0-9]|15[0-9][0-9]) + #From 1440 until 1599 | 6) + set_windows_sizes_1440x900 + ;; + 1[6-8][0-9][0-9]|19[0-1][0-9]) + #From 1600 until 1919 | 7) + set_windows_sizes_1600x1200 + ;; + 19[2-9][0-9]|[2-9][0-9][0-9][0-9]) + #From 1920 and so on | 8) + set_windows_sizes_1920x1080 + ;; + *) + set_windows_sizes_standard + ;; + esac +} + +function set_windows_sizes_standard() { + + set_windows_sizes_1204x768 +} + +function set_windows_sizes_1204x768() { + + g1_topleft_window="78x25+0+0" + g1_bottomleft_window="78x25+0-0" + g1_topright_window="78x25-0+0" + g1_bottomright_window="78x25-0-0" + + g2_stdleft_window="76x50+0+0" + g2_stdright_window="76x50-0+0" + + g3_topleft_window="78x16+0+0" + g3_middleleft_window="78x16+0+276" + g3_bottomleft_window="78x16+0-0" + g3_topright_window="78x25-0+0" + g3_bottomright_window="78x25-0-0" +} + +function set_windows_sizes_1280x768() { + + g1_topleft_window="96x25+0+0" + g1_bottomleft_window="96x25+0-0" + g1_topright_window="96x25-0+0" + g1_bottomright_window="96x25-0-0" + + g2_stdleft_window="96x50+0+0" + g2_stdright_window="96x50-0+0" + + g3_topleft_window="96x16+0+0" + g3_middleleft_window="96x16+0+276" + g3_bottomleft_window="96x16+0-0" + g3_topright_window="96x25-0+0" + g3_bottomright_window="96x25-0-0" +} + +function set_windows_sizes_1280x1024() { + + g1_topleft_window="96x35+0+0" + g1_bottomleft_window="96x35+0-0" + g1_topright_window="96x35-0+0" + g1_bottomright_window="96x35-0-0" + + g2_stdleft_window="96x66+0+0" + g2_stdright_window="96x66-0+0" + + g3_topleft_window="96x22+0+0" + g3_middleleft_window="96x22+0+360" + g3_bottomleft_window="96x22+0-0" + g3_topright_window="96x35-0+0" + g3_bottomright_window="96x35-0-0" +} + +function set_windows_sizes_1366x768() { + + g1_topleft_window="104x25+0+0" + g1_bottomleft_window="104x25+0-0" + g1_topright_window="104x25-0+0" + g1_bottomright_window="104x25-0-0" + + g2_stdleft_window="104x50+0+0" + g2_stdright_window="104x50-0+0" + + g3_topleft_window="104x16+0+0" + g3_middleleft_window="104x16+0+276" + g3_bottomleft_window="104x16+0-0" + g3_topright_window="104x25-0+0" + g3_bottomright_window="104x25-0-0" +} + +function set_windows_sizes_1366x1024() { + + g1_topleft_window="104x35+0+0" + g1_bottomleft_window="104x35+0-0" + g1_topright_window="104x35-0+0" + g1_bottomright_window="104x35-0-0" + + g2_stdleft_window="104x66+0+0" + g2_stdright_window="104x66-0+0" + + g3_topleft_window="104x22+0+0" + g3_middleleft_window="104x22+0+360" + g3_bottomleft_window="104x22+0-0" + g3_topright_window="104x35-0+0" + g3_bottomright_window="104x35-0-0" +} + +function set_windows_sizes_1440x900() { + + g1_topleft_window="108x30+0+0" + g1_bottomleft_window="108x30+0-0" + g1_topright_window="108x30-0+0" + g1_bottomright_window="108x30-0-0" + + g2_stdleft_window="108x60+0+0" + g2_stdright_window="108x60-0+0" + + g3_topleft_window="108x19+0+0" + g3_middleleft_window="108x19+0+322" + g3_bottomleft_window="108x19+0-0" + g3_topright_window="108x30-0+0" + g3_bottomright_window="108x30-0-0" +} + +function set_windows_sizes_1600x1200() { + + g1_topleft_window="120x40+0+0" + g1_bottomleft_window="120x40+0-0" + g1_topright_window="120x40-0+0" + g1_bottomright_window="120x40-0-0" + + g2_stdleft_window="120x70+0+0" + g2_stdright_window="120x70-0+0" + + g3_topleft_window="120x26+0+0" + g3_middleleft_window="120x26+0+422" + g3_bottomleft_window="120x26+0-0" + g3_topright_window="120x40-0+0" + g3_bottomright_window="120x40-0-0" +} + +function set_windows_sizes_1920x1080() { + + g1_topleft_window="144x37+0+0" + g1_bottomleft_window="144x37+0-0" + g1_topright_window="144x37-0+0" + g1_bottomright_window="144x37-0-0" + + g2_stdleft_window="144x70+0+0" + g2_stdright_window="144x70-0+0" + + g3_topleft_window="144x24+0+0" + g3_middleleft_window="144x24+0+380" + g3_bottomleft_window="144x24+0-0" + g3_topright_window="144x37-0+0" + g3_bottomright_window="144x37-0-0" +} + function welcome() { clear @@ -4272,14 +4517,17 @@ function welcome() { autodetect_language fi + detect_screen_resolution + set_windows_sizes + if [ ${debug_mode} -eq 0 ]; then - language_strings ${language} 86 "titlered" + language_strings ${language} 86 "title" language_strings ${language} 6 "blue" echo print_intro clear - language_strings ${language} 86 "titlered" + language_strings ${language} 86 "title" language_strings ${language} 7 "pink" language_strings ${language} 114 "pink" @@ -4290,6 +4538,13 @@ function welcome() { check_bash_version + echo + if [ ${resolution_detected} -eq 1 ]; then + language_strings ${language} 294 "blue" + else + language_strings ${language} 295 "blue" + fi + echo language_strings ${language} 8 "blue" print_known_distros @@ -4421,6 +4676,9 @@ function check_pending_of_translation() { elif [[ "$1" =~ ^(\*+)[[:space:]]$escaped_pending_of_translation[[:space:]]([^\*]+)(\*+)$ ]]; then text=${2}"${BASH_REMATCH[1]}"${cyan_color}" $pending_of_translation "${2}"${BASH_REMATCH[2]}${BASH_REMATCH[3]}" return 1 + elif [[ "$1" =~ ^(\-+)[[:space:]]\($escaped_pending_of_translation[[:space:]]([^\-]+)(\-+)$ ]]; then + text=${2}"${BASH_REMATCH[1]} ("${cyan_color}"$pending_of_translation "${2}"${BASH_REMATCH[2]}${BASH_REMATCH[3]}" + return 1 fi return 0 diff --git a/airgeddon_translations.ods b/airgeddon_translations.ods deleted file mode 100644 index 64b2a6d37..000000000 Binary files a/airgeddon_translations.ods and /dev/null differ diff --git a/changelog.txt b/changelog.txt index f8faf01cf..ff352ad78 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,12 @@ +3.44 +Screen resolution detection for optimal windows viewing +Some language strings changed +Deleted ods translations file. It was impractical + +3.43 +Function created to generate dynamic separators on menus +Some language strings changed + 3.42 Compatibility extended to Arch Linux Compatibility extended to Raspbian Linux for Raspberry Pi