From b826c825af38c64ff21bb606c36b60654a6dbdc5 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Thu, 2 Feb 2017 18:39:24 +0200 Subject: [PATCH 01/41] Changed shebang, added extra debugging option, corrected previous Greek translation --- airgeddon.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 51153f68e..3244b7b8f 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1,4 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash + +#Uncomment the command below to print traces of each command plus its arguments +#set -o xtrace airgeddon_version="6.0" @@ -3861,7 +3864,7 @@ function language_strings() { arr["CATALAN",416]=" Pots executar BeEF, però és recomanable executar la segona opció del menú abans" arr["PORTUGUESE",416]=" Você pode executar BeEF, mas é recomendado executar a segunda opção de menu antes" arr["RUSSIAN",416]=" Вы можете запустить BeEF, но лучше, если вы сначала запустите вторую опцию" - arr["GREEK",416]=" Μπορείτε να εκτελέσετε το BeEF, αλλά είναι καλύτερα να διαλέξετε τη δεύτερη επιλογή από πριν" + arr["GREEK",416]=" Μπορείτε να εκτελέσετε το BeEF, αλλά είναι καλύτερα να διαλέξετε τη δεύτερη επιλογή από πρίν" case "${3}" in "yellow") From b8b47400aac77e4774e0b4dc12c2a8f88efe160d Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 3 Feb 2017 01:22:28 +0200 Subject: [PATCH 02/41] Added debug_mode=2 for extra verbosity --- airgeddon.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 3244b7b8f..ae303596b 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1,12 +1,8 @@ #!/usr/bin/env bash -#Uncomment the command below to print traces of each command plus its arguments -#set -o xtrace - -airgeddon_version="6.0" - -#Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 +#Enabled with extra-verbose mode 2 / Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 debug_mode=0 +if [ ${debug_mode} -eq 2 ]; then set -o xtrace; fi #Enabled 1 / Disabled 0 - Auto update feature (it has no effect on debug mode) - Default value 1 auto_update=1 @@ -102,6 +98,7 @@ declare -A possible_alias_names=( ) #General vars +airgeddon_version="6.0" standardhandshake_filename="handshake-01.cap" tmpdir="/tmp/" osversionfile_dir="/etc/" From cb7bb9f982c93bbbf3bc3057676f7a0b7485a9be Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 3 Feb 2017 01:23:35 +0200 Subject: [PATCH 03/41] Added header under shebang --- airgeddon.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/airgeddon.sh b/airgeddon.sh index ae303596b..1d03a3abf 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +#Title........: airgeddon.sh +#Description..: This is a multi-use bash script for Linux systems to audit wireless networks. +#Author.......: v1s1t0r +#Date.........: 20160203 +#Version......: 6.0 +#Usage........: bash airgeddon.sh +#Bash Version.: 4.2 or later #Enabled with extra-verbose mode 2 / Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 debug_mode=0 From 1b0ef88466efc7141f382982ef5c8257b335b1b3 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 5 Feb 2017 11:42:05 +0100 Subject: [PATCH 04/41] Changes on Readme. Updated version to 6.01 --- CHANGELOG.md | 5 +++++ README.md | 8 ++++---- airgeddon.sh | 8 +++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4885bf84..74d974628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +###6.01 + - Shebang changed to more portable #!/usr/bin/env bash + - New extra-verbose debug mode added + - README.md small modifications + ###6.0 - New system for possible tool aliases checking the requirements - Evil Twin attack added: Bettercap-Sslstrip2 and BeEF browser exploitation framework diff --git a/README.md b/README.md index 13e198621..921b49e8f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Tested on these compatible Linux distros:
*-Wifislax 4.11.1, 4.12 and 64-1.0*
*-Backbox 4.5.1 and 4.6*
*-Parrot 2.2.1 to 3.4.1 and arm versions (Raspberry Pi)*
-*-BlackArch 2016.01.10 to 2016.12.29*
+*-BlackArch 2016.01.10 to 2017.01.28*
*-Cyborg Hawk 1.1*
*-Debian 7 (Wheezy) and 8 (Jessie)*
*-Ubuntu/Xubuntu 15.10, 16.04 and 16.04.1*
@@ -56,7 +56,7 @@ Tested on these compatible Linux distros:
airgeddon is already included in some Linux distros and repositories: - Wifislax 4.12, 64-1.0 or higher. - - BlackArch first 2017 release or later. + - BlackArch 2017.01.28 or later. - ArchStrike repository. We will enumerate the categories and tools. The command can be included in different packages depending of the distro. @@ -83,7 +83,7 @@ We will enumerate the categories and tools. The command can be included in diffe | lighttpd | lighttpd | // | reaver | reaver | | iptables | iptables | // | bully | bully | | bettercap | bettercap | // | pixiewps | pixiewps | -| beef | beef / beef-xss | // | unbuffer | expect / expect-dev | +| beef | beef-xss / beef-project | // | unbuffer | expect / expect-dev | **Important tips about BeEF** - The beef software you must install is BeEF (Browser Exploitation Framework). Be careful, don't confuse with beef (Flexible Brainfuck interpreter). This package has on some distros the same name, same executable file name and can lead into confusion. Anyway, airgeddon is able to detect this and show you a warning if needed. Here is a link to the right BeEF installation's page: [BeEF Installation](https://github.com/beefproject/beef/wiki/Installation). @@ -149,7 +149,7 @@ You can join the project: You can take the strings to translate from the code. All the stuff to translate is in "language_strings" function. Ask by mail if you have any doubt. You'll be informed about you how to proceed, you can be added as a collaborator on the project. *For collaborating developers:*
-Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1
+Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1 or to 2 for extra-verbosity
Please, respect the tab indentation, code style and the UTF-8 files format only using at the end of the lines LF (not CRLF).
Direct push on master is not allowed, and pull requests require revision and approvement.
airgeddon code is 100% clean of warnings. Use [Shellcheck](https://github.com/koalaman/shellcheck) to search for errors and warnings on code. <- Thanks xtonousou for the tip :wink: diff --git a/airgeddon.sh b/airgeddon.sh index 1d03a3abf..05d32ae4e 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3,13 +3,15 @@ #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r #Date.........: 20160203 -#Version......: 6.0 +#Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later #Enabled with extra-verbose mode 2 / Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 debug_mode=0 -if [ ${debug_mode} -eq 2 ]; then set -o xtrace; fi +if [ ${debug_mode} -eq 2 ]; then + set -o xtrace +fi #Enabled 1 / Disabled 0 - Auto update feature (it has no effect on debug mode) - Default value 1 auto_update=1 @@ -105,7 +107,7 @@ declare -A possible_alias_names=( ) #General vars -airgeddon_version="6.0" +airgeddon_version="6.01" standardhandshake_filename="handshake-01.cap" tmpdir="/tmp/" osversionfile_dir="/etc/" From 605260578b0efc2b51c55d5a6fafc5594ed5988f Mon Sep 17 00:00:00 2001 From: kcdtv Date: Mon, 6 Feb 2017 13:06:16 +0100 Subject: [PATCH 05/41] Update airgeddon.sh French translation --- airgeddon.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 05d32ae4e..8d1556b22 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2066,7 +2066,7 @@ function language_strings() { arr["ENGLISH",191]="${blue_color}airgeddon can't find the directory path where you have BeEF installed. ${green_color}Do you want to enter it manually? ${normal_color}[y/n]" arr["SPANISH",191]="${blue_color}airgeddon no ha podido encontrar la ruta del directorio donde tienes instalado BeEF. ${green_color}¿Quieres introducirla manualmente? ${normal_color}[y/n]" - arr["FRENCH",191]="${pending_of_translation} ${blue_color}airgeddon n'a pas pu trouver le chemin vers le répertoire où vous avez installé BeEF. ${green_color}Voulez-vous entrer manuellement? ${normal_color}[y/n]" + arr["FRENCH",191]="${blue_color}airgeddon n'a pas trouvé le dossier qui contient BeEF. ${green_color}Voulez-vous l'indiquer manuellement? ${normal_color}[y/n]" arr["CATALAN",191]="${blue_color}airgeddon no ha pogut trobar la ruta del directori on tens instal·lat BeEF. ${green_color}¿Vols introduir-la manualment? ${normal_color}[y/n]" arr["PORTUGUESE",191]="${blue_color}O airgeddon não conseguiu encontrar o diretório onde você instalou o BeEF. ${green_color}Você quer inseri-lo manualmente? ${normal_color}[y/n]" arr["RUSSIAN",191]="${blue_color}airgeddon не может найти путь к каталогу, где вы установили BeEF. ${green_color}Вы хотите ввести его вручную? ${normal_color}[y/n]" @@ -2538,7 +2538,7 @@ 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["FRENCH",250]="Si vous voyez des erreurs et contresens ou si vous voulez voir les marques ${cyan_color}${pending_of_translation}${pink_color} disparaitre, écrivez à ${mail} pour collaborer avec les traductions" 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]="Se você ver qualquer erro de tradução ou quer que as marcas ${cyan_color}${pending_of_translation}${pink_color} sejam retiradas, escreva para ${mail} para colaborar com as traduções" arr["RUSSIAN",250]="Если вы видите плохой перевод или просто хотите снять пометку ${cyan_color}${pending_of_translation}${pink_color} напишите мне на ${mail} для сотрудничества с переводчиками" @@ -3786,7 +3786,7 @@ function language_strings() { arr["ENGLISH",406]="No BeEF executable was detected in given directory" arr["SPANISH",406]="No se ha detectado un ejecutable de BeEF en el directorio indicado" - arr["FRENCH",406]="BeEF n'est pas présent dans le dossierque vous avez indiqué" + arr["FRENCH",406]="BeEF n'est pas présent dans le dossier que vous avez indiqué" arr["CATALAN",406]="No s'ha detectat un executable de BeEF al directori indicat" arr["PORTUGUESE",406]="O executável do BeEF não foi detectado no diretório especificado" arr["RUSSIAN",406]="Ни один исполняемый файл BeEF не был обнаружен в заданной директории" @@ -3794,7 +3794,7 @@ function language_strings() { arr["ENGLISH",407]="BeEF preparation" arr["SPANISH",407]="Preparación BeEF" - arr["FRENCH",407]="${pending_of_translation} Préparation BeEF" + arr["FRENCH",407]="Mise en place de BeEF" arr["CATALAN",407]="Preparació BeEF" arr["PORTUGUESE",407]="Preparando BeEF" arr["RUSSIAN",407]="Подготовка BeEF" @@ -3818,7 +3818,7 @@ function language_strings() { arr["ENGLISH",410]="2. Try to troubleshoot manually installed BeEF dependency problem" arr["SPANISH",410]="2. Intentar solucionar problema de dependencia BeEF instalado manualmente" - arr["FRENCH",410]="2. Essayez de résoudre le problème BeEF installé manuellement" + arr["FRENCH",410]="2. Essayer de résoudre les problèmes de dépendances avec BeEF installé manuellement" arr["CATALAN",410]="2. Intentar solucionar problema de dependència BeEF instal·lat manualment" arr["PORTUGUESE",410]="2. Tente resolver o problema de dependência do BeEF instalado manualmente" arr["RUSSIAN",410]="2. Попробуйте устранить проблему вручную установив зависимости BeEF" @@ -3858,7 +3858,7 @@ function language_strings() { arr["ENGLISH",415]="${blue_color}airgeddon knows you have BeEF installed and you pass the validation, but it was unable to locate the right directory path where you have BeEF installed. Knowing the location gives some advantages for the execution because its configuration file can be customized instead of generic. ${green_color}Do you want to enter it manually? ${normal_color}[y/n]" arr["SPANISH",415]="${blue_color}airgeddon sabe que tienes BeEF instalado y pasas la validación, pero no ha podido concretar la ruta del directorio exacto donde tienes instalado BeEF. Conocer la localización exacta tiene algunas ventajas a la hora de ejecutarlo ya que la configuración será personalizada en lugar de ser una configuración genérica. ${green_color}¿Quieres introducirla manualmente? ${normal_color}[y/n]" - arr["FRENCH",415]="${pending_of_translation} ${blue_color}airgeddon sait que vous avez installé BeEF et les raisins secs validation, mais n'a pas pu indiquer le chemin exact du répertoire où vous avez installé BeEF. Connaître l'emplacement exact a certains avantages lors de l'exécution depuis la configuration sera personnalisée plutôt qu'une configuration générique. ${green_color}Voulez-vous entrer manuellement? ${normal_color}[y/n]" + arr["FRENCH",415]="${blue_color}Airgeddon a bien détecté que Beff est installé mais il n'est malheuruesement pas possible de trouver le dossier le contenant. En l'état actuel des choses il ne sera pas possible de personaliser les parmétres d'éxécution de BeEF. ${green_color}Voulez-vous saisir l'emplacement du dossier? ${normal_color}[y/n]" arr["CATALAN",415]="${blue_color}airgeddon sap que tens BeEF instal·lat i passes la validació, però no ha pogut concretar la ruta del directori exacte on has instal·lat BeEF. Conèixer la localització exacta té alguns avantatges a l'hora d'executar ja que la configuració serà personalitzada en lloc de ser una configuració genèrica. ${green_color}¿Vols introduir-la manualment? ${normal_color}[y/n]" arr["PORTUGUESE",415]="${blue_color}O airgeddon sabe que você instalou o BeEF e validou a instalacão, mas não pôde encontrar o caminho exato do diretório onde você instalou BeEF. Sabendo a localização exata tem algumas vantagens quando executá-lo a configuração será personalizada em vez de uma configuração genérica. ${green_color}Você quer inseri-lo manualmente? ${normal_color}[y/n]" arr["RUSSIAN",415]="${blue_color}airgeddon знает, что у вас установлен BeEF и вы успешно прошли проверку, но скрипт оказался не в состоянии найти правильный путь к каталогу, где вы установили BeEF. Знание расположения даёт некоторые преимущества при выполнении, поскольку появляется возможность настроить его конфигурационный файл, а не использовать настройки по умолчанию. ${green_color}Вы хотите ввести расположение вручную? ${normal_color}[y/n]" @@ -3866,7 +3866,7 @@ function language_strings() { arr["ENGLISH",416]=" You can run BeEF, but it is better if you run the second option before" arr["SPANISH",416]=" Puedes ejecutar BeEF, pero es recomendable ejecutar la segunda opción antes" - arr["FRENCH",416]="${pending_of_translation} Vous pouvez exécuter BeEF, mais il est recommandé d'exécuter la deuxième option de menu avant" + arr["FRENCH",416]=" Vous pouvez exécuter BeEF mais il est recommandé d'exécuter préalablement la deuxième option" arr["CATALAN",416]=" Pots executar BeEF, però és recomanable executar la segona opció del menú abans" arr["PORTUGUESE",416]=" Você pode executar BeEF, mas é recomendado executar a segunda opção de menu antes" arr["RUSSIAN",416]=" Вы можете запустить BeEF, но лучше, если вы сначала запустите вторую опцию" From 5ebbb1bcc1f79dd25a3491c3bcea0a56b8a1382e Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Wed, 8 Feb 2017 00:08:38 +0100 Subject: [PATCH 06/41] Some minor changes on strings, on readme and changelog --- CHANGELOG.md | 2 +- README.md | 4 ++-- airgeddon.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74d974628..2dbf96f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -262,7 +262,7 @@ ###2.21 - Wifislax 64bits compatibility bug fixed - - Removed version from Readme file + - Removed version from README.md file ###2.2 - Changes to manage Wifislax airmon command in a better way diff --git a/README.md b/README.md index 921b49e8f..9862afc1c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is a multi-use bash script for Linux systems to audit wireless networks.
-Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1 or to 2 for extra-verbosity
+Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1 or to 2 for extra-verbosity.
Please, respect the tab indentation, code style and the UTF-8 files format only using at the end of the lines LF (not CRLF).
Direct push on master is not allowed, and pull requests require revision and approvement.
airgeddon code is 100% clean of warnings. Use [Shellcheck](https://github.com/koalaman/shellcheck) to search for errors and warnings on code. <- Thanks xtonousou for the tip :wink: diff --git a/airgeddon.sh b/airgeddon.sh index 8d1556b22..d4cde6275 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3858,7 +3858,7 @@ function language_strings() { arr["ENGLISH",415]="${blue_color}airgeddon knows you have BeEF installed and you pass the validation, but it was unable to locate the right directory path where you have BeEF installed. Knowing the location gives some advantages for the execution because its configuration file can be customized instead of generic. ${green_color}Do you want to enter it manually? ${normal_color}[y/n]" arr["SPANISH",415]="${blue_color}airgeddon sabe que tienes BeEF instalado y pasas la validación, pero no ha podido concretar la ruta del directorio exacto donde tienes instalado BeEF. Conocer la localización exacta tiene algunas ventajas a la hora de ejecutarlo ya que la configuración será personalizada en lugar de ser una configuración genérica. ${green_color}¿Quieres introducirla manualmente? ${normal_color}[y/n]" - arr["FRENCH",415]="${blue_color}Airgeddon a bien détecté que Beff est installé mais il n'est malheuruesement pas possible de trouver le dossier le contenant. En l'état actuel des choses il ne sera pas possible de personaliser les parmétres d'éxécution de BeEF. ${green_color}Voulez-vous saisir l'emplacement du dossier? ${normal_color}[y/n]" + arr["FRENCH",415]="${blue_color}airgeddon a bien détecté que BeEF est installé mais il n'est malheuruesement pas possible de trouver le dossier le contenant. En l'état actuel des choses il ne sera pas possible de personaliser les parmétres d'éxécution de BeEF. ${green_color}Voulez-vous saisir l'emplacement du dossier? ${normal_color}[y/n]" arr["CATALAN",415]="${blue_color}airgeddon sap que tens BeEF instal·lat i passes la validació, però no ha pogut concretar la ruta del directori exacte on has instal·lat BeEF. Conèixer la localització exacta té alguns avantatges a l'hora d'executar ja que la configuració serà personalitzada en lloc de ser una configuració genèrica. ${green_color}¿Vols introduir-la manualment? ${normal_color}[y/n]" arr["PORTUGUESE",415]="${blue_color}O airgeddon sabe que você instalou o BeEF e validou a instalacão, mas não pôde encontrar o caminho exato do diretório onde você instalou BeEF. Sabendo a localização exata tem algumas vantagens quando executá-lo a configuração será personalizada em vez de uma configuração genérica. ${green_color}Você quer inseri-lo manualmente? ${normal_color}[y/n]" arr["RUSSIAN",415]="${blue_color}airgeddon знает, что у вас установлен BeEF и вы успешно прошли проверку, но скрипт оказался не в состоянии найти правильный путь к каталогу, где вы установили BeEF. Знание расположения даёт некоторые преимущества при выполнении, поскольку появляется возможность настроить его конфигурационный файл, а не использовать настройки по умолчанию. ${green_color}Вы хотите ввести расположение вручную? ${normal_color}[y/n]" @@ -3866,7 +3866,7 @@ function language_strings() { arr["ENGLISH",416]=" You can run BeEF, but it is better if you run the second option before" arr["SPANISH",416]=" Puedes ejecutar BeEF, pero es recomendable ejecutar la segunda opción antes" - arr["FRENCH",416]=" Vous pouvez exécuter BeEF mais il est recommandé d'exécuter préalablement la deuxième option" + arr["FRENCH",416]=" Vous pouvez exécuter BeEF mais il est recommandé d'exécuter préalablement la deuxième option" arr["CATALAN",416]=" Pots executar BeEF, però és recomanable executar la segona opció del menú abans" arr["PORTUGUESE",416]=" Você pode executar BeEF, mas é recomendado executar a segunda opção de menu antes" arr["RUSSIAN",416]=" Вы можете запустить BeEF, но лучше, если вы сначала запустите вторую опцию" From 64f051444be9472d13c81339fd8d34793ccc3676 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 10 Feb 2017 07:35:33 +0200 Subject: [PATCH 07/41] Changed README.md, added CONTRIBUTING.md --- CHANGELOG.md | 3 +- CONTRIBUTING.md | 149 ++++++++++++++++ README.md | 449 +++++++++++++++++++++++++++--------------------- 3 files changed, 401 insertions(+), 200 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dbf96f1b..150706743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ###6.01 - Shebang changed to more portable #!/usr/bin/env bash - New extra-verbose debug mode added - - README.md small modifications + - README.md major modifications + - Added CONTRIBUTING.md ###6.0 - New system for possible tool aliases checking the requirements diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..57094bd67 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,149 @@ +# Contributing + +Hi there! We are thrilled that you would like to contribute to this project. Your help is essential for keeping it great. + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +--- + +## Collaborating Translators + +1. Translate the strings located in `language_strings()` function. +2. Ask by mail [v1s1t0r.1s.h3r3@gmail.com] if you have any doubt. You'll be informed about how to proceed. +3. You can be added as a collaborator on the project. + +## Collaborating Developers + +1. Tweak *"debug_mode"* variable to "1" for faster development skipping intro and initial checks or to "2" for extra verbosity and the skips mentioned before. +2. Respect the **tab indentation**, code style and the **UTF-8** format. +3. Use **LF** (Unix) line break type (not CR or CRLF). +4. Use [Shellcheck] to search for errors and warnings on code. (Thanks [xtonousou] for the tip :wink:) +5. Increase the version numbers in `airgeddon.sh` and in [README] to the new version that the script represents. The versioning scheme we use is *X.YZ*. Where: + - *X* is a major release with a new menu (e.g. WPS menu) + - *Y* is a minor release with a new feature for an existing menu or a new submenu for an existing feature + - *Z* is a minor release with new bug fixes, small modifications or code improvements +6. Update the date on `airgeddon.sh` under shebang, if appropriate. +7. Direct push to [master] is not allowed. Pull Requests require revision and approvement. + +*Be sure to merge the latest from "upstream" before making a pull request!* + +## WPS PIN Database Collaborators + +1. Add PINs ordered by the key in the associative array. (Keys are the first 6 BSSID digits). +2. Update the `known_pins.db` file. +3. Update the `pindb_checksum.txt` file with the calculated checksum of the database file using `md5sum` tool. + +*PINs should be from devices that generate generic ones* + +## Beta Testers + +1. Download the master version or the beta testing version from the development branch called [dev]. Temporary branches may be existing for specific features that can be tested too. +2. Report any issues or bugs by mail [v1s1t0r.1s.h3r3@gmail.com] or submit issues requests [here]. + +--- + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting us at [v1s1t0r.1s.h3r3@gmail.com]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +--- + +## Donate + +If you enjoyed the script, feel free to donate. Invite me to a coffee through Paypal or send me a fraction of a bitcoin: + + + + + +
+ Paypal: v1s1t0r.1s.h3r3@gmail.com
+ Bitcoin: 1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH +
+ +[![paypal][paypal]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) +  +[![bitcoin][bitcoin]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) + + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ +[Shellcheck]: https://github.com/koalaman/shellcheck "shellcheck.hs" +[here]: https://github.com/v1s1t0r1sh3r3/airgeddon/issues/new +[master]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/master +[dev]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/dev +[xtonousou]: https://github.com/xtonousou "xT" +[README]: README.md +[paypal]: /imgs/paypal_donate.png "Show me the money!" +[bitcoin]: /imgs/bitcoin_donate.png "Show me the money!" diff --git a/README.md b/README.md index 9862afc1c..12ded9d0f 100644 --- a/README.md +++ b/README.md @@ -1,202 +1,226 @@ -#airgeddon [![License](https://img.shields.io/badge/License-GPL%20v3%2B-blue.svg?style=flat-square)](LICENSE.md) -This is a multi-use bash script for Linux systems to audit wireless networks.
-![We'll conquer the earth!!][banner] - -#Features -- Interface mode switcher (Monitor-Managed) keeping selection even on interface name changing. -- DoS over wireless networks using different methods. -- Assisted Handshake file capturing. -- Cleaning and optimizing Handshake captured files. -- Offline password decrypting on WPA/WPA2 captured files (dictionary, bruteforce and rule based). -- Evil Twin attacks (Rogue AP): - - Only Rogue/Fake AP version to sniff using external sniffer (Hostapd + DHCP + DoS). - - Simple integrated sniffing (Hostapd + DHCP + DoS + Ettercap). - - Integrated sniffing, sslstrip (Hostapd + DHCP + DoS + Ettercap + Sslstrip). - - Integrated sniffing, sslstrip2 and BeEF browser exploitation framework (Hostapd + DHCP + DoS + Bettercap + BeEF). - - Captive portal with "DNS blackhole" to capture wifi passwords (Hostapd + DHCP + DoS + Dnsspoff + Lighttpd). -- WPS features: - - WPS scanning (wash). Self parameterization to avoid "bad fcs" problem. - - Custom PIN association (bully and reaver). - - Pixie Dust attacks (bully and reaver). - - Bruteforce PIN attacks (bully and reaver). - - Parameterizable timeouts. - - Known WPS PINs attack (bully and reaver), based on online PIN database with auto-update. - - Integration of the most common PIN generation algorithms. -- Compatibility with many Linux distros (see requirements section). -- Easy targeting and selection in every section. -- Drag and drop files on console window for entering file paths. -- Dynamic screen resolution detection and windows auto-sizing for optimal 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. -- Auto-update. Script checks for newer version if possible. - -#Requirements -Bash version 4.2 or later needed. - -Compatibility with any Linux which have installed the tools what script needs. The script checks for them at the beginning. - -Tested on these compatible Linux distros:
-*-Kali 2.0, 2016.1, 2016.2 and arm versions (Raspberry Pi)*
-*-Wifislax 4.11.1, 4.12 and 64-1.0*
-*-Backbox 4.5.1 and 4.6*
-*-Parrot 2.2.1 to 3.4.1 and arm versions (Raspberry Pi)*
-*-BlackArch 2016.01.10 to 2017.01.28*
-*-Cyborg Hawk 1.1*
-*-Debian 7 (Wheezy) and 8 (Jessie)*
-*-Ubuntu/Xubuntu 15.10, 16.04 and 16.04.1*
-*-OpenSUSE Leap 42.1 and 42.2*
-*-CentOS 6 and 7*
-*-Gentoo 20160514 and 20160704*
-*-Fedora 24*
-*-Red Hat 7 (Maipo)*
-*-Arch 4.6.2-1 to 4.8.13-1*
-*-Raspbian 7 (Wheezy) and 8 (Jessie) (Raspberry Pi)*
-*-OpenMandriva LX3*
- -airgeddon is already included in some Linux distros and repositories: - - Wifislax 4.12, 64-1.0 or higher. - - BlackArch 2017.01.28 or later. - - ArchStrike repository. - -We will enumerate the categories and tools. The command can be included in different packages depending of the distro. - -**Essential tools**: <- *the script doesn't work if you don't have installed all of them* - -| Command | Possible package name | // | Command | Possible package name | -| --- | --- | --- | --- | --- | -| ifconfig | net-tools | // | iwconfig | wireless-tools | -| iw | iw | // | awk | awk / gawk | -| airmon-ng | aircrack-ng | // | airodump-ng | aircrack-ng | -| aircrack-ng | aircrack-ng | // | xterm | xterm | - -**Optional tools**: <- *not necessary to work, only needed for some features* - -| Command | Possible package name | // | Command | Possible package name | -| --- | --- | --- | --- | --- | -| wpaclean | aircrack-ng | // | ettercap | ettercap / ettercap-text-only / ettercap-graphical | -| crunch | crunch | // | etterlog | ettercap / ettercap-text-only / ettercap-graphical | -| aireplay-ng | aircrack-ng | // | sslstrip | sslstrip | -| mdk3 | mdk3 | // | dhcpd | isc-dhcp-server / dhcp-server / dhcp | -| hashcat | hashcat | // | dnsspoof | dsniff | -| hostapd | hostapd | // | wash | reaver | -| lighttpd | lighttpd | // | reaver | reaver | -| iptables | iptables | // | bully | bully | -| bettercap | bettercap | // | pixiewps | pixiewps | -| beef | beef-xss / beef-project | // | unbuffer | expect / expect-dev | - -**Important tips about BeEF** - - The beef software you must install is BeEF (Browser Exploitation Framework). Be careful, don't confuse with beef (Flexible Brainfuck interpreter). This package has on some distros the same name, same executable file name and can lead into confusion. Anyway, airgeddon is able to detect this and show you a warning if needed. Here is a link to the right BeEF installation's page: [BeEF Installation](https://github.com/beefproject/beef/wiki/Installation). - - If you use a distro which already comes with BeEF installed like Kali, BlackArch or Wifislax, you will have no problems. If you install BeEF manually, airgeddon is able to manage the integration asking you for the path where it's installed, even modifying its own code in order to make updates-proof persistent changes. - -**Update tools**: <- *not necessary to work, only used for auto-update* - -| Command | Possible package name | -| --- | --- | -| curl | curl | - -**Internal tools**: <- *these are internally checked. Not necessary to work, good to have* - -| Command | Possible package name | -| --- | --- | -| xdpyinfo | x11-utils / xdpyinfo / xorg-xdpyinfo | -| ethtool | ethtool | -| lspci | pciutils | -| rfkill | rfkill | -Is highly recommended to have the internal tools installed. They improve functionality and performance. For example, xdpyinfo allow the script to detect the desktop resolution in order to print windows in a better way (size and position). - -Of course, the script also uses many standard basic commands that are understood to come with any Linux distro, so they are not checked (cp, rm, grep, pgrep, egrep, md5sum, uname, echo, hash, cat, sed, etc.). - -#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 :smile:
-*-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 again :sweat_smile:
-*-Wireless tools* <- iwconfig doesn't exists for these systems, they use ifconfig instead and it generates very different outputs - -#Disclaimer & License -This script must be used only for educational purposes and pentesting.
-Use it only on your own networks or with the network's owner appropriate permission during a penstest.
-airgeddon staff is not responsible of its use in any case.
-This script is under GPLv3 (or later) [License](LICENSE.md). - -#Use -Must be launched only using bash (not sh). Example `bash /path/to/airgeddon.sh`
-If you launch the script using sh and a *"Syntax error"* appears, launch it with **bash instead of sh**. Even with no initial error, maybe you'll have it later. Use bash always! - -#Supported Languages -![English][english] English
-![Spanish][spanish] Spanish
-![French][french] French
-![Catalan][catalan] Catalan
-![Portuguese][portuguese] Portuguese
-![Russian][russian] Russian
-![Greek][greek] Greek - -#Project Collaboration -You can join the project: - - - Translations to other languages are welcome. - - More distros support compatibility. - - New features. - - More WPS pins for the database. - - Testing and feedback is needed too. - -*For collaborating translators:*
-You can take the strings to translate from the code. All the stuff to translate is in "language_strings" function. Ask by mail if you have any doubt. You'll be informed about you how to proceed, you can be added as a collaborator on the project. - -*For collaborating developers:*
-Debug mode was implemented for faster development skipping intro and initial checks. Use it setting var *"debug_mode"* to 1 or to 2 for extra-verbosity.
-Please, respect the tab indentation, code style and the UTF-8 files format only using at the end of the lines LF (not CRLF).
-Direct push on master is not allowed, and pull requests require revision and approvement.
-airgeddon code is 100% clean of warnings. Use [Shellcheck](https://github.com/koalaman/shellcheck) to search for errors and warnings on code. <- Thanks xtonousou for the tip :wink: - -*For beta testers:*
-You can download the master version or the beta testing version from the development branch called `dev`. Sometimes there are other temporary branches for specific features that can be tested too. - -*For WPS PIN database collaborators:*
-The pins must be strictly ordered by key in the array. Keys are the first 6 bssid digits. After updating the "known_pins.db" file, you must update too "pindb_checksum.txt" with the calculated checksum of the database file. This checksum is calculated using md5sum tool. - -#Changelog -See [Changelog](CHANGELOG.md) file to review changes. - -#Credits & Special Thanks -Thank you to: - -**Kcdtv** for French translations, beta testing, suggestions about new features and support received since the beginning.
-**USUARIONUEVO** for helping me to improve the script, suggestions about new features and for the support received.
-**El padrino** and **cLn** for Catalan translations.
-**Luan** for Portuguese translations.
-**MiAl** for Russian translations.
-**xtonousou** for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff. - -Thanks to the "Spanish pentesting crew", the Wifislax staff, the BlackArch community, the Seguridadwireless.net, Wifi-libre.com and Lampiweb.com forum people that helped me.
-Thanks to the Hackware.ru admins. Thanks to all the people who helped me building the online PIN database for WPS. Thank you to Dominique Bongard for bringing to us Pixie Dust attacks. Thanks to Zhao Chunsheng and Stefan Viehböck for their wonderful algorithms.
-I want to thank you too, to all developers who made and designed the third-party tools airgeddon uses. - -Thank you too to other authors who inspired me with their scripts:
-*vk496 -> Linset*
-*MI1 -> Airstorm*
-*MatToufoutu -> Ap-fucker*
-*Coeman76 -> Handshaker*
-*Goyfilms -> Goyscript*
-*Kcdtv -> WPSPin* - -#Donate -If you enjoyed the script, feel free to give a donation. Invite me to a coffee through Paypal or send me a fraction of a bitcoin:
-Paypal: *v1s1t0r.1s.h3r3@gmail.com*
-Bitcoin: *1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH* - -[![paypal][paypal]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) -  -[![bitcoin][bitcoin]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) - -[banner]: /imgs/airgeddon_banner.png "We'll conquer the earth!!" -[paypal]: /imgs/paypal_donate.png "Show me the money!" -[bitcoin]: /imgs/bitcoin_donate.png "Show me the money!" + + + + +# airgeddon + +This is a multi-use bash script for Linux systems to audit wireless networks. + +![banner] + +--- + +### Features + +- Interface mode switcher (Monitor-Managed) keeping selection even on interface name changing +- DoS over wireless networks using different methods +- Assisted Handshake file capturing +- Cleaning and optimizing Handshake captured files +- Offline password decrypting on WPA/WPA2 captured files (dictionary, bruteforce and rule based) +- Evil Twin attacks (Rogue AP) + - Only Rogue/Fake AP version to sniff using external sniffer (Hostapd + DHCP + DoS) + - Simple integrated sniffing (Hostapd + DHCP + DoS + Ettercap) + - Integrated sniffing, sslstrip (Hostapd + DHCP + DoS + Ettercap + Sslstrip) + - Integrated sniffing, sslstrip2 and BeEF browser exploitation framework (Hostapd + DHCP + DoS + Bettercap + BeEF) + - Captive portal with "DNS blackhole" to capture wifi passwords (Hostapd + DHCP + DoS + Dnsspoff + Lighttpd) +- WPS features + - WPS scanning (wash). Self parameterization to avoid *"bad fcs"* problem + - Custom PIN association (bully and reaver) + - Pixie Dust attacks (bully and reaver) + - Bruteforce PIN attacks (bully and reaver) + - Parameterizable timeouts + - Known WPS PINs attack (bully and reaver), based on online PIN database with auto-update + - Integration of the most common PIN generation algorithms +- Compatibility with many Linux distributions (see [requirements] section) +- Easy targeting and selection in every section +- Drag and drop files on console window for entering file paths +- Dynamic screen resolution detection and windows auto-sizing for optimal 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 +- Auto-update. Script checks for newer version if possible + +--- + +### Requirements + +Bash **4.2** or later. + +Compatible with any Linux that has installed the tools needed. The script checks for them at the beginning. + + +Tested on these compatible Linux distributions: + +- *Kali 2.0, 2016.1, 2016.2 and arm versions (Raspberry Pi)* +- *Wifislax 4.11.1, 4.12 and 64-1.0* +- *Backbox 4.5.1 and 4.6* +- *Parrot 2.2.1 to 3.4.1 and arm versions (Raspberry Pi)* +- *BlackArch 2016.01.10 to 2017.01.28* +- *Cyborg Hawk 1.1* +- *Debian 7 (Wheezy) and 8 (Jessie)* +- *Ubuntu/Xubuntu 15.10, 16.04 and 16.04.1* +- *OpenSUSE Leap 42.1 and 42.2* +- *CentOS 6 and 7* +- *Gentoo 20160514 and 20160704* +- *Fedora 24* +- *Red Hat 7 (Maipo)* +- *Arch 4.6.2-1 to 4.9.6-1* +- *Raspbian 7 (Wheezy) and 8 (Jessie) (Raspberry Pi)* +- *OpenMandriva LX3* + +`airgeddon` is already included in some Linux distributions and repositories: +- [Wifislax] 4.12, 64-1.0 or higher +- [BlackArch] 2017.01.28 or later +- [ArchStrike] repository + +#### Essential tools ← The script does not work if you don't have installed all of them + + + + Command | Possible package name | • | Command | Possible package name +:------------|:----------------------|:-------:|:-----------|:---------------------- + ifconfig | net-tools | │ | iwconfig | wireless-tools + iw | iw | │ | awk | awk \| gawk + airmon-ng | aircrack-ng | │ | airodump-ng| aircrack-ng + aircrack-ng | aircrack-ng | │ | xterm | xterm + +#### Optional tools ← Not necessary to work, only needed for some features + + Command | Possible package name | • | Command | Possible package name +:------------|:-------------------------|:-------:|:---------|:----------------------------------------------------- + wpaclean | aircrack-ng | │ | ettercap | ettercap \| ettercap-text-only \| ettercap-graphical + crunch | crunch | │ | etterlog | ettercap \| ettercap-text-only \| ettercap-graphical + aireplay-ng | aircrack-ng | │ | sslstrip | sslstrip + mdk3 | mdk3 | │ | dhcpd | isc-dhcp-server \| dhcp-server \| dhcp + hashcat | hashcat | │ | dnsspoof | dsniff + hostapd | hostapd | │ | wash | reaver + lighttpd | lighttpd | │ | reaver | reaver + iptables | iptables | │ | bully | bully + bettercap | bettercap | │ | pixiewps | pixiewps + beef | beef-xss \| beef-project | │ | unbuffer | expect \| expect-dev + +##### Important tips about BeEF + + - The right software you must install is BeEF (Browser Exploitation Framework). Be careful, do not mistake it with beef (Flexible Brainfuck Interpreter). This package has the same name and executable file name on some distributions and can lead into confusion. Anyway, `airgeddon` is able to detect the issue and displays a warning if needed. Here is a link to the right BeEF installation's page: [BeEF Installation]. + - If you use a distribution which already has BeEF installed like Kali, BlackArch or Wifislax, there will be no problems. If you have manually installed BeEF, `airgeddon` is able to manage the integration asking for the path where it's installed, even modifying its own code in order to make updates-proof persistent changes. + +#### Update tools ← Not necessary to work, only used for auto-update + + Command | Possible package name +:--------|:---------------------- + curl | curl + +#### Internal tools ← These are internally checked. Not necessary to work, good to have + + Command | Possible package name +:---------|:--------------------------------------- + xdpyinfo | x11-utils \| xdpyinfo \| xorg-xdpyinfo + ethtool | ethtool + lspci | pciutils + rfkill | rfkill + +It is highly recommended to have the internal tools installed. They improve functionality and performance. For example, `xdpyinfo` allows the script to detect the display resolution in order to print on windows in a better way (size and position). + +Of course, the script also uses many standard basic commands that are supposed to be included in any Linux distribution, so they are not checked (cp, rm, grep, pgrep, egrep, md5sum, uname, echo, hash, cat, sed, etc.). + +A command could be included in different packages, depending on the distribution. + +--- + +### Usage + +`airgeddon`should be launched with bash `bash /path/to/airgeddon.sh`.
+If you launch the script using sh and a *"Syntax error"* appears, launch it with **bash** instead of **sh**.
+Even with no initial error, it will maybe show itself later. Always use bash! + +--- + +### Supported Languages + +![English][english] English
+![Spanish][spanish] Spanish
+![French][french] French
+![Catalan][catalan] Catalan
+![Portuguese][portuguese] Portuguese
+![Russian][russian] Russian
+![Greek][greek] Greek
+ +--- + +### Known Incompatibilities + +- Impossible compatibility for Mac OSX at the moment: + - *Bash version* ← it can be avoided upgrading to 4 or later, this is not the real problem :smile: + - *Aircrack suite* ← this suite for OSX does not support `airodump` and `aireplay` + - *Wireless tools* ← `iwconfig` does not exist for OSX, and `airport` command cannot be used. It generates 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 again :sweat_smile: + - *Wireless tools* ← `iwconfig` does not exist on these systems, they use `ifconfig` instead and it generates different outputs + +--- + +### Contributing + +- Translations to other languages +- More distribution support compatibility +- New features +- More WPS pins for the database +- Testing and feedback + +Read [Contributing] file for more details on our code of conduct, and the process of project collaborating. + +--- + +### Changelog + +Read [Changelog] file to review changes. + +--- + +### Disclaimer & License + + + +This script must be used for educational purposes and penetration test only.
+Use it only on your own networks or with the network's owner permission.
+`airgeddon` staff is not responsible of its use in any case. + +--- + +### Acknowledgments + + +[Kcdtv] for French translations, beta testing, suggestions about new features and support received since the beginning,
+**USUARIONUEVO** for helping me to improve the script, suggestions about new features and for the support received,
+**El padrino** and [cLn] for Catalan translations,
+[Luan] for Portuguese translations,
+[MiAl] for Russian translations,
+[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff. + +#### Hat tip to + +- The "Spanish pentesting crew" +- The [Wifislax] staff +- The [BlackArch] community +- The forum people of [Seguridadwireless.net], [Wifi-libre.com] and [Lampiweb.com] +- The [Hackware.ru] admins +- All the people who helped building the online PIN database for WPS +- Dominique Bongard for bringing to us Pixie Dust attacks +- Zhao Chunsheng and Stefan Viehböck for their wonderful algorithms +- All developers who made and designed the third-party tools that `airgeddon` uses + +#### Inspiration + + +- [vk496] → Linset +- MI1 → Airstorm +- [MatToufoutu] → Ap-fucker +- Coeman76 → Handshaker +- Goyfilms → Goyscript +- [Kcdtv] → WPSPin + + +[banner]: /imgs/airgeddon_banner_animated_earth_ufos.gif "We will conquer the earth!!" [english]: /imgs/us.png "English" [spanish]: /imgs/es.png "Spanish" [french]: /imgs/fr.png "French" @@ -204,3 +228,30 @@ Bitcoin: *1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH* [portuguese]: /imgs/pt.png "Portuguese" [russian]: /imgs/ru.png "Russian" [greek]: /imgs/gr.png "Greek" + +[version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square +[license-shield]: https://img.shields.io/badge/License-GPLv3%2B-blue.svg?style=flat-square +[bash-shield]: https://img.shields.io/badge/bash-4.2%20or%20later-blue.svg?style=flat-square + +[requirements]: #requirements- +[languages]: #supported-languages +[License]: LICENSE.md +[Contributing]: CONTRIBUTING.md +[Changelog]: CHANGELOG.md + +[Wifislax]: http://www.wifislax.com +[BlackArch]: https://blackarch.org +[ArchStrike]: https://archstrike.org/wiki +[BeEF Installation]: https://github.com/beefproject/beef/wiki/Installation +[Seguridadwireless.net]: http://foro.seguridadwireless.net +[Wifi-libre.com]: https://www.wifi-libre.com +[Lampiweb.com]: http://lampiweb.com/foro +[Hackware.ru]: https://hackware.ru + +[vk496]: https://github.com/vk496 +[MatToufoutu]: https://github.com/mattoufoutu +[Kcdtv]: https://github.com/kcdtv +[cLn]: https://github.com/cLn73 +[Luan]: https://github.com/Luan7805 +[MiAl]: https://github.com/Mi-Al +[xtonousou]: https://github.com/xtonousou "xT" From 89e17dd2e5d662d924260d2fbad5a864e375f63f Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 10 Feb 2017 07:37:31 +0200 Subject: [PATCH 08/41] Added missing images --- README.md | 2 +- imgs/antenna.png | Bin 0 -> 8815 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 imgs/antenna.png diff --git a/README.md b/README.md index 12ded9d0f..2a4d0de88 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ Use it only on your own networks or with the network's owner permission.
- [Kcdtv] → WPSPin -[banner]: /imgs/airgeddon_banner_animated_earth_ufos.gif "We will conquer the earth!!" +[banner]: /imgs/airgeddon_banner.png "We will conquer the earth!!" [english]: /imgs/us.png "English" [spanish]: /imgs/es.png "Spanish" [french]: /imgs/fr.png "French" diff --git a/imgs/antenna.png b/imgs/antenna.png new file mode 100644 index 0000000000000000000000000000000000000000..0951efe1cbe811d9b4371f0d00bf6e13e65e0e78 GIT binary patch literal 8815 zcmc(Ec{tSH`}di}o~1%bg%(M+qEU$%L?KbK6Dn&MWzRBG$R`SACrjBQWHffBe3XwR zYnHJ_WM9W%w)b!PKHuwluHW@Me|(?cKhHn!v)$))FXw&k`#$G9H@jDI@}L@_>bdd z0FLd|yP|nJfV?y|<|}?RjdSvlJDAnAzm8;oF2MWt9*iR0M!q|ieFQeoEu({xf%p0c zouYZJ=03+1AKicapJOLk*-uKhgEGCnK01F>b~5)5!7_b(AB_IkV6Jx3CmIc4*;)DD z4YyWkzh~jyMkY)7kGx@X1*h#FHXF{&!c+X#q3W!0@8{KJ%*FKI8A71jcHItA2nQ%z zMg+jS9>7WAd!m|zfYS1mBGT*BCYLZy3fPldplKnHHC)$taa?`s6cSt~?3Ce7DI8B% zU}*tTWptAe$@#l#z&#!q=#ytHPP}Sw`-fXKiH$Qh)x?sw9j}eKTK_Q|;O9l5tyPkv z-ycev%NKc~&%K(@Am5sCM9ii`TY$C~4$eh4g*}ZrcxZbo##4dKJgo)CRO>_5DEI|? z|G}4I70Al&7NFWieL)Inw$N6W!?^g8+M0ZF1NslAFHHg&P=-$1vu}J;!u^hQQ|;!Jqmui!iDPlFgomR%S0UubH4p9lVKB&v;B1bSb;9g z)bz1>_t7%7LZ8txSE=k;{q_dVU^^x3ooz&6Zg0uzgHCxK^19%fW}Ye{MrHf=dv^vw z42j{NJZ_qg7fm}fscTBbTf$kbuZkpqRYsnD*k|gXRY1h2EN?^pZ0SNCiQ55!{dzdy zUnO&nue@Zm)!RfJj7}B?$}3q#e9AoDbryf372A_*4p&vtX#>%wYVjNJO3lZ90w%-&wTQfZykPJcI((rqZ~EDw#=W@A@B>c!;cd zJTu}zYt}f#8YJ+R--NbV+p$SZt1V-3yF<+FT{Y?p_=|-va+s{wgI?E}h!=_>rzIaL zVrX-?pEby#sN)2n3+1z5Zu)n4|4QSyc9faU#&3+U1UWb^7U)k1#u)!ChuN5eIySk= zmFKyTzG%L<+8ZVdbGrEF`YbcdAiZ7mGr#v-P2HBmsK1zff^&OlPI_LbP3dB6TOO({ z;`g#{d#tCG6hJ}lw%jn)G%i6@tjb^htf2YqaUPh`0^uZbbV(*aG+XUd=hr4#Y8kfI zUkkjjVnpCaPGY%j4lze|22Iuv!0q3#oxo*A+E(!Ri=q@K`TPQQn^Yaq5t`eTx1w%M z=>=FTCwM$jLSsxCNxG0Tv_E-if3(x?u<-RW^_+x=DJX99NH{oH013l25^K3UG`9G% z0@h+(iJgWY*`j=({6}&oEYJm{P(EXdCS30XWTMhaBEXP4o4ZExP6l32Vo$<_t?T^Pz>!O5gmK@##mpC4zFzV4aiO5){X@o# zxbb76IC_#>2mE?z*Y(R!Tvv7j*J9WX&Ci6X+%Or|9Xk|X z_wYHRsabRmw5+)Jr;j5)x)c5@yzcK#oGw%slxM3wo!q75PfZu(}3Fi0s+~j4YoAOcU6DE%{{$Nx|kmN{L z(EH!`oh^=KeG8tjV|QkKl{%NWjX3cgzU1DWMqPn4*99KDZ@OAM-%?h@Jhl1qDD}L3KPl?DDdsE zwEi=Y1V4JOM-Fj$NOPz~O_m{f*!R#-INMPfz+xXBHTyCD{21sRdpviv1x{K-AKKt10OGS7gkxnHEK{=pz*3qBM!>(WiGq&F=T z<6I*h{uod|Gw82C3$+*)3e&p+y?4HMDzwp(jl3;O(SCE@fb9R;Z^x*mQ!%>xyTKoZ zQfpEIUudMB6KwD?hX2vgCx7HdAUBZ#*ryljZyvpKP zFhlZbOOL2C>*7QC(6Ej}$vHl+(vXIq)U&F76FImRiKDCKKX_n2oM6=cn)H(m(jQf5 zvCJbX2PgED`LaFu8fHV6-W_D}`57x9Z>MuyJGA8Kj!D>{O;~Kf2d z=8Kcb>l$rc#Czvl$$@yF8~w-p4#H*Yt*kvnB^~{okC$mFrqAPYAXk=x)fhHanV-&) zNpK?oy>{U3S~yF=(dM9+Q(af&(k<~Sr{Avh5XQ@FxpQzw_67GmWW%3uoTL|?>QUG@-ea@qJHC#3M691DN?(^fa#i5W-wvhCjFOw#Po&gzV$W<^BPpG zSC7ckFPXpH`}#QdQ{H!X*6v}}J@Yj+fhfN!W)wIWHibvbrEuS-8X-*E8TrJhri^b& zNB%K@Z65QecG0oR@T1w;?VHf_BTMl9MY!PiVRW(Y^rE?`U&(iEwbVSCCZ6D=oJ}2J z+Ak;*6mtiV#m7`#?!G-tUb($2N$N|gigX-bIQ%W6Jl1{nu|2K;tl5$zE?@Ra*75BA z+wh{%4}LA128fwIaW-!BBeRahwf{~?VFfE|r}ouL+zI^=p`Co=k&}nlgM$af@Ju{s z@dnNAE-$XsY_c)4-odJ-Efw$(fWH;o!lk@4R~@f?DlpGXXs&Wb-hgG1yS$GxA?pVf zH@YTaMPwD&M{Yrof|rTF^Oa+Bt77Ektj@RS^g|iTc4*2(a02Uqze`wq?4^b+sNs>G z>Htqxq&flmFjl+XRmNYwFDCxO#y>-qIk?#V$g3g@-vEgRA9kl`nQC4&5+|2CVq~|q zpA+?~FBS{G&Nb8#U0Oe_W01b=ky z;~I)V?>OI?VXJ~gP-Y7wnvSRn)<~UsaYC>ej_-j6<<(NQE@FKJ{t9%rmR4_~bCBhJ z^3{~}739A^d^1($>Do9Bim(%^ZpuAb&zogyBqn(^R`!f=d_#FpSkZL)ausXvh&+FP zN=uzguM>~KFDUiHF8v~y;8f|(;_&>E`|8L0z*Q(8?;ku?L>(V!Uu>E-CWOvb&eU(z z+MSp?`DR+FNgkXinJ(cS4cCjrG6r^nstwMhEMmMpQIq?%*KrQ^y@}z7C)D@?Ratjw z1533Mie69M1vg6rwW{TV{xPJ2oU=iJv{&VO*9KH!!oo+MnL~ccS~t`Vf6f0`XE5Ad z3@z_u*Xt}uh&m0svkWRGD#qukSFioOn3Xv{{&zi(5`9D_*I%R&?1Z#Vd~`!WAN+S$ z4>0M1r4VaDill*O(MrQDzZtwV}{j507FN%za)1VpY z4=P$4dbdC~q_W>1&|FTDdpi&uk3twrf!vZZ(>E-Ms7BjW|1(EToA_T^jT)`#z_8!fAhhJ5Y$4#UF5-f{8 z1n*1U^EtpVyVuaVr30L>h?wy5&Uxc0QR%#}8+O~~oE~@UCVW}=qfNXDBF=N~>ompa zPa}GS6(~jPmi*bt#I-jmusM=k?#Es}gD=guT`8;9+v%#pkgPM}#N{(0 zaFXe7h&7Rq#8Z^PKGbVdOGtw3_V!NfyWY&G_Bdxvkm7ZXfb8y?yBe8)El^-V?t{&< z$^-jR5AML0G{5wunR8?o1QMudqU>)t!-3O&<8jsx#4MT;pSaO#l>+O= zuJ7QJDv)ukhp9E+OZd=>CN|Dp9k}2{vkYQtqz)K*TFmQO8@T0aEx^loiA8Xt=DV8p z0lti$Lz-}*G^q#aXp!>rot8kkmzcEt+Ys3faJbsEYT+9kcW<@pCHXEVNn0yeyptU+ zS{yf7{T;OPFbtTprAZqeKk~NS`#9hR?lxZ@q|HA_ov1V9Q0y{vheQlOipFa1!msLK ze}yNk=x-c&tPSUjyGSrNM$m2m-E{5y8Q1ADT5!BG*HIzxIGGhwBbMf>+%iu#sd{M! z2f7!1*oR_C_DPssa07s6*SG;` z`S9QZEerq-=Ffdg34*hDK)MpLx{nmbhC||OOKsrCjcstu18~ysMm}r~dMrQQiJ!bx z;0fkv_pTD~$mRI#rQWuaUdvk^j=p2M+F&Ocb^l5<9GBzjGB`H(S^)vFg|=G74@!b7 z)*KA}%{A2H8Pt}0fTuq36_}KI8z4Uai@5rJ2CLLp4H(<<8a+uSzeaC-`v)Z7dIYW6c^ z)**jZKeMJVZH}>_Uch?!%vu2krw{ zH%eibW+MKRMDLw{jwOMCa_8HZ-{?PCCbK#XJO&(@{-~2R8GQ=lP zWKH$<uuF0He5F1CB=ROPxLbzlIjop7$gQ%x(qPGj55LjoiVyMe{PA5?Lbr^adWLpM zh|tpoDdr2ENhPnHK=0M$WO9*#d8ai@aGm%gohA`1@u;im#|>r&xF9g3J@Z+t%XQO? z6rwIqRy>Kkzm*%0N()IKiiiphp!S%&3F45bK6UA<8vT=ty?!8yCDU!z!1bw0f(yUJ zO>o|XtBw_C$CSR42*;N_?paVsWgOh_FZnWZ`t5)X4{!p0c~j>|mwZQrcV_5xy`N3E zz5Ow8QYAB06mZU~b(kD2dEX8eQ4CFPFI&&Kx?8$QSiVZr(LIf#Uz^| zDr50syqy*+#`Fo1hB^x_xD6nPhG-&rK&OnBiBFt@u&1Bwum|-Em6LITfJboBpTn~; z;RrD?nSE$)dLzqv*rgQ_bWsY7?sPOPGPY}5JGT{n`43sB@wl0L;Ly%e9<+Rnbti&6 z&mf{#3`r8^pVQ+6rav`8``fdL%vG|`p)?j#p}z|CEbt}bU8B>zG`lY=Rbjb?|S{zOGie8MZo2;enbk#B}` zHEzCK5^E*mS`{9f(m=BU*DS1ArLFv_3ALT+9j8q+(LcqtZJ<_r)&I z%FZ#-g7dMg>IdN3&TMdE2q-$u$klw-(A@*A>ahRj>clkIHMi<0!KrtEAv-P>JWyAyxEG*4PwmY~$@t39p;uAW5m92<_Ta7D}d#}WO zE#lSAM?KX`sp=?#K4T-uXZ@H>U-n=gB*FIWQ3hAtcrzjf{$`#@L_vA=dVW7V15Jae zak#?fsk4fYnx&08EqSvK6q!I_eP+{RkY*bNS|CE-mfk|y&s6xz5zg!leH}+ym)lt_ zR$*pshz=J=a^lSo-O|d63v8#S@Lqi8mBv_bn<~n20#O~{_MwZ?1r*12`WsoX7;EY| z)4U#>erEtZubcV_c!?zJ$jT!aXeh|P+ccwS$h=cxm@@%28G&oVT;(!;2(%zXpB9uRgwli%8Pth%i^=oqrx@v6>Bjav?+)1KNBSW^VnWDB1NMvZlw9<|4E zmdk7Z#Fzi?oRd#+?K8HIZL-qzn0*sCC?~Rh!>Oezp?&##ZZHAdAw*F=x)n_cQeZ z7ZfjO9Zmw72WZx3V(bsDhCa5MTMe-)f0@kQqHZsMQd{L00p_hWY3S1ouJgfM3C;!Q z@$`w|MfrWQM$sB-dRvn-7Enub;YG)^`zgJ}0ZEK^GdFA-T?3WXl0d%dt?Qwovef5v zhvfk0?F?9TUol6F%sdKk%KWd#iW~hHX zu}ONH+&ZxbFNWVxhS5kbCK}MO8bOmfL3^oSRit4z=mt}lmBKUB;Z3P@8IiXdC@SC1 z%*gUs#JNlfL~DRz>R|DcD0KfGn2~koOI%o``RA%jN=8Ubk+bc zEl{UeTX)ARP!BWJe;w;M`VeLpKDMX*ouHOc!K~QsJ?ZRmZ}hXuu8Y_Zv(UXs*$P%3 z-*j0{paUeN@>qzjEbePsE{_j!FKbqqdbgu}_6N1ZiopS-?9cVJXvTb57zmq~N>Sg? z%FmG5E?HxbpVsVSQRaNUbeU`kI_7z>MuzhlfflbH4+dWi)t}#aNmXLo%RZ+GvAlPi z`7EPWDdXLo3=572O1tm8OHNNEeefU8k9`0r#y+UK11^J! zYGP-9*FPMz-0nKeTwNN2^bZWlk^H`M8UIm+bhAkpIwEKsYxB#3?on^}giW5U^l~#K zUOoAOpI2=PStpb0&V2%y_A_G-P1bDKh%qCB>lGdZ`|PN5xQeVY zyYTODxyx6@`2*SHqzh7$-Fb}I9Fmm^B_sY0S?{`y6HMcvXJd5!A1z4zT6lGXEUJmC z9b@s`%Vc?PQTzGS$3EPDWcxag=D)RZ6|xO3mOdZYK)oI^)rjR}8w^Z`&{_C-waLI9Wq3R3)7HybT_$gY!5}xMSIA_dpkyd{Qy9Mt^rhDNM_?mmD;WNAvMAAj7zdd z64+)8AQDfn_fc%SE@!ExpOy8yeMzP(4onV{^ZPr0+oH9(aPSCa>@v-St+ zG1i_RQnyEy%FsJ+)f@EI`qQMTj# zO0M*Gza1_#54QX5&WIq$mdF^L!wtghe-P`(KO&lc#|f%81Hnh58xtju$2Xk+##Xuv zm-&>S#g~3yjuez3?F_r3TD z@Rv|A9l8>-#oAs}fH<7?*Kmtykt&7-!PcV}|-uv6VB!fy{Z*kr{_lV~-uo&~$@*Sip`Hsd<-^8rr1uu`f! zAJh0%8q>?AWlE!M7TGd}k=VcV#o>cT7&d4iOqg(!kGN4<+A00`?G5Xf{7)9e1nmTn z??s?ZE!^sT6l+TeNT(+0h90aJ1GmK}w=W%KzBizCJh2KaAhP3jxY|vL^aLb3c>_jCa29!Z7PoxI1gBD{k3j zYfxA%TrL1h6!;EkimV^B;+2KIlIG}9(=QvwFj~>RX9!#=62H!G082iq0GNHqJ(0{e zRI1|G15j8iTprpgN;_o#G{mH3YQjT3%{RCwQVd_ffhC^u_;S?%?wBEZB!$_3c!!|e zAd&DWYvPu7T~m4(K85J`R%6$~dv!o*hN8QE6$k+#IB}RvWhe$|S^=KE>6C28^e`}?Sf6e`#2H$+x4Vqlg2t$st5ufE4@xhx(of@6o0_>j#! zrzP!JlLCWIT~dfU4_?s{wMtj6aLAbbG!@HsIg-fBQwQjl)0S)e#84wbv1su34mpPO;?E#h6j~B_@XEQ@4$QBWX!QytrZ$h2`Z1%XMu_ds!tqXhb{CuT zNkwmj3wMsQ-($5&srjuc*gEuSW3~zKuFvp=@vNQE#(%S9EN{;~j(Ts}Lce3reqKu_n!l~OJH Gr~d^XuuPQz literal 0 HcmV?d00001 From 7eba4a73eda9e7c57b9bf50b4209128c554ae3fd Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 10 Feb 2017 07:54:35 +0200 Subject: [PATCH 09/41] Updated Arch Linux versions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a4d0de88..3d2967e02 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Tested on these compatible Linux distributions: - *Gentoo 20160514 and 20160704* - *Fedora 24* - *Red Hat 7 (Maipo)* -- *Arch 4.6.2-1 to 4.9.6-1* +- *Arch 4.6.2-1 to 4.9.8-1* - *Raspbian 7 (Wheezy) and 8 (Jessie) (Raspberry Pi)* - *OpenMandriva LX3* From 7f7625322425b8515bf5c73cafed5d3f0bad25b5 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 10 Feb 2017 07:59:09 +0200 Subject: [PATCH 10/41] Removed useless links --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 3d2967e02..e77eeb031 100644 --- a/README.md +++ b/README.md @@ -228,10 +228,6 @@ Use it only on your own networks or with the network's owner permission.
[portuguese]: /imgs/pt.png "Portuguese" [russian]: /imgs/ru.png "Russian" [greek]: /imgs/gr.png "Greek" - -[version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square -[license-shield]: https://img.shields.io/badge/License-GPLv3%2B-blue.svg?style=flat-square -[bash-shield]: https://img.shields.io/badge/bash-4.2%20or%20later-blue.svg?style=flat-square [requirements]: #requirements- [languages]: #supported-languages From 8b98bb896569876b9d806776d4dd0445f28de18f Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Fri, 10 Feb 2017 08:07:39 +0200 Subject: [PATCH 11/41] Corrected 'Requirements' link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e77eeb031..34f800a41 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ Use it only on your own networks or with the network's owner permission.
[russian]: /imgs/ru.png "Russian" [greek]: /imgs/gr.png "Greek" -[requirements]: #requirements- +[requirements]: #requirements [languages]: #supported-languages [License]: LICENSE.md [Contributing]: CONTRIBUTING.md From b33f9294bc7186678b614ec78258815af311658a Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 10 Feb 2017 21:58:25 +0100 Subject: [PATCH 12/41] Small changes on Readme --- README.md | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 34f800a41..612d89ffb 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,12 @@ This is a multi-use bash script for Linux systems to audit wireless networks. - Parameterizable timeouts - Known WPS PINs attack (bully and reaver), based on online PIN database with auto-update - Integration of the most common PIN generation algorithms -- Compatibility with many Linux distributions (see [requirements] section) +- Compatibility with many Linux distributions (see [Requirements] section) - Easy targeting and selection in every section - Drag and drop files on console window for entering file paths - Dynamic screen resolution detection and windows auto-sizing for optimal 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) +- Multilanguage support and autodetect OS language feature (see supported [Languages] section) - Help hints in every zone/menu for easy use - Auto-update. Script checks for newer version if possible @@ -77,47 +77,47 @@ Tested on these compatible Linux distributions: - Command | Possible package name | • | Command | Possible package name -:------------|:----------------------|:-------:|:-----------|:---------------------- - ifconfig | net-tools | │ | iwconfig | wireless-tools - iw | iw | │ | awk | awk \| gawk - airmon-ng | aircrack-ng | │ | airodump-ng| aircrack-ng - aircrack-ng | aircrack-ng | │ | xterm | xterm + Command | Possible package name | • | Command | Possible package name +:------------|:----------------------|:-------:|:------------|:---------------------- + ifconfig | net-tools | │ | iwconfig | wireless-tools + iw | iw | │ | awk | awk \| gawk + airmon-ng | aircrack-ng | │ | airodump-ng | aircrack-ng + aircrack-ng | aircrack-ng | │ | xterm | xterm #### Optional tools ← Not necessary to work, only needed for some features - Command | Possible package name | • | Command | Possible package name + Command | Possible package name | • | Command | Possible package name :------------|:-------------------------|:-------:|:---------|:----------------------------------------------------- wpaclean | aircrack-ng | │ | ettercap | ettercap \| ettercap-text-only \| ettercap-graphical crunch | crunch | │ | etterlog | ettercap \| ettercap-text-only \| ettercap-graphical - aireplay-ng | aircrack-ng | │ | sslstrip | sslstrip + aireplay-ng | aircrack-ng | │ | sslstrip | sslstrip mdk3 | mdk3 | │ | dhcpd | isc-dhcp-server \| dhcp-server \| dhcp - hashcat | hashcat | │ | dnsspoof | dsniff - hostapd | hostapd | │ | wash | reaver - lighttpd | lighttpd | │ | reaver | reaver - iptables | iptables | │ | bully | bully - bettercap | bettercap | │ | pixiewps | pixiewps - beef | beef-xss \| beef-project | │ | unbuffer | expect \| expect-dev + hashcat | hashcat | │ | dnsspoof | dsniff + hostapd | hostapd | │ | wash | reaver + lighttpd | lighttpd | │ | reaver | reaver + iptables | iptables | │ | bully | bully + bettercap | bettercap | │ | pixiewps | pixiewps + beef | beef-xss \| beef-project | │ | unbuffer | expect \| expect-dev ##### Important tips about BeEF - - The right software you must install is BeEF (Browser Exploitation Framework). Be careful, do not mistake it with beef (Flexible Brainfuck Interpreter). This package has the same name and executable file name on some distributions and can lead into confusion. Anyway, `airgeddon` is able to detect the issue and displays a warning if needed. Here is a link to the right BeEF installation's page: [BeEF Installation]. + - The right software you must install is BeEF (Browser Exploitation Framework). Be careful, do not mistake it with beef (Flexible Brainfuck Interpreter). This package has the same name and executable file name on some distributions and can lead into confusion. Anyway, `airgeddon` is able to detect the issue and displays a warning if needed. Here is a link to the right [BeEF installation's page]. - If you use a distribution which already has BeEF installed like Kali, BlackArch or Wifislax, there will be no problems. If you have manually installed BeEF, `airgeddon` is able to manage the integration asking for the path where it's installed, even modifying its own code in order to make updates-proof persistent changes. #### Update tools ← Not necessary to work, only used for auto-update - Command | Possible package name + Command | Possible package name :--------|:---------------------- - curl | curl + curl | curl #### Internal tools ← These are internally checked. Not necessary to work, good to have - Command | Possible package name + Command | Possible package name :---------|:--------------------------------------- xdpyinfo | x11-utils \| xdpyinfo \| xorg-xdpyinfo - ethtool | ethtool - lspci | pciutils - rfkill | rfkill + ethtool | ethtool + lspci | pciutils + rfkill | rfkill It is highly recommended to have the internal tools installed. They improve functionality and performance. For example, `xdpyinfo` allows the script to detect the display resolution in order to print on windows in a better way (size and position). @@ -129,7 +129,7 @@ A command could be included in different packages, depending on the distribution ### Usage -`airgeddon`should be launched with bash `bash /path/to/airgeddon.sh`.
+`airgeddon` should be launched with bash `bash /path/to/airgeddon.sh`.
If you launch the script using sh and a *"Syntax error"* appears, launch it with **bash** instead of **sh**.
Even with no initial error, it will maybe show itself later. Always use bash! @@ -182,7 +182,7 @@ Read [Changelog] file to review changes. This script must be used for educational purposes and penetration test only.
-Use it only on your own networks or with the network's owner permission.
+Use it only on your own networks or with the network's owner permission.
`airgeddon` staff is not responsible of its use in any case. --- @@ -229,8 +229,8 @@ Use it only on your own networks or with the network's owner permission.
[russian]: /imgs/ru.png "Russian" [greek]: /imgs/gr.png "Greek" -[requirements]: #requirements -[languages]: #supported-languages +[Requirements]: #requirements +[Languages]: #supported-languages [License]: LICENSE.md [Contributing]: CONTRIBUTING.md [Changelog]: CHANGELOG.md @@ -238,7 +238,7 @@ Use it only on your own networks or with the network's owner permission.
[Wifislax]: http://www.wifislax.com [BlackArch]: https://blackarch.org [ArchStrike]: https://archstrike.org/wiki -[BeEF Installation]: https://github.com/beefproject/beef/wiki/Installation +[BeEF installation's page]: https://github.com/beefproject/beef/wiki/Installation [Seguridadwireless.net]: http://foro.seguridadwireless.net [Wifi-libre.com]: https://www.wifi-libre.com [Lampiweb.com]: http://lampiweb.com/foro From 3c43a7a74b60cff964861165abdacd34e61a1e41 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sat, 11 Feb 2017 10:28:50 +0200 Subject: [PATCH 13/41] Fixed shields' appearance issues --- README.md | 12 +++++++++--- imgs/antenna.png | Bin 8815 -> 0 bytes 2 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 imgs/antenna.png diff --git a/README.md b/README.md index 612d89ffb..aa4640661 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -# airgeddon +# :satellite: airgeddon [![version-shield]](CHANGELOG.md) [![bash4.2-shield]](http://tldp.org/LDP/abs/html/bashver4.html#AEN21220) [![license-shield]](LICENSE.md) [![paypal-shield]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) [![bitcoin-shield]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) This is a multi-use bash script for Linux systems to audit wireless networks. @@ -219,7 +219,7 @@ Use it only on your own networks or with the network's owner permission.
- Goyfilms → Goyscript - [Kcdtv] → WPSPin - + [banner]: /imgs/airgeddon_banner.png "We will conquer the earth!!" [english]: /imgs/us.png "English" [spanish]: /imgs/es.png "Spanish" @@ -228,12 +228,18 @@ Use it only on your own networks or with the network's owner permission.
[portuguese]: /imgs/pt.png "Portuguese" [russian]: /imgs/ru.png "Russian" [greek]: /imgs/gr.png "Greek" - + [Requirements]: #requirements [Languages]: #supported-languages [License]: LICENSE.md [Contributing]: CONTRIBUTING.md [Changelog]: CHANGELOG.md + +[version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" +[license-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" +[paypal-shield]: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&colorA=002f86&colorB=009cde "Show me the money!" +[bitcoin-shield]: https://img.shields.io/badge/donate-bitcoin-blue.svg?style=flat-square&colorA=273133&colorB=f7931a "Show me the money!" [Wifislax]: http://www.wifislax.com [BlackArch]: https://blackarch.org diff --git a/imgs/antenna.png b/imgs/antenna.png deleted file mode 100644 index 0951efe1cbe811d9b4371f0d00bf6e13e65e0e78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8815 zcmc(Ec{tSH`}di}o~1%bg%(M+qEU$%L?KbK6Dn&MWzRBG$R`SACrjBQWHffBe3XwR zYnHJ_WM9W%w)b!PKHuwluHW@Me|(?cKhHn!v)$))FXw&k`#$G9H@jDI@}L@_>bdd z0FLd|yP|nJfV?y|<|}?RjdSvlJDAnAzm8;oF2MWt9*iR0M!q|ieFQeoEu({xf%p0c zouYZJ=03+1AKicapJOLk*-uKhgEGCnK01F>b~5)5!7_b(AB_IkV6Jx3CmIc4*;)DD z4YyWkzh~jyMkY)7kGx@X1*h#FHXF{&!c+X#q3W!0@8{KJ%*FKI8A71jcHItA2nQ%z zMg+jS9>7WAd!m|zfYS1mBGT*BCYLZy3fPldplKnHHC)$taa?`s6cSt~?3Ce7DI8B% zU}*tTWptAe$@#l#z&#!q=#ytHPP}Sw`-fXKiH$Qh)x?sw9j}eKTK_Q|;O9l5tyPkv z-ycev%NKc~&%K(@Am5sCM9ii`TY$C~4$eh4g*}ZrcxZbo##4dKJgo)CRO>_5DEI|? z|G}4I70Al&7NFWieL)Inw$N6W!?^g8+M0ZF1NslAFHHg&P=-$1vu}J;!u^hQQ|;!Jqmui!iDPlFgomR%S0UubH4p9lVKB&v;B1bSb;9g z)bz1>_t7%7LZ8txSE=k;{q_dVU^^x3ooz&6Zg0uzgHCxK^19%fW}Ye{MrHf=dv^vw z42j{NJZ_qg7fm}fscTBbTf$kbuZkpqRYsnD*k|gXRY1h2EN?^pZ0SNCiQ55!{dzdy zUnO&nue@Zm)!RfJj7}B?$}3q#e9AoDbryf372A_*4p&vtX#>%wYVjNJO3lZ90w%-&wTQfZykPJcI((rqZ~EDw#=W@A@B>c!;cd zJTu}zYt}f#8YJ+R--NbV+p$SZt1V-3yF<+FT{Y?p_=|-va+s{wgI?E}h!=_>rzIaL zVrX-?pEby#sN)2n3+1z5Zu)n4|4QSyc9faU#&3+U1UWb^7U)k1#u)!ChuN5eIySk= zmFKyTzG%L<+8ZVdbGrEF`YbcdAiZ7mGr#v-P2HBmsK1zff^&OlPI_LbP3dB6TOO({ z;`g#{d#tCG6hJ}lw%jn)G%i6@tjb^htf2YqaUPh`0^uZbbV(*aG+XUd=hr4#Y8kfI zUkkjjVnpCaPGY%j4lze|22Iuv!0q3#oxo*A+E(!Ri=q@K`TPQQn^Yaq5t`eTx1w%M z=>=FTCwM$jLSsxCNxG0Tv_E-if3(x?u<-RW^_+x=DJX99NH{oH013l25^K3UG`9G% z0@h+(iJgWY*`j=({6}&oEYJm{P(EXdCS30XWTMhaBEXP4o4ZExP6l32Vo$<_t?T^Pz>!O5gmK@##mpC4zFzV4aiO5){X@o# zxbb76IC_#>2mE?z*Y(R!Tvv7j*J9WX&Ci6X+%Or|9Xk|X z_wYHRsabRmw5+)Jr;j5)x)c5@yzcK#oGw%slxM3wo!q75PfZu(}3Fi0s+~j4YoAOcU6DE%{{$Nx|kmN{L z(EH!`oh^=KeG8tjV|QkKl{%NWjX3cgzU1DWMqPn4*99KDZ@OAM-%?h@Jhl1qDD}L3KPl?DDdsE zwEi=Y1V4JOM-Fj$NOPz~O_m{f*!R#-INMPfz+xXBHTyCD{21sRdpviv1x{K-AKKt10OGS7gkxnHEK{=pz*3qBM!>(WiGq&F=T z<6I*h{uod|Gw82C3$+*)3e&p+y?4HMDzwp(jl3;O(SCE@fb9R;Z^x*mQ!%>xyTKoZ zQfpEIUudMB6KwD?hX2vgCx7HdAUBZ#*ryljZyvpKP zFhlZbOOL2C>*7QC(6Ej}$vHl+(vXIq)U&F76FImRiKDCKKX_n2oM6=cn)H(m(jQf5 zvCJbX2PgED`LaFu8fHV6-W_D}`57x9Z>MuyJGA8Kj!D>{O;~Kf2d z=8Kcb>l$rc#Czvl$$@yF8~w-p4#H*Yt*kvnB^~{okC$mFrqAPYAXk=x)fhHanV-&) zNpK?oy>{U3S~yF=(dM9+Q(af&(k<~Sr{Avh5XQ@FxpQzw_67GmWW%3uoTL|?>QUG@-ea@qJHC#3M691DN?(^fa#i5W-wvhCjFOw#Po&gzV$W<^BPpG zSC7ckFPXpH`}#QdQ{H!X*6v}}J@Yj+fhfN!W)wIWHibvbrEuS-8X-*E8TrJhri^b& zNB%K@Z65QecG0oR@T1w;?VHf_BTMl9MY!PiVRW(Y^rE?`U&(iEwbVSCCZ6D=oJ}2J z+Ak;*6mtiV#m7`#?!G-tUb($2N$N|gigX-bIQ%W6Jl1{nu|2K;tl5$zE?@Ra*75BA z+wh{%4}LA128fwIaW-!BBeRahwf{~?VFfE|r}ouL+zI^=p`Co=k&}nlgM$af@Ju{s z@dnNAE-$XsY_c)4-odJ-Efw$(fWH;o!lk@4R~@f?DlpGXXs&Wb-hgG1yS$GxA?pVf zH@YTaMPwD&M{Yrof|rTF^Oa+Bt77Ektj@RS^g|iTc4*2(a02Uqze`wq?4^b+sNs>G z>Htqxq&flmFjl+XRmNYwFDCxO#y>-qIk?#V$g3g@-vEgRA9kl`nQC4&5+|2CVq~|q zpA+?~FBS{G&Nb8#U0Oe_W01b=ky z;~I)V?>OI?VXJ~gP-Y7wnvSRn)<~UsaYC>ej_-j6<<(NQE@FKJ{t9%rmR4_~bCBhJ z^3{~}739A^d^1($>Do9Bim(%^ZpuAb&zogyBqn(^R`!f=d_#FpSkZL)ausXvh&+FP zN=uzguM>~KFDUiHF8v~y;8f|(;_&>E`|8L0z*Q(8?;ku?L>(V!Uu>E-CWOvb&eU(z z+MSp?`DR+FNgkXinJ(cS4cCjrG6r^nstwMhEMmMpQIq?%*KrQ^y@}z7C)D@?Ratjw z1533Mie69M1vg6rwW{TV{xPJ2oU=iJv{&VO*9KH!!oo+MnL~ccS~t`Vf6f0`XE5Ad z3@z_u*Xt}uh&m0svkWRGD#qukSFioOn3Xv{{&zi(5`9D_*I%R&?1Z#Vd~`!WAN+S$ z4>0M1r4VaDill*O(MrQDzZtwV}{j507FN%za)1VpY z4=P$4dbdC~q_W>1&|FTDdpi&uk3twrf!vZZ(>E-Ms7BjW|1(EToA_T^jT)`#z_8!fAhhJ5Y$4#UF5-f{8 z1n*1U^EtpVyVuaVr30L>h?wy5&Uxc0QR%#}8+O~~oE~@UCVW}=qfNXDBF=N~>ompa zPa}GS6(~jPmi*bt#I-jmusM=k?#Es}gD=guT`8;9+v%#pkgPM}#N{(0 zaFXe7h&7Rq#8Z^PKGbVdOGtw3_V!NfyWY&G_Bdxvkm7ZXfb8y?yBe8)El^-V?t{&< z$^-jR5AML0G{5wunR8?o1QMudqU>)t!-3O&<8jsx#4MT;pSaO#l>+O= zuJ7QJDv)ukhp9E+OZd=>CN|Dp9k}2{vkYQtqz)K*TFmQO8@T0aEx^loiA8Xt=DV8p z0lti$Lz-}*G^q#aXp!>rot8kkmzcEt+Ys3faJbsEYT+9kcW<@pCHXEVNn0yeyptU+ zS{yf7{T;OPFbtTprAZqeKk~NS`#9hR?lxZ@q|HA_ov1V9Q0y{vheQlOipFa1!msLK ze}yNk=x-c&tPSUjyGSrNM$m2m-E{5y8Q1ADT5!BG*HIzxIGGhwBbMf>+%iu#sd{M! z2f7!1*oR_C_DPssa07s6*SG;` z`S9QZEerq-=Ffdg34*hDK)MpLx{nmbhC||OOKsrCjcstu18~ysMm}r~dMrQQiJ!bx z;0fkv_pTD~$mRI#rQWuaUdvk^j=p2M+F&Ocb^l5<9GBzjGB`H(S^)vFg|=G74@!b7 z)*KA}%{A2H8Pt}0fTuq36_}KI8z4Uai@5rJ2CLLp4H(<<8a+uSzeaC-`v)Z7dIYW6c^ z)**jZKeMJVZH}>_Uch?!%vu2krw{ zH%eibW+MKRMDLw{jwOMCa_8HZ-{?PCCbK#XJO&(@{-~2R8GQ=lP zWKH$<uuF0He5F1CB=ROPxLbzlIjop7$gQ%x(qPGj55LjoiVyMe{PA5?Lbr^adWLpM zh|tpoDdr2ENhPnHK=0M$WO9*#d8ai@aGm%gohA`1@u;im#|>r&xF9g3J@Z+t%XQO? z6rwIqRy>Kkzm*%0N()IKiiiphp!S%&3F45bK6UA<8vT=ty?!8yCDU!z!1bw0f(yUJ zO>o|XtBw_C$CSR42*;N_?paVsWgOh_FZnWZ`t5)X4{!p0c~j>|mwZQrcV_5xy`N3E zz5Ow8QYAB06mZU~b(kD2dEX8eQ4CFPFI&&Kx?8$QSiVZr(LIf#Uz^| zDr50syqy*+#`Fo1hB^x_xD6nPhG-&rK&OnBiBFt@u&1Bwum|-Em6LITfJboBpTn~; z;RrD?nSE$)dLzqv*rgQ_bWsY7?sPOPGPY}5JGT{n`43sB@wl0L;Ly%e9<+Rnbti&6 z&mf{#3`r8^pVQ+6rav`8``fdL%vG|`p)?j#p}z|CEbt}bU8B>zG`lY=Rbjb?|S{zOGie8MZo2;enbk#B}` zHEzCK5^E*mS`{9f(m=BU*DS1ArLFv_3ALT+9j8q+(LcqtZJ<_r)&I z%FZ#-g7dMg>IdN3&TMdE2q-$u$klw-(A@*A>ahRj>clkIHMi<0!KrtEAv-P>JWyAyxEG*4PwmY~$@t39p;uAW5m92<_Ta7D}d#}WO zE#lSAM?KX`sp=?#K4T-uXZ@H>U-n=gB*FIWQ3hAtcrzjf{$`#@L_vA=dVW7V15Jae zak#?fsk4fYnx&08EqSvK6q!I_eP+{RkY*bNS|CE-mfk|y&s6xz5zg!leH}+ym)lt_ zR$*pshz=J=a^lSo-O|d63v8#S@Lqi8mBv_bn<~n20#O~{_MwZ?1r*12`WsoX7;EY| z)4U#>erEtZubcV_c!?zJ$jT!aXeh|P+ccwS$h=cxm@@%28G&oVT;(!;2(%zXpB9uRgwli%8Pth%i^=oqrx@v6>Bjav?+)1KNBSW^VnWDB1NMvZlw9<|4E zmdk7Z#Fzi?oRd#+?K8HIZL-qzn0*sCC?~Rh!>Oezp?&##ZZHAdAw*F=x)n_cQeZ z7ZfjO9Zmw72WZx3V(bsDhCa5MTMe-)f0@kQqHZsMQd{L00p_hWY3S1ouJgfM3C;!Q z@$`w|MfrWQM$sB-dRvn-7Enub;YG)^`zgJ}0ZEK^GdFA-T?3WXl0d%dt?Qwovef5v zhvfk0?F?9TUol6F%sdKk%KWd#iW~hHX zu}ONH+&ZxbFNWVxhS5kbCK}MO8bOmfL3^oSRit4z=mt}lmBKUB;Z3P@8IiXdC@SC1 z%*gUs#JNlfL~DRz>R|DcD0KfGn2~koOI%o``RA%jN=8Ubk+bc zEl{UeTX)ARP!BWJe;w;M`VeLpKDMX*ouHOc!K~QsJ?ZRmZ}hXuu8Y_Zv(UXs*$P%3 z-*j0{paUeN@>qzjEbePsE{_j!FKbqqdbgu}_6N1ZiopS-?9cVJXvTb57zmq~N>Sg? z%FmG5E?HxbpVsVSQRaNUbeU`kI_7z>MuzhlfflbH4+dWi)t}#aNmXLo%RZ+GvAlPi z`7EPWDdXLo3=572O1tm8OHNNEeefU8k9`0r#y+UK11^J! zYGP-9*FPMz-0nKeTwNN2^bZWlk^H`M8UIm+bhAkpIwEKsYxB#3?on^}giW5U^l~#K zUOoAOpI2=PStpb0&V2%y_A_G-P1bDKh%qCB>lGdZ`|PN5xQeVY zyYTODxyx6@`2*SHqzh7$-Fb}I9Fmm^B_sY0S?{`y6HMcvXJd5!A1z4zT6lGXEUJmC z9b@s`%Vc?PQTzGS$3EPDWcxag=D)RZ6|xO3mOdZYK)oI^)rjR}8w^Z`&{_C-waLI9Wq3R3)7HybT_$gY!5}xMSIA_dpkyd{Qy9Mt^rhDNM_?mmD;WNAvMAAj7zdd z64+)8AQDfn_fc%SE@!ExpOy8yeMzP(4onV{^ZPr0+oH9(aPSCa>@v-St+ zG1i_RQnyEy%FsJ+)f@EI`qQMTj# zO0M*Gza1_#54QX5&WIq$mdF^L!wtghe-P`(KO&lc#|f%81Hnh58xtju$2Xk+##Xuv zm-&>S#g~3yjuez3?F_r3TD z@Rv|A9l8>-#oAs}fH<7?*Kmtykt&7-!PcV}|-uv6VB!fy{Z*kr{_lV~-uo&~$@*Sip`Hsd<-^8rr1uu`f! zAJh0%8q>?AWlE!M7TGd}k=VcV#o>cT7&d4iOqg(!kGN4<+A00`?G5Xf{7)9e1nmTn z??s?ZE!^sT6l+TeNT(+0h90aJ1GmK}w=W%KzBizCJh2KaAhP3jxY|vL^aLb3c>_jCa29!Z7PoxI1gBD{k3j zYfxA%TrL1h6!;EkimV^B;+2KIlIG}9(=QvwFj~>RX9!#=62H!G082iq0GNHqJ(0{e zRI1|G15j8iTprpgN;_o#G{mH3YQjT3%{RCwQVd_ffhC^u_;S?%?wBEZB!$_3c!!|e zAd&DWYvPu7T~m4(K85J`R%6$~dv!o*hN8QE6$k+#IB}RvWhe$|S^=KE>6C28^e`}?Sf6e`#2H$+x4Vqlg2t$st5ufE4@xhx(of@6o0_>j#! zrzP!JlLCWIT~dfU4_?s{wMtj6aLAbbG!@HsIg-fBQwQjl)0S)e#84wbv1su34mpPO;?E#h6j~B_@XEQ@4$QBWX!QytrZ$h2`Z1%XMu_ds!tqXhb{CuT zNkwmj3wMsQ-($5&srjuc*gEuSW3~zKuFvp=@vNQE#(%S9EN{;~j(Ts}Lce3reqKu_n!l~OJH Gr~d^XuuPQz From 7e1ac048473fcec317b6fbaa6bcaa7ad64046a5b Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sat, 11 Feb 2017 12:29:15 +0100 Subject: [PATCH 14/41] Unexpected errors on wash scanning are controlled now --- CHANGELOG.md | 1 + airgeddon.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 150706743..2e3bcaf1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - New extra-verbose debug mode added - README.md major modifications - Added CONTRIBUTING.md + - Unexpected errors on wash scanning are controlled now ###6.0 - New system for possible tool aliases checking the requirements diff --git a/airgeddon.sh b/airgeddon.sh index d4cde6275..2b9725a5d 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3872,6 +3872,14 @@ function language_strings() { arr["RUSSIAN",416]=" Вы можете запустить BeEF, но лучше, если вы сначала запустите вторую опцию" arr["GREEK",416]=" Μπορείτε να εκτελέσετε το BeEF, αλλά είναι καλύτερα να διαλέξετε τη δεύτερη επιλογή από πρίν" + arr["ENGLISH",417]="An unexpected error occurred, redirecting to the menu" + arr["SPANISH",417]="Ocurrió un error inesperado. Volviendo al menú" + arr["FRENCH",417]="${pending_of_translation} Une erreur inattendue s'est produite, retour au menu" + arr["CATALAN",417]="${pending_of_translation} Hi ha hagut un error inesperat, redirigint al menú" + arr["PORTUGUESE",417]="${pending_of_translation} Ocorreu um erro inesperado, redirecionando ao menu" + arr["RUSSIAN",417]="${pending_of_translation} Непредвиденная ошибка, перенаправляя в меню" + arr["GREEK",417]="${pending_of_translation} Παρουσιάστηκε μη αναμενόμενο σφάλμα, ανακατεύθυνση στο μενού" + case "${3}" in "yellow") interrupt_checkpoint "${2}" "${3}" @@ -9308,16 +9316,25 @@ function explore_for_wps_targets_option() { readarray -t WASH_PREVIEW < <(cat < "${tmpdir}wps.txt" 2> /dev/null) + wash_header_found=0 wash_line_counter=1 for item in "${WASH_PREVIEW[@]}"; do if [[ ${item} =~ -{20} ]]; then wash_start_data_line="${wash_line_counter}" + wash_header_found=1 break else wash_line_counter=$((wash_line_counter+1)) fi done + if [ "${wash_header_found}" -eq 0 ]; then + echo + language_strings "${language}" 417 "red" + language_strings "${language}" 115 "read" + return 1 + fi + washlines=$(wc -l "${tmpdir}wps.txt" 2> /dev/null | awk '{print $1}') if [ "${washlines}" -le ${wash_start_data_line} ]; then echo From 6cfa01d2a12fc82e0c5957692d9dd294ceccda30 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 12 Feb 2017 12:09:25 +0100 Subject: [PATCH 15/41] Standarizing names on markdown files. Organizing images in different folders. --- CONTRIBUTING.md | 32 ++++++++--------- README.md | 44 ++++++++++++------------ imgs/{ => banners}/airgeddon_banner.png | Bin imgs/{ => banners}/bitcoin_donate.png | Bin imgs/{ => banners}/paypal_donate.png | Bin imgs/{ => flags}/cat.png | Bin imgs/{ => flags}/es.png | Bin imgs/{ => flags}/fr.png | Bin imgs/{ => flags}/gr.png | Bin imgs/{ => flags}/pt.png | Bin imgs/{ => flags}/ru.png | Bin imgs/{ => flags}/us.png | Bin imgs/{ => icons}/airgeddon_icon.png | Bin 13 files changed, 38 insertions(+), 38 deletions(-) rename imgs/{ => banners}/airgeddon_banner.png (100%) rename imgs/{ => banners}/bitcoin_donate.png (100%) rename imgs/{ => banners}/paypal_donate.png (100%) rename imgs/{ => flags}/cat.png (100%) rename imgs/{ => flags}/es.png (100%) rename imgs/{ => flags}/fr.png (100%) rename imgs/{ => flags}/gr.png (100%) rename imgs/{ => flags}/pt.png (100%) rename imgs/{ => flags}/ru.png (100%) rename imgs/{ => flags}/us.png (100%) rename imgs/{ => icons}/airgeddon_icon.png (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57094bd67..7b10ee6d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,12 +21,12 @@ Please note we have a code of conduct, please follow it in all your interactions 2. Respect the **tab indentation**, code style and the **UTF-8** format. 3. Use **LF** (Unix) line break type (not CR or CRLF). 4. Use [Shellcheck] to search for errors and warnings on code. (Thanks [xtonousou] for the tip :wink:) -5. Increase the version numbers in `airgeddon.sh` and in [README] to the new version that the script represents. The versioning scheme we use is *X.YZ*. Where: +5. Increase the version numbers in `airgeddon.sh` and in [Readme] to the new version that the script represents. The versioning scheme we use is *X.YZ*. Where: - *X* is a major release with a new menu (e.g. WPS menu) - *Y* is a minor release with a new feature for an existing menu or a new submenu for an existing feature - *Z* is a minor release with new bug fixes, small modifications or code improvements 6. Update the date on `airgeddon.sh` under shebang, if appropriate. -7. Direct push to [master] is not allowed. Pull Requests require revision and approvement. +7. Direct push to [Master] is not allowed. Pull Requests require revision and approvement. *Be sure to merge the latest from "upstream" before making a pull request!* @@ -40,8 +40,8 @@ Please note we have a code of conduct, please follow it in all your interactions ## Beta Testers -1. Download the master version or the beta testing version from the development branch called [dev]. Temporary branches may be existing for specific features that can be tested too. -2. Report any issues or bugs by mail [v1s1t0r.1s.h3r3@gmail.com] or submit issues requests [here]. +1. Download the master version or the beta testing version from the development branch called [Dev]. Temporary branches may be existing for specific features that can be tested too. +2. Report any issues or bugs by mail [v1s1t0r.1s.h3r3@gmail.com] or submit issues requests [Here]. --- @@ -114,8 +114,8 @@ members of the project's leadership. ### Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][Homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][Version] --- @@ -132,18 +132,18 @@ If you enjoyed the script, feel free to donate. Invite me to a coffee through Pa -[![paypal][paypal]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) +[![Paypal][Paypal]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG)   -[![bitcoin][bitcoin]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) +[![Bitcoin][Bitcoin]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +[Homepage]: http://contributor-covenant.org +[Version]: http://contributor-covenant.org/version/1/4/ [Shellcheck]: https://github.com/koalaman/shellcheck "shellcheck.hs" -[here]: https://github.com/v1s1t0r1sh3r3/airgeddon/issues/new -[master]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/master -[dev]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/dev +[Here]: https://github.com/v1s1t0r1sh3r3/airgeddon/issues/new +[Master]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/master +[Dev]: https://github.com/v1s1t0r1sh3r3/airgeddon/tree/dev [xtonousou]: https://github.com/xtonousou "xT" -[README]: README.md -[paypal]: /imgs/paypal_donate.png "Show me the money!" -[bitcoin]: /imgs/bitcoin_donate.png "Show me the money!" +[Readme]: README.md +[Paypal]: /imgs/banners/paypal_donate.png "Show me the money!" +[Bitcoin]: /imgs/banners/bitcoin_donate.png "Show me the money!" diff --git a/README.md b/README.md index aa4640661..0335e106a 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ -# :satellite: airgeddon [![version-shield]](CHANGELOG.md) [![bash4.2-shield]](http://tldp.org/LDP/abs/html/bashver4.html#AEN21220) [![license-shield]](LICENSE.md) [![paypal-shield]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) [![bitcoin-shield]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) +# :satellite: airgeddon [![Version-shield]](CHANGELOG.md) [![Bash4.2-shield]](http://tldp.org/LDP/abs/html/bashver4.html#AEN21220) [![License-shield]](LICENSE.md) [![Paypal-shield]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) [![Bitcoin-shield]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) This is a multi-use bash script for Linux systems to audit wireless networks. -![banner] +![Banner] --- @@ -137,13 +137,13 @@ Even with no initial error, it will maybe show itself later. Always use bash! ### Supported Languages -![English][english] English
-![Spanish][spanish] Spanish
-![French][french] French
-![Catalan][catalan] Catalan
-![Portuguese][portuguese] Portuguese
-![Russian][russian] Russian
-![Greek][greek] Greek
+![English][English] English
+![Spanish][Spanish] Spanish
+![French][French] French
+![Catalan][Catalan] Catalan
+![Portuguese][Portuguese] Portuguese
+![Russian][Russian] Russian
+![Greek][Greek] Greek
--- @@ -220,14 +220,14 @@ Use it only on your own networks or with the network's owner permission.
- [Kcdtv] → WPSPin -[banner]: /imgs/airgeddon_banner.png "We will conquer the earth!!" -[english]: /imgs/us.png "English" -[spanish]: /imgs/es.png "Spanish" -[french]: /imgs/fr.png "French" -[catalan]: /imgs/cat.png "Catalan" -[portuguese]: /imgs/pt.png "Portuguese" -[russian]: /imgs/ru.png "Russian" -[greek]: /imgs/gr.png "Greek" +[Banner]: /imgs/banners/airgeddon_banner.png "We will conquer the earth!!" +[English]: /imgs/flags/us.png "English" +[Spanish]: /imgs/flags/es.png "Spanish" +[French]: /imgs/flags/fr.png "French" +[Catalan]: /imgs/flags/cat.png "Catalan" +[Portuguese]: /imgs/flags/pt.png "Portuguese" +[Russian]: /imgs/flags/ru.png "Russian" +[Greek]: /imgs/flags/gr.png "Greek" [Requirements]: #requirements [Languages]: #supported-languages @@ -235,11 +235,11 @@ Use it only on your own networks or with the network's owner permission.
[Contributing]: CONTRIBUTING.md [Changelog]: CHANGELOG.md -[version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" -[bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" -[license-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" -[paypal-shield]: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&colorA=002f86&colorB=009cde "Show me the money!" -[bitcoin-shield]: https://img.shields.io/badge/donate-bitcoin-blue.svg?style=flat-square&colorA=273133&colorB=f7931a "Show me the money!" +[Version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" +[License-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" +[Paypal-shield]: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&colorA=002f86&colorB=009cde "Show me the money!" +[Bitcoin-shield]: https://img.shields.io/badge/donate-bitcoin-blue.svg?style=flat-square&colorA=273133&colorB=f7931a "Show me the money!" [Wifislax]: http://www.wifislax.com [BlackArch]: https://blackarch.org diff --git a/imgs/airgeddon_banner.png b/imgs/banners/airgeddon_banner.png similarity index 100% rename from imgs/airgeddon_banner.png rename to imgs/banners/airgeddon_banner.png diff --git a/imgs/bitcoin_donate.png b/imgs/banners/bitcoin_donate.png similarity index 100% rename from imgs/bitcoin_donate.png rename to imgs/banners/bitcoin_donate.png diff --git a/imgs/paypal_donate.png b/imgs/banners/paypal_donate.png similarity index 100% rename from imgs/paypal_donate.png rename to imgs/banners/paypal_donate.png diff --git a/imgs/cat.png b/imgs/flags/cat.png similarity index 100% rename from imgs/cat.png rename to imgs/flags/cat.png diff --git a/imgs/es.png b/imgs/flags/es.png similarity index 100% rename from imgs/es.png rename to imgs/flags/es.png diff --git a/imgs/fr.png b/imgs/flags/fr.png similarity index 100% rename from imgs/fr.png rename to imgs/flags/fr.png diff --git a/imgs/gr.png b/imgs/flags/gr.png similarity index 100% rename from imgs/gr.png rename to imgs/flags/gr.png diff --git a/imgs/pt.png b/imgs/flags/pt.png similarity index 100% rename from imgs/pt.png rename to imgs/flags/pt.png diff --git a/imgs/ru.png b/imgs/flags/ru.png similarity index 100% rename from imgs/ru.png rename to imgs/flags/ru.png diff --git a/imgs/us.png b/imgs/flags/us.png similarity index 100% rename from imgs/us.png rename to imgs/flags/us.png diff --git a/imgs/airgeddon_icon.png b/imgs/icons/airgeddon_icon.png similarity index 100% rename from imgs/airgeddon_icon.png rename to imgs/icons/airgeddon_icon.png From 91eb83a373829f1326a3c74928b00b48cbb67af4 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 12 Feb 2017 21:12:36 +0100 Subject: [PATCH 16/41] Improved distro detection for some arm Linux --- CHANGELOG.md | 1 + airgeddon.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e3bcaf1b..de25b667d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - README.md major modifications - Added CONTRIBUTING.md - Unexpected errors on wash scanning are controlled now + - Improved distro detection for some arm Linux ###6.0 - New system for possible tool aliases checking the requirements diff --git a/airgeddon.sh b/airgeddon.sh index 2b9725a5d..a5a66da73 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -10447,6 +10447,10 @@ function detect_distro_phase2() { extra_os_info=$(cat < ${osversionfile_dir}"os-release" | grep "PRETTY_NAME") if [[ "${extra_os_info}" =~ BlackArch ]]; then distro="BlackArch" + elif [[ "${extra_os_info}" =~ Kali ]]; then + #Kali is intentionally here too to avoid some Kali arm distro bad detection + distro="Kali" + is_arm=1 fi fi fi @@ -10472,6 +10476,8 @@ function detect_arm_architecture() { distro="${distro} arm" is_arm=1 fi + elif [[ "${distro}" != "Unknown Linux" ]] && [[ "${is_arm}" -eq 1 ]]; then + distro="${distro} arm" fi } From b424c32fd8902ed323ef592dba95184763fd468f Mon Sep 17 00:00:00 2001 From: Luan Date: Tue, 14 Feb 2017 00:04:56 -0200 Subject: [PATCH 17/41] Updated portuguese translation I made some corrections changes and improvements to make the language simple and beautiful --- airgeddon.sh | 58 ++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index a5a66da73..9b42e705c 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -347,7 +347,7 @@ function language_strings() { et_misc_texts["SPANISH",4]="Con este ataque has de usar un sniffer externo para intentar obtener contraseñas de los clientes conectados a la red" et_misc_texts["FRENCH",4]="Avec cette attaque, vous devez utiliser un sniffeur pour tenter d'obtenir les mots de passe des clients connectés au réseau" et_misc_texts["CATALAN",4]="Amb aquest atac has d'utilitzar un sniffer extern per intentar obtenir contrasenyes dels clients connectats a la xarxa" - et_misc_texts["PORTUGUESE",4]="Com este ataque você tem que usar um sniffer externa para tentar obter as senhas dos clientes conectados à rede" + et_misc_texts["PORTUGUESE",4]="Com este ataque você tem que usar um sniffer externo para tentar obter as senhas dos clientes conectados à rede" et_misc_texts["RUSSIAN",4]="С этой атакой вам нужно использовать внешний сниффер для попытки получить пароли клиентов, подключённых к сети" et_misc_texts["RUSSIAN",4]="С этой атакой вам нужно использовать внешний сниффер для попытки получить пароли клиентов, подключённых к сети" et_misc_texts["GREEK",4]="Με αυτή την επίθεση θα πρέπει να χρησιμοποιήσετε έναν εξωτερικό sniffer για να μπορέσετε να υποκλέψετε κωδικούς πρόσβασης από τους χρήστες που είναι συνδεδεμένοι στο δίκτυο" @@ -435,7 +435,7 @@ function language_strings() { et_misc_texts["SPANISH",15]="Portal de Internet" et_misc_texts["FRENCH",15]="Portail Internet" et_misc_texts["CATALAN",15]="Portal d'Internet" - et_misc_texts["PORTUGUESE",15]="Portal Internet" + et_misc_texts["PORTUGUESE",15]="Portal de Internet" et_misc_texts["RUSSIAN",15]="Интернет-портал" et_misc_texts["GREEK",15]="Internet Portal" @@ -660,7 +660,7 @@ function language_strings() { arr["SPANISH",15]="Esta interfaz ha cambiado su nombre al ponerse en modo managed. Se ha seleccionado automáticamente" arr["FRENCH",15]="Le nom de l'interface a changé lors du passage en mode managed. Elle a été sélectionnée automatiquement" arr["CATALAN",15]="Aquesta interfície ha canviat de nom al posar-la en mode managed. S'ha triat automàticament" - arr["PORTUGUESE",15]="Esta interface mudou de nome, colocando em modo managed e selecionando automaticamente" + arr["PORTUGUESE",15]="Esta interface mudou de nome ao ser colocanda em modo managed. Ela foi selecionanda automaticamente" arr["RUSSIAN",15]="Интерфейс изменил имя во время перевода в управляемый режим. Выбран автоматически" arr["GREEK",15]="Η διεπάφη άλλαξε όνομα καθώς ήταν σε ετερόκλητη κατάσταση. Επιλέχθηκε αυτόματα" @@ -708,7 +708,7 @@ function language_strings() { arr["SPANISH",21]="Esta interfaz ha cambiado su nombre al ponerla en modo monitor. Se ha seleccionado automáticamente" arr["FRENCH",21]="Le nom de l'interface à changé lors de l'activation du mode moniteur. Elle a été automatiquement sélectionnée" arr["CATALAN",21]="Aquesta interfície ha canviat de nom al posar-la en mode monitor. S'ha seleccionat automàticament" - arr["PORTUGUESE",21]="Esta interface mudou de nome, colocando em modo monitor e selecionando automaticamente" + arr["PORTUGUESE",21]="Esta interface mudou de nome ao ser colocanda em modo monitor. Ela foi selecionanda automaticamente" arr["RUSSIAN",21]="Этот интерфейс изменил своё имя во время перевода в режим монитора. Выбран автоматически" arr["GREEK",21]="Η διεπαφή άλλαξε όνομα καθώς ήταν σε κατάσταση παρακολούθησης" @@ -732,7 +732,7 @@ function language_strings() { arr["SPANISH",24]="Selecciona una interfaz para trabajar con ella :" arr["FRENCH",24]="Sélectionnez l'interface pour travailler :" arr["CATALAN",24]="Seleccionar una interfície per treballar-hi :" - arr["PORTUGUESE",24]="Seleccionar uma interface para trabalhar :" + arr["PORTUGUESE",24]="Selecione uma interface para trabalhar :" arr["RUSSIAN",24]="Выберите интерфейс для работы :" arr["GREEK",24]="Επιλέξτε διεπαφή :" @@ -1100,7 +1100,7 @@ function language_strings() { arr["SPANISH",70]="Sólo un objetivo detectado. Se ha seleccionado automáticamente" arr["FRENCH",70]="Un seul réseau a été détecté. Il a été automatiquement sélectionné" arr["CATALAN",70]="Només un objectiu detectat. Seleccionat automàticament" - arr["PORTUGUESE",70]="Apenas uma rede encontrada. A rede foi selecionada automaticamente" + arr["PORTUGUESE",70]="Apenas uma rede encontrada. Ela foi selecionada automaticamente" arr["RUSSIAN",70]="Обнаружена только одна цель. Выбрана автоматически" arr["GREEK",70]="Εντοπίστηκε μόνο ένας στόχος. Επιλέχθηκε αυτόματα" @@ -1148,7 +1148,7 @@ function language_strings() { arr["SPANISH",76]="Opción del menú no válida" arr["FRENCH",76]="Option erronée" arr["CATALAN",76]="Opció del menú no vàlida" - arr["PORTUGUESE",76]="Opção do menu inválida" + arr["PORTUGUESE",76]="Opção inválida" arr["RUSSIAN",76]="Выбрана недействительная опция" arr["GREEK",76]="Επιλέχθηκε άκυρη επιλογή μενού" @@ -1220,7 +1220,7 @@ function language_strings() { arr["SPANISH",85]="Enviadme errores o sugerencias a ${mail}" arr["FRENCH",85]="Envoyer des erreurs ou des suggestions à ${mail}" arr["CATALAN",85]="Envieu-me errorrs o suggeriments a ${mail}" - arr["PORTUGUESE",85]="Enviar erros ou sugestões para ${mail}" + arr["PORTUGUESE",85]="Envie erros ou sugestões para ${mail}" arr["RUSSIAN",85]="Отправляйте ошибки и предложения мне на почту ${mail}" arr["GREEK",85]="Στείλτε μου αναφορές για bugs ή συστάσεις στο ${mail}" @@ -1508,7 +1508,7 @@ function language_strings() { arr["SPANISH",121]="5. Capturar Handshake" arr["FRENCH",121]="5. Capture du Handshake" arr["CATALAN",121]="5. Captura Handshake" - arr["PORTUGUESE",121]="5. Captura de Handshake" + arr["PORTUGUESE",121]="5. Capturar Handshake" arr["RUSSIAN",121]="5. Захват рукопожатия" arr["GREEK",121]="5. Καταγράψτε την Χειραψία" @@ -1532,7 +1532,7 @@ function language_strings() { 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]="Modo de monitor necessário para captura" + arr["PORTUGUESE",124]="Modo monitor necessário para captura" arr["RUSSIAN",124]="для захвата необходим режим монитора" arr["GREEK",124]="χρειάζεται η κατάσταση παρακολούθησης για την καταγραφή" @@ -1540,7 +1540,7 @@ function language_strings() { arr["SPANISH",125]="No hay una red objetivo válida seleccionada. Serás redirigido para seleccionar una" arr["FRENCH",125]="Le choix du réseau cible est incorrect. Vous allez être redirigé vers le menu de sélection pour effectuer un nouveau choix" arr["CATALAN",125]="No hi ha una xarxa objectiu vàlida seleccionada. Seràs redirigit per seleccionar una" - arr["PORTUGUESE",125]="Nenhuma rede válida selecionada. Você será redirecionado para selecionar um" + arr["PORTUGUESE",125]="Nenhuma rede válida selecionada. Você será redirecionado para selecionar uma" arr["RUSSIAN",125]="Не выбрана подходящая целевая сеть. Вы будете перенаправлены на выбор сети" arr["GREEK",125]="Δεν έχει επιλεχθεί κάποιο έγκυρο δίκτυο-στόχος. Θα καθοδηγηθείτε ώστε να επιλέξετε ένα" @@ -1564,7 +1564,7 @@ function language_strings() { arr["SPANISH",128]="Selecciona una interfaz wifi para poder realizar más acciones que con una interfaz ethernet" arr["FRENCH",128]="Veuillez sélectionner une carte wifi au lieu d'une carte ethernet afin d'être en mesure de réaliser plus d'actions" arr["CATALAN",128]="Seleccioneu una targeta wifi per treballar amb la finalitat de ser capaç de fer més accions que amb una interfície ethernet" - arr["PORTUGUESE",128]="Selecione uma interface wifi para realizar mais ações do que com interface ethernet" + arr["PORTUGUESE",128]="Selecione uma interface wifi para realizar mais ações do que com uma interface ethernet" arr["RUSSIAN",128]="Выберите wifi карту для работы, чтобы вы могли выполнить больше действий, чем с ethernet интерфейсом" arr["GREEK",128]="Επιλέξτε κάρτα wifi ώστε να μπορείτε να έχετε περισσοτερες επιλογές από μία διεπαφή ethernet" @@ -1596,7 +1596,7 @@ function language_strings() { arr["SPANISH",132]="Limpiar un fichero de Handshake se recomienda solo para ficheros grandes. Es mejor hacer una copia de seguridad antes, a veces el fichero se puede corromper al limpiarlo" arr["FRENCH",132]="Épurer le fichier contenant le Handshake est seulement recommandable si le fichier est volumineux. Si vous décidez d'épurer le fichier il est conseillé de faire une copie de sauvegarde du fichier originel, l'opération de nettoyage comporte des risques et peut le rendre illisible" arr["CATALAN",132]="Netejar un fitxer de Handshake es recomana només per a fitxers grans. És millor fer una còpia de seguretat abans, de vegades el fitxer es pot corrompre al netejar-lo" - arr["PORTUGUESE",132]="Limpar um Handshake é recomendado apenas para arquivos grandes. Melhor fazer um backup antes de otimizar o arquivo; as vezes pode corromper o arquivo ao limpar" + arr["PORTUGUESE",132]="Limpar um Handshake é recomendado apenas para arquivos grandes. Melhor fazer um backup antes de otimizar o arquivo; as vezes o arquivo pode corromper ao limpar" arr["RUSSIAN",132]="Очистка файла рукопожатия рекомендована только для файлов больших размеров. Лучше иметь резервную копию, иногда во время очистки файл может быть повреждён" arr["GREEK",132]="Ο καθαρισμός ενός αρχείου Χειραψίας συνιστάται μόνο για μεγάλου μεγέθους αρχεία. Καλύτερα κρατήστε ένα backup, μερικές φορές το αρχείο μπορεί να καταστραφεί κατά τη διάρκεια του καθαρισμού" @@ -1612,7 +1612,7 @@ function language_strings() { arr["SPANISH",134]="Si tu Linux es una máquina virtual, es posible que las tarjetas wifi integradas sean detectadas como ethernet. Utiliza una tarjeta wifi externa usb" arr["FRENCH",134]="Si votre système d'exploitation Linux est lancé dans une machine virtuelle, il est probable que les cartes wifi internes soient détectées comme des cartes ethernet. Il vaut mieux dans ce cas utiliser un dispositif wifi usb" arr["CATALAN",134]="Si el teu Linux és a una màquina virtual, és possible que les targetes wifi integrades siguin detectades com ethernet. Utilitza una targeta wifi externa usb" - arr["PORTUGUESE",134]="Se seu Linux é uma máquina virtual, suas placas wireless integradas são detectadas como ethernet. Use uma placa usb externa" + arr["PORTUGUESE",134]="Se seu Linux for uma máquina virtual, suas placas wireless integradas são detectadas como ethernet. Use uma placa usb externa" arr["RUSSIAN",134]="Если ваш Linux в виртуально машине, то интегрированная wifi карта может определиться как Ethernet. Используйте внешнюю usb wifi карту" arr["GREEK",134]="Αν το Linux σας είναι εικονική μηχανή, είναι πιθανόν οι ενσωματωμένες κάρτες wifi να εντοπιστούν σαν ethernet. Χρησιμοποιήστε μία εξωτερική usb κάρτα wifi" @@ -1628,7 +1628,7 @@ function language_strings() { arr["SPANISH",136]="La obtención de un Handshake es solo para redes con encriptación WPA o WPA2" arr["FRENCH",136]="L'obtention d'un Handshake est seulement possible sur des réseaux protégés par chiffrement WPA ou WPA2" arr["CATALAN",136]="L'obtenció d'un Handshake és només per a xarxes amb encriptació WPA o WPA2" - arr["PORTUGUESE",136]="A obtenção de um Handshake é somente para redes com criptografia WPA ou WPA2" + arr["PORTUGUESE",136]="A obtenção de um Handshake só é possível em redes com criptografia WPA ou WPA2" arr["RUSSIAN",136]="Получение рукопожатия только для сетей с шифрованием WPA или WPA2" arr["GREEK",136]="Η απόκτηση μιας Χειραψίας ισχύει μόνο σε δίκτυα με κρυπτογράφηση WPA ή WPA2" @@ -1692,7 +1692,7 @@ function language_strings() { arr["SPANISH",144]="No cierres manualmente ninguna ventana, el script lo hará cuando proceda. En unos 20 segundos como máximo sabrás si conseguiste el Handshake" arr["FRENCH",144]="Ne pas fermer une des fenêtres manuellement: Le script va le faire automatiquement si besoin est. Vos saurez dans tout a plus 20 secondes si avez obtenu le Handshake" arr["CATALAN",144]="No tanquis manualment cap finestra, el script ho farà quan escaigui. En uns 20 segons com a màxim sabràs si vas aconseguir el Handshake" - arr["PORTUGUESE",144]="Não feche nenhuma janela manualmente, o script fechara quando necessário. Em cerca de 20 segundos no máximo você vai saber se você tem o Handshake" + arr["PORTUGUESE",144]="Não feche nenhuma janela manualmente, o script fechara quando necessário. Em cerca de 20 segundos no máximo você vai saber se tem o Handshake" arr["RUSSIAN",144]="Не закрывайте вручную какое-либо окно, скрипт сделает это когда нужно. Примерно в максимум 20 секунд вы узнаете, получили ли вы рукопожатие" arr["GREEK",144]="Μην επιχειρήσετε το κλείσιμο κάποιου παραθύρου χειροκίνητα, εάν χρειαστεί το script θα το κάνει μόνο του. Σε περίπου 20 δευτερόλεπτα το μέγιστο θα μάθετε αν αποκτήσατε την Χειραψία" @@ -1772,7 +1772,7 @@ function language_strings() { arr["SPANISH",154]="Introduce la ruta al fichero :" arr["FRENCH",154]="Entrez le chemin vers le fichier :" arr["CATALAN",154]="Introdueix la ruta al fitxer :" - arr["PORTUGUESE",154]="Digite o caminho para o arquivo :" + arr["PORTUGUESE",154]="Digite o caminho do arquivo :" arr["RUSSIAN",154]="Установить путь до файла :" arr["GREEK",154]="Θέστε μονοπάτι για το αρχείο :" @@ -1812,7 +1812,7 @@ function language_strings() { arr["SPANISH",159]="El fichero no necesita ser limpiado/optimizado" arr["FRENCH",159]="Le fichier n'a pas besoin d'être nettoyé/optimisé" arr["CATALAN",159]="El fitxer no necessita ser netejat/optimitzat" - arr["PORTUGUESE",159]="O arquivo não precisa ser limpos/otimizado" + arr["PORTUGUESE",159]="O arquivo não precisa ser limpo/otimizado" arr["RUSSIAN",159]="Файлу не требуется очистка/оптимизация" arr["GREEK",159]="Το αρχείο δεν χρειάζεται να καθαριστεί/βελτιστοποιηθεί" @@ -1964,7 +1964,7 @@ function language_strings() { arr["SPANISH",178]="Para desencriptar la clave de una red WPA/WPA2, el fichero de captura debe contener un Handshake" arr["FRENCH",178]="Pour cracker la clé d'un réseau WPA/WPA2 le fichier de capture doit contenir un Handshake" arr["CATALAN",178]="Per desencriptar la clau d'una xarxa WPA/WPA2 el fitxer de captura ha de contenir un Handshake" - arr["PORTUGUESE",178]="Para decifrar a senha de rede WPA/WPA2, o arquivo de captura deve conter um Handshake" + arr["PORTUGUESE",178]="Para decifrar a senha de uma rede WPA/WPA2, o arquivo de captura deve conter um Handshake" arr["RUSSIAN",178]="Для расшифровки ключа сетей WPA/WPA2, файл захвата должен содержать четырёхэтапное рукопожатие" arr["GREEK",178]="Για να αποκρυπτογραφήσετε το κλειδί ενός WPA/WPA2 δικτύου, το αρχείο καταγραφής πρέπει να περιέχει μία Χειραψία" @@ -2212,7 +2212,7 @@ function language_strings() { arr["SPANISH",209]="El juego de caracteres elegido es : [${normal_color}${showcharset}${blue_color}]" arr["FRENCH",209]="Le jeu de caractères définit est : [${normal_color}${showcharset}${blue_color}]" arr["CATALAN",209]="El joc de caràcters escollit és : [${normal_color}${showcharset}${blue_color}]" - arr["PORTUGUESE",209]="O conjunto de caracteres é:: [${normal_color}${showcharset}${blue_color}]" + arr["PORTUGUESE",209]="Conjunto de caracteres escolhido : [${normal_color}${showcharset}${blue_color}]" arr["RUSSIAN",209]="Символы для использования : [${normal_color}${showcharset}${blue_color}]" arr["GREEK",209]="Η συμβολοσειρά που θα χρησιμοποιηθεί είναι : [${normal_color}${showcharset}${blue_color}]" @@ -2244,7 +2244,7 @@ function language_strings() { arr["SPANISH",213]="Existe una nueva versión del script (v${airgeddon_last_version}). Será descargada" arr["FRENCH",213]="Une nouvelle version du script est disponible (v${airgeddon_last_version}). Lancement du téléchargement" arr["CATALAN",213]="Hi ha una nova versió dels script (v${airgeddon_last_version}). Serà descarregada" - arr["PORTUGUESE",213]="Uma nova versão do script (v${airgeddon_last_version}). Download será iniciado" + arr["PORTUGUESE",213]="Existe uma nova versão do script (v${airgeddon_last_version}). Download será iniciado" arr["RUSSIAN",213]="Существует новая версия скрипта (v${airgeddon_last_version}). Она будет загружена" arr["GREEK",213]="Υπάρχει νεότερη έκδοση του script (v${airgeddon_last_version}). Θα κατέβει" @@ -2260,7 +2260,7 @@ function language_strings() { arr["SPANISH",215]="Una contraseña WPA/WPA2 siempre tiene como mínimo una longitud de 8" arr["FRENCH",215]="Un mot de passe WPA/WPA2 a une longueur minimale de 8 caractères" arr["CATALAN",215]="Una contrasenya WPA/WPA2 sempre té com a mínim una longitud de 8" - arr["PORTUGUESE",215]="Uma senha WPA/WPA2 sempre tem no mínimo 8 caracteres" + arr["PORTUGUESE",215]="Uma senha WPA/WPA2 deve ter no mínimo 8 caracteres" arr["RUSSIAN",215]="WPA/WPA2 пароли всегда имеют длину минимум в 8 символов" arr["GREEK",215]="οι κωδικοί πρόσβασης WPA/WPA2 έχουν πάντα ελάχιστο μήκος 8" @@ -2268,7 +2268,7 @@ function language_strings() { arr["SPANISH",216]="No se encontraron redes con Handshake capturado en el fichero seleccionado" arr["FRENCH",216]="Aucun réseau avec son Handshake n'a été trouvé dans le fichier sélectionné" arr["CATALAN",216]="No s'han trobat xarxes amb Handshake capturat en el fitxer seleccionat" - arr["PORTUGUESE",216]="Nenhuma rede encontrada no arquivo Handshake capturado no arquivo selecionado" + arr["PORTUGUESE",216]="Nenhuma rede encontrada no arquivo Handshake selecionado " arr["RUSSIAN",216]="В выбранном файле сети с захваченным рукопожатием не найдены" arr["GREEK",216]="Δεν βρέθηκαν δίκτυα με Χειραψία στο επιλεγμένο αρχείο" @@ -2412,7 +2412,7 @@ function language_strings() { arr["SPANISH",234]="Enhorabuena!! Parece que la clave ha sido desencriptada" arr["FRENCH",234]="Félicitations!! Il semble que la clef a été décryptée" arr["CATALAN",234]="Enhorabona!! Sembla que la clau ha estat desencriptada" - arr["PORTUGUESE",234]="Parabéns!! Parece que a senha foi descriptografada" + arr["PORTUGUESE",234]="Parabéns!! Parece que a senha foi descriptografada" arr["RUSSIAN",234]="Поздравления!! Похоже на то, что ключ был расшифрован" arr["GREEK",234]="Συγχαρητήρια!! Φαίνεται πως το κλειδί αποκρυπτογραφήθηκε" @@ -2420,7 +2420,7 @@ function language_strings() { arr["SPANISH",235]="¿Quieres guardar el fichero de trofeo con la clave desencriptada? ${normal_color}[y/n]" arr["FRENCH",235]="Voulez-vous enregistrer le fichier trophée avec le mot de passe déchiffré? ${normal_color}[y/n]" arr["CATALAN",235]="¿Vols desar el fitxer de trofeu amb la clau desencriptada? ${normal_color}[y/n]" - arr["PORTUGUESE",235]="Você quer salvar arquivo com a senha descriptografado? ${normal_color}[y/n]" + arr["PORTUGUESE",235]="Você quer salvar arquivo com a senha descriptografada? ${normal_color}[y/n]" arr["RUSSIAN",235]="Вы хотите сохранить трофейный файл с расшифрованным паролем? ${normal_color}[y/n]" arr["GREEK",235]="Θέλετε να αποθηκεύσετε το αρχείο τρόπαιο με τον αποκρυπτογραφημένο κωδικό πρόσβασης; ${normal_color}[y/n]" @@ -2484,7 +2484,7 @@ function language_strings() { arr["SPANISH",243]="Fichero de reglas seleccionado: ${pink_color}${RULES}${normal_color}" arr["FRENCH",243]="Fichier règles sélectionné: ${pink_color}${RULES}${normal_color}" arr["CATALAN",243]="Fitxer de regles seleccionat: ${pink_color}${RULES}${normal_color}" - arr["PORTUGUESE",243]="Arquivo regras selecionadas: ${pink_color}${RULES}${normal_color}" + arr["PORTUGUESE",243]="Arquivo de regras selecionado: ${pink_color}${RULES}${normal_color}" arr["RUSSIAN",243]="Выбранный файл правил: ${pink_color}${RULES}${normal_color}" arr["GREEK",243]="Επιλεγμένο αρχείο κανόνων: ${pink_color}${RULES}${normal_color}" @@ -2492,7 +2492,7 @@ function language_strings() { arr["SPANISH",244]="Los ataques basados en reglas modifican las palabras de la lista del diccionario según las reglas escritas en el propio fichero de reglas. Son muy útiles. Algunas distros ya traen ficheros predefinidos de reglas (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" arr["FRENCH",244]="Les attaques basées sur des règles modifient les mots du dictionnaire selon les règles établies dans le fichier règles. Ils sont très utiles. Certaines distros comportent des fichiers de règles prédéfinies (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" arr["CATALAN",244]="Els atacs basats en regles modifiquen les paraules de la llista del diccionari segons les regles escrites en el propi fitxer de regles. Són molt útils. Algunes distros ja porten fitxers de regles predefinits (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" - arr["PORTUGUESE",244]="Ataques baseados em regras mudaram as palavras de um dicionário de acordo com as regras escritas. Eles são muito úteis. Algumas distros já possuem regras predefinidas em (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" + arr["PORTUGUESE",244]="Ataques baseados em regras mudam as palavras de um dicionário de acordo com as regras escritas. Eles são muito úteis. Algumas distros já possuem regras predefinidas em (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" arr["RUSSIAN",244]="Атака, основанная на правилах, изменяет слова из словаря в соответствии с правилами, написанными в самом файле правил. Они очень полезны. Некоторые дистрибутивы имеют предустановленные правила (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" arr["GREEK",244]="Οι επιθέσεις κανόνων αλλάζουν τις λέξεις του λεξικού ανάλογα με τους κανόνες που έχουν γραφτεί στο αρχείο κανόνων. Είναι πολύ χρήσιμοι. Κάποιες διανομές έχουν προκαθορισμένα αρχεία κανόνων (Kali: /usr/share/hashcat/rules // Wifislax: /opt/hashcat/rules)" @@ -2508,7 +2508,7 @@ function language_strings() { arr["SPANISH",246]="Cada vez que veas un texto con el prefijo ${cyan_color}${pending_of_translation}${pink_color} acrónimo de \"Pending of Translation\", significa que su traducción ha sido generada automáticamente y que aún está pendiente de revisión" arr["FRENCH",246]="Chaque fois que vous voyez un texte précédé par ${cyan_color}${pending_of_translation}${pink_color} acronyme de \"Pending of Translation\" cela signifie que la traduction a été faite automatiquement et est en attente de correction" arr["CATALAN",246]="Cada vegada que vegis un text amb el prefix ${cyan_color}${pending_of_translation}${pink_color} acrònim de \"Pending of Translation\", vol dir que la traducció ha estat generada automàticament i encara està pendent de revisió" - arr["PORTUGUESE",246]="Cada vez que você vê um texto com o prefixo ${cyan_color}${pending_of_translation}${pink_color} acrônimo para \"Pending of Translation\" significa que a tradução foi gerado automaticamente e ainda está pendente de revisão" + arr["PORTUGUESE",246]="Cada vez que você ver um texto com o prefixo ${cyan_color}${pending_of_translation}${pink_color} acrônimo para \"Pending of Translation\" significa que a tradução foi gerado automaticamente e ainda está pendente de revisão" arr["RUSSIAN",246]="Каждый раз, когда вы видите текст с префиксом ${cyan_color}${pending_of_translation}${pink_color} (акроним для \"Ожидает перевода\"), это означает, что перевод был сгенерирован автоматически и ещё ожидает проверки" arr["GREEK",246]="Κάθε φορά που θα βλέπετε κείμενο με πρόθεμα ${cyan_color}${pending_of_translation}${pink_color} ακρωνύμιο για \"Pending of Translation\", σημαίνει πως η μετάφραση δημιουργήθηκε αυτόματα και αναμένεται κριτική" @@ -3876,7 +3876,7 @@ function language_strings() { arr["SPANISH",417]="Ocurrió un error inesperado. Volviendo al menú" arr["FRENCH",417]="${pending_of_translation} Une erreur inattendue s'est produite, retour au menu" arr["CATALAN",417]="${pending_of_translation} Hi ha hagut un error inesperat, redirigint al menú" - arr["PORTUGUESE",417]="${pending_of_translation} Ocorreu um erro inesperado, redirecionando ao menu" + arr["PORTUGUESE",417]="Ocorreu um erro inesperado, retornando ao menu" arr["RUSSIAN",417]="${pending_of_translation} Непредвиденная ошибка, перенаправляя в меню" arr["GREEK",417]="${pending_of_translation} Παρουσιάστηκε μη αναμενόμενο σφάλμα, ανακατεύθυνση στο μενού" From 36ae1e9b4e1c6a3a871c448d8ca27b44f88c123e Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Tue, 14 Feb 2017 13:05:21 +0200 Subject: [PATCH 18/41] Updated Greek translations --- airgeddon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airgeddon.sh b/airgeddon.sh index 9b42e705c..8a0ced4e6 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3878,7 +3878,7 @@ function language_strings() { arr["CATALAN",417]="${pending_of_translation} Hi ha hagut un error inesperat, redirigint al menú" arr["PORTUGUESE",417]="Ocorreu um erro inesperado, retornando ao menu" arr["RUSSIAN",417]="${pending_of_translation} Непредвиденная ошибка, перенаправляя в меню" - arr["GREEK",417]="${pending_of_translation} Παρουσιάστηκε μη αναμενόμενο σφάλμα, ανακατεύθυνση στο μενού" + arr["GREEK",417]="Παρουσιάστηκε μη αναμενόμενο σφάλμα, γίνεται ανακατεύθυνση στο μενού" case "${3}" in "yellow") From 8e2d1823e0ee4fcbc6beb3af3d956c681606db4a Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 20:58:22 +0200 Subject: [PATCH 19/41] Impoved code: grep to awk pipes --- airgeddon.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) mode change 100644 => 100755 airgeddon.sh diff --git a/airgeddon.sh b/airgeddon.sh old mode 100644 new mode 100755 index 8a0ced4e6..053203766 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4064,7 +4064,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) + mode=$(iwconfig "${interface}" 2> /dev/null | awk '/Mode:/{print $4}' | cut -d ':' -f 2) if [[ ${mode} != "Monitor" ]]; then echo @@ -4095,7 +4095,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) + readarray -t IFACES_AND_MACS < <(ip link | awk '/^[0-9]+/&&!/lo/&&!/${interface}/{print $2}' | cut -d ':' -f 1) declare -gA ifaces_and_macs for iface_name in "${IFACES_AND_MACS[@]}"; do mac_item=$(cat < "/sys/class/net/${iface_name}/address" 2> /dev/null) @@ -4436,14 +4436,14 @@ function check_interface_mode() { return 0 fi - modemanaged=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | cut -d ':' -f 2 | cut -d ' ' -f 1) + modemanaged=$(iwconfig ${interface} 2> /dev/null | awk '/Mode:/{print $1}' | cut -d ':' -f 2) if [[ ${modemanaged} = "Managed" ]]; then ifacemode="Managed" return 0 fi - modemonitor=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) + modemonitor=$(iwconfig "${interface}" 2> /dev/null | awk '/Mode:/{print $4}' | cut -d ':' -f 2) if [[ ${modemonitor} = "Monitor" ]]; then ifacemode="Monitor" @@ -4620,7 +4620,7 @@ function select_internet_interface() { ;; esac - inet_ifaces=$(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) + inet_ifaces=$(ip link | awk '/^[0-9]+/&&!/lo/&&!/${interface}/{print $2}' | cut -d ':' -f 1) option_counter=0 for item in ${inet_ifaces}; do @@ -4692,7 +4692,7 @@ function select_interface() { current_menu="select_interface_menu" language_strings "${language}" 24 "green" print_simple_separator - ifaces=$(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v) + ifaces=$(ip link | awk '/^[0-9]+/&&!/lo/{print $2}' | cut -d ':' -f 1) option_counter=0 for item in ${ifaces}; do option_counter=$((option_counter + 1)) @@ -6365,7 +6365,7 @@ function manage_asking_for_rule_file() { #Validate the file to be cleaned function check_valid_file_to_clean() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA|WEP" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA|WEP/{ saved = $1; $1 = ""; print substr($0, 2) }') if [ "${nets_from_file}" = "" ]; then return 1 @@ -6398,7 +6398,7 @@ function check_valid_file_to_clean() { #Check if a bssid is present on a capture file to know if there is a Handshake with that bssid function check_bssid_in_captured_file() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA \([1-9][0-9]? handshake/{ saved = $1; $1 = ""; print substr($0, 2) }') echo if [ "${nets_from_file}" = "" ]; then @@ -6436,7 +6436,7 @@ function check_bssid_in_captured_file() { #Set the target vars to a bssid selecting them from a capture file which has a Handshake function select_wpa_bssid_target_from_captured_file() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA \([1-9][0-9]? handshake/{ saved = $1; $1 = ""; print substr($0, 2) }') echo if [ "${nets_from_file}" = "" ]; then @@ -6635,7 +6635,7 @@ function manage_hashcat_pot() { ask_yesno 235 if [ ${yesno} = "y" ]; then - hashcat_potpath=$(env | grep ^HOME | awk -F = '{print $2}') + hashcat_potpath=$(env | awk -F = '/^HOME/{print $2}') lastcharhashcat_potpath=${hashcat_potpath: -1} if [ "${lastcharhashcat_potpath}" != "/" ]; then hashcat_potpath="${hashcat_potpath}/" @@ -6663,7 +6663,7 @@ function manage_ettercap_log() { ask_yesno 302 if [ ${yesno} = "y" ]; then ettercap_log=1 - default_ettercap_logpath=$(env | grep ^HOME | awk -F = '{print $2}') + default_ettercap_logpath=$(env | awk -F = '/^HOME/{print $2}') lastcharettercaplogpath=${default_ettercap_logpath: -1} if [ "${lastcharettercaplogpath}" != "/" ]; then ettercap_logpath="${default_ettercap_logpath}/" @@ -6686,7 +6686,7 @@ function manage_bettercap_log() { ask_yesno 302 if [ ${yesno} = "y" ]; then bettercap_log=1 - default_bettercap_logpath=$(env | grep ^HOME | awk -F = '{print $2}') + default_bettercap_logpath=$(env | awk -F = '/^HOME/{print $2}') lastcharbettercaplogpath=${default_bettercap_logpath: -1} if [ "${lastcharbettercaplogpath}" != "/" ]; then bettercap_logpath="${default_bettercap_logpath}/" @@ -6705,7 +6705,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') + default_et_captive_portal_logpath=$(env | awk -F = '/^HOME/{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} if [ "${lastcharetcaptiveportallogpath}" != "/" ]; then et_captive_portal_logpath="${default_et_captive_portal_logpath}/" @@ -8860,7 +8860,7 @@ function capture_handshake_evil_twin() { kill "${processidcapture}" &> /dev/null if [ "${handshake_captured}" = "y" ]; then - handshakepath=$(env | grep ^HOME | awk -F = '{print $2}') + handshakepath=$(env | awk -F = '/^HOME/{print $2}') lastcharhandshakepath=${handshakepath: -1} if [ "${lastcharhandshakepath}" != "/" ]; then handshakepath="${handshakepath}/" @@ -9097,7 +9097,7 @@ function attack_handshake_menu() { kill "${processidcapture}" &> /dev/null if [ "${handshake_captured}" = "y" ]; then - handshakepath=$(env | grep ^HOME | awk -F = '{print $2}') + handshakepath=$(env | awk -F = '/^HOME/{print $2}') lastcharhandshakepath=${handshakepath: -1} if [ "${lastcharhandshakepath}" != "/" ]; then handshakepath="${handshakepath}/" @@ -9232,7 +9232,7 @@ function explore_for_targets_option() { rm -rf "${tmpdir}clts.csv" > /dev/null 2>&1 recalculate_windows_sizes xterm +j -bg black -fg white -geometry "${g1_topright_window}" -T "Exploring for targets" -e airodump-ng -w "${tmpdir}nws" "${interface}" > /dev/null 2>&1 - targetline=$(cat < "${tmpdir}nws-01.csv" | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}') + targetline=$(cat < "${tmpdir}nws-01.csv" | awk '/Station|Cliente/{print NR}') targetline=$((targetline - 1)) head -n "${targetline}" "${tmpdir}nws-01.csv" &> "${tmpdir}nws.csv" @@ -10188,7 +10188,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - iwversion=$(iwconfig --version | grep version | awk '{print $4}') + iwversion=$(iwconfig --version | awk '/version/{print $4}') iwcmdfix="" if [ "${iwversion}" -lt 30 ]; then iwcmdfix=" 2> /dev/null | grep Mode: " @@ -10216,7 +10216,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') + bettercap_version=$(bettercap -v 2> /dev/null | awk '/^bettercap [0-9]/{print $2}') } #Determine bully version @@ -10229,9 +10229,9 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') + reaver_version=$(reaver -h 2>&1 > /dev/null | awk '/^Reaver v[0-9]/{print $2}') if [ -z "${reaver_version}" ]; then - reaver_version=$(reaver -h 2> /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') + reaver_version=$(reaver -h 2> /dev/null | awk '/^Reaver v[0-9]/{print $2}') fi reaver_version=${reaver_version#"v"} } @@ -10935,7 +10935,7 @@ function detect_screen_resolution() { resolution_detected=0 if hash xdpyinfo 2> /dev/null; then - resolution=$(xdpyinfo 2> /dev/null | grep -A 3 "screen #0" | grep "dimensions" | tr -s " " | cut -d " " -f 3 | grep "x") + resolution=$(xdpyinfo 2> /dev/null | awk '{if ($0 ~ /screen #0/) pat1=$1; if ($0 ~ /dimensions/) pat2=$2}{if (pat1 && pat2) print pat2; pat=pat2=""}') if [ "$?" = "0" ]; then resolution_detected=1 @@ -11190,7 +11190,7 @@ function check_internet_access() { #Check for default route on an interface function check_default_route() { - route | grep "${1}" | grep "default" > /dev/null + route | awk "/${1}/&&/default/{print}" > /dev/null return $? } From d8746c77ca37a03fdf64a31453c1b5f2dd838bb9 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 20:58:44 +0200 Subject: [PATCH 20/41] Impoved code: grep to awk pipes --- airgeddon.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 airgeddon.sh diff --git a/airgeddon.sh b/airgeddon.sh old mode 100755 new mode 100644 From 7132a62eea0b156d60539e26951c4ad7ad3de91a Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 21:11:59 +0200 Subject: [PATCH 21/41] Revert "Impoved code: grep to awk pipes" This reverts commit d8746c77ca37a03fdf64a31453c1b5f2dd838bb9. --- airgeddon.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 airgeddon.sh diff --git a/airgeddon.sh b/airgeddon.sh old mode 100644 new mode 100755 From a808afcc14b90ae9ff8df41af759b1ae8d2c6417 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 21:12:26 +0200 Subject: [PATCH 22/41] Impoved code: grep to awk pipes This reverts commit 8e2d1823e0ee4fcbc6beb3af3d956c681606db4a. --- airgeddon.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) mode change 100755 => 100644 airgeddon.sh diff --git a/airgeddon.sh b/airgeddon.sh old mode 100755 new mode 100644 index 053203766..8a0ced4e6 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4064,7 +4064,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - mode=$(iwconfig "${interface}" 2> /dev/null | awk '/Mode:/{print $4}' | cut -d ':' -f 2) + mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) if [[ ${mode} != "Monitor" ]]; then echo @@ -4095,7 +4095,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - readarray -t IFACES_AND_MACS < <(ip link | awk '/^[0-9]+/&&!/lo/&&!/${interface}/{print $2}' | cut -d ':' -f 1) + readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs for iface_name in "${IFACES_AND_MACS[@]}"; do mac_item=$(cat < "/sys/class/net/${iface_name}/address" 2> /dev/null) @@ -4436,14 +4436,14 @@ function check_interface_mode() { return 0 fi - modemanaged=$(iwconfig ${interface} 2> /dev/null | awk '/Mode:/{print $1}' | cut -d ':' -f 2) + modemanaged=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | cut -d ':' -f 2 | cut -d ' ' -f 1) if [[ ${modemanaged} = "Managed" ]]; then ifacemode="Managed" return 0 fi - modemonitor=$(iwconfig "${interface}" 2> /dev/null | awk '/Mode:/{print $4}' | cut -d ':' -f 2) + modemonitor=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) if [[ ${modemonitor} = "Monitor" ]]; then ifacemode="Monitor" @@ -4620,7 +4620,7 @@ function select_internet_interface() { ;; esac - inet_ifaces=$(ip link | awk '/^[0-9]+/&&!/lo/&&!/${interface}/{print $2}' | cut -d ':' -f 1) + inet_ifaces=$(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) option_counter=0 for item in ${inet_ifaces}; do @@ -4692,7 +4692,7 @@ function select_interface() { current_menu="select_interface_menu" language_strings "${language}" 24 "green" print_simple_separator - ifaces=$(ip link | awk '/^[0-9]+/&&!/lo/{print $2}' | cut -d ':' -f 1) + ifaces=$(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v) option_counter=0 for item in ${ifaces}; do option_counter=$((option_counter + 1)) @@ -6365,7 +6365,7 @@ function manage_asking_for_rule_file() { #Validate the file to be cleaned function check_valid_file_to_clean() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA|WEP/{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA|WEP" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') if [ "${nets_from_file}" = "" ]; then return 1 @@ -6398,7 +6398,7 @@ function check_valid_file_to_clean() { #Check if a bssid is present on a capture file to know if there is a Handshake with that bssid function check_bssid_in_captured_file() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA \([1-9][0-9]? handshake/{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') echo if [ "${nets_from_file}" = "" ]; then @@ -6436,7 +6436,7 @@ function check_bssid_in_captured_file() { #Set the target vars to a bssid selecting them from a capture file which has a Handshake function select_wpa_bssid_target_from_captured_file() { - nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | awk '/WPA \([1-9][0-9]? handshake/{ saved = $1; $1 = ""; print substr($0, 2) }') + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') echo if [ "${nets_from_file}" = "" ]; then @@ -6635,7 +6635,7 @@ function manage_hashcat_pot() { ask_yesno 235 if [ ${yesno} = "y" ]; then - hashcat_potpath=$(env | awk -F = '/^HOME/{print $2}') + hashcat_potpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharhashcat_potpath=${hashcat_potpath: -1} if [ "${lastcharhashcat_potpath}" != "/" ]; then hashcat_potpath="${hashcat_potpath}/" @@ -6663,7 +6663,7 @@ function manage_ettercap_log() { ask_yesno 302 if [ ${yesno} = "y" ]; then ettercap_log=1 - default_ettercap_logpath=$(env | awk -F = '/^HOME/{print $2}') + default_ettercap_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharettercaplogpath=${default_ettercap_logpath: -1} if [ "${lastcharettercaplogpath}" != "/" ]; then ettercap_logpath="${default_ettercap_logpath}/" @@ -6686,7 +6686,7 @@ function manage_bettercap_log() { ask_yesno 302 if [ ${yesno} = "y" ]; then bettercap_log=1 - default_bettercap_logpath=$(env | awk -F = '/^HOME/{print $2}') + default_bettercap_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharbettercaplogpath=${default_bettercap_logpath: -1} if [ "${lastcharbettercaplogpath}" != "/" ]; then bettercap_logpath="${default_bettercap_logpath}/" @@ -6705,7 +6705,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - default_et_captive_portal_logpath=$(env | awk -F = '/^HOME/{print $2}') + default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} if [ "${lastcharetcaptiveportallogpath}" != "/" ]; then et_captive_portal_logpath="${default_et_captive_portal_logpath}/" @@ -8860,7 +8860,7 @@ function capture_handshake_evil_twin() { kill "${processidcapture}" &> /dev/null if [ "${handshake_captured}" = "y" ]; then - handshakepath=$(env | awk -F = '/^HOME/{print $2}') + handshakepath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharhandshakepath=${handshakepath: -1} if [ "${lastcharhandshakepath}" != "/" ]; then handshakepath="${handshakepath}/" @@ -9097,7 +9097,7 @@ function attack_handshake_menu() { kill "${processidcapture}" &> /dev/null if [ "${handshake_captured}" = "y" ]; then - handshakepath=$(env | awk -F = '/^HOME/{print $2}') + handshakepath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharhandshakepath=${handshakepath: -1} if [ "${lastcharhandshakepath}" != "/" ]; then handshakepath="${handshakepath}/" @@ -9232,7 +9232,7 @@ function explore_for_targets_option() { rm -rf "${tmpdir}clts.csv" > /dev/null 2>&1 recalculate_windows_sizes xterm +j -bg black -fg white -geometry "${g1_topright_window}" -T "Exploring for targets" -e airodump-ng -w "${tmpdir}nws" "${interface}" > /dev/null 2>&1 - targetline=$(cat < "${tmpdir}nws-01.csv" | awk '/Station|Cliente/{print NR}') + targetline=$(cat < "${tmpdir}nws-01.csv" | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}') targetline=$((targetline - 1)) head -n "${targetline}" "${tmpdir}nws-01.csv" &> "${tmpdir}nws.csv" @@ -10188,7 +10188,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - iwversion=$(iwconfig --version | awk '/version/{print $4}') + iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" if [ "${iwversion}" -lt 30 ]; then iwcmdfix=" 2> /dev/null | grep Mode: " @@ -10216,7 +10216,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - bettercap_version=$(bettercap -v 2> /dev/null | awk '/^bettercap [0-9]/{print $2}') + bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } #Determine bully version @@ -10229,9 +10229,9 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - reaver_version=$(reaver -h 2>&1 > /dev/null | awk '/^Reaver v[0-9]/{print $2}') + reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then - reaver_version=$(reaver -h 2> /dev/null | awk '/^Reaver v[0-9]/{print $2}') + reaver_version=$(reaver -h 2> /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') fi reaver_version=${reaver_version#"v"} } @@ -10935,7 +10935,7 @@ function detect_screen_resolution() { resolution_detected=0 if hash xdpyinfo 2> /dev/null; then - resolution=$(xdpyinfo 2> /dev/null | awk '{if ($0 ~ /screen #0/) pat1=$1; if ($0 ~ /dimensions/) pat2=$2}{if (pat1 && pat2) print pat2; pat=pat2=""}') + resolution=$(xdpyinfo 2> /dev/null | grep -A 3 "screen #0" | grep "dimensions" | tr -s " " | cut -d " " -f 3 | grep "x") if [ "$?" = "0" ]; then resolution_detected=1 @@ -11190,7 +11190,7 @@ function check_internet_access() { #Check for default route on an interface function check_default_route() { - route | awk "/${1}/&&/default/{print}" > /dev/null + route | grep "${1}" | grep "default" > /dev/null return $? } From c778d30b35f6f3ce790a5b61ff52e2f76daad4dc Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 22:30:46 +0200 Subject: [PATCH 23/41] Removed unnecessary use of :cat: --- airgeddon.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 8a0ced4e6..bea844786 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4568,10 +4568,10 @@ function set_chipset() { if [ -f "/sys/class/net/${1}/device/modalias" ]; then - bus_type=$(cat < "/sys/class/net/${1}/device/modalias" | cut -d ":" -f 1) + bus_type=$(cut -d ":" -f 1 "/sys/class/net/${1}/device/modalias") if [ "${bus_type}" = "usb" ]; then - vendor_and_device=$(cat < "/sys/class/net/${1}/device/modalias" | cut -d ":" -f 2 | cut -b 1-10 | sed 's/^.//;s/p/:/') + vendor_and_device=$(cut -b 6-14 "/sys/class/net/${1}/device/modalias" | sed 's/^.//;s/p/:/') chipset=$(lsusb | grep -i "${vendor_and_device}" | head -n1 - | cut -f3- -d ":" | sed "${sedrulewifi}") elif [[ "${bus_type}" =~ pci|ssb|bcma|pcmcia ]]; then @@ -7756,7 +7756,7 @@ function set_control_script() { cat >&7 <<-'EOF' echo "${msg_good_pass} $( (cat < ${success_pass_path}) 2> /dev/null)" >> ${log_path} - attempts_number=$( (cat < "${attempts_path}" | wc -l) 2> /dev/null) + attempts_number=$( (wc -l < "${attempts_path}") 2> /dev/null) et_password=$( (cat < ${success_pass_path}) 2> /dev/null) echo -e "\t${et_password}" echo @@ -7852,7 +7852,7 @@ function set_control_script() { echo finish_evil_twin else - attempts_number=$( (cat < "${attempts_path}" | wc -l) 2> /dev/null) + attempts_number=$( (wc -l < "${attempts_path}") 2> /dev/null) last_password=$(grep "." ${attempts_path} 2> /dev/null | tail -1) tput el && echo -ne "\t${attempts_text} ${attempts_number}" if [ "${attempts_number}" -gt 0 ]; then @@ -7874,7 +7874,7 @@ function set_control_script() { cat >&7 <<-EOF echo -e "\t${green_color}${et_misc_texts[${language},3]}${normal_color}" - readarray -t DHCPCLIENTS < <(cat < "${tmpdir}clts.txt" 2> /dev/null | grep DHCPACK) + readarray -t DHCPCLIENTS < <(grep DHCPACK < "${tmpdir}clts.txt") client_ips=() EOF @@ -8442,7 +8442,7 @@ function rewrite_script_with_custom_beef() { chmod +x "${scriptfolder}${scriptname}" > /dev/null 2>&1 ;; "search") - beef_custom_path_line=$(cat < "${scriptfolder}${scriptname}" 2> /dev/null | grep "#[C]ustom BeEF location (set=1)" 2> /dev/null) + beef_custom_path_line=$(grep "#[C]ustom BeEF location (set=1)" < "${scriptfolder}${scriptname}" 2> /dev/null) if [ -n "${beef_custom_path_line}" ]; then [[ ${beef_custom_path_line} =~ \"(.*)\" ]] && beef_custom_path="${BASH_REMATCH[1]}" fi @@ -9232,7 +9232,7 @@ function explore_for_targets_option() { rm -rf "${tmpdir}clts.csv" > /dev/null 2>&1 recalculate_windows_sizes xterm +j -bg black -fg white -geometry "${g1_topright_window}" -T "Exploring for targets" -e airodump-ng -w "${tmpdir}nws" "${interface}" > /dev/null 2>&1 - targetline=$(cat < "${tmpdir}nws-01.csv" | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}') + targetline=$(awk '/(Station|Client[es])/{print NR}' < "${tmpdir}nws-01.csv") targetline=$((targetline - 1)) head -n "${targetline}" "${tmpdir}nws-01.csv" &> "${tmpdir}nws.csv" @@ -9497,7 +9497,7 @@ function select_target() { sp4="" fi - client=$(cat < "${tmpdir}clts.csv" | grep "${exp_mac}") + client=$(grep "${exp_mac}" < "${tmpdir}clts.csv") if [ "${client}" != "" ]; then client="*" sp5="" @@ -10432,7 +10432,7 @@ function detect_distro_phase2() { elif [ -f ${osversionfile_dir}"debian_version" ]; then distro="Debian" if [ -f ${osversionfile_dir}"os-release" ]; then - extra_os_info=$(cat < ${osversionfile_dir}"os-release" | grep "PRETTY_NAME") + extra_os_info=$(grep "PRETTY_NAME" < ${osversionfile_dir}"os-release") if [[ "${extra_os_info}" =~ Raspbian ]]; then distro="Raspbian" is_arm=1 @@ -10444,7 +10444,7 @@ function detect_distro_phase2() { fi elif [ "${distro}" = "Arch" ]; then if [ -f ${osversionfile_dir}"os-release" ]; then - extra_os_info=$(cat < ${osversionfile_dir}"os-release" | grep "PRETTY_NAME") + extra_os_info=$(grep "PRETTY_NAME" < ${osversionfile_dir}"os-release") if [[ "${extra_os_info}" =~ BlackArch ]]; then distro="BlackArch" elif [[ "${extra_os_info}" =~ Kali ]]; then From 309099000dc9649f8001affb08edddc9478bc630 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 15 Feb 2017 22:34:43 +0200 Subject: [PATCH 24/41] Added missing redirections --- airgeddon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index bea844786..477150295 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -4568,10 +4568,10 @@ function set_chipset() { if [ -f "/sys/class/net/${1}/device/modalias" ]; then - bus_type=$(cut -d ":" -f 1 "/sys/class/net/${1}/device/modalias") + bus_type=$(cut -d ":" -f 1 < "/sys/class/net/${1}/device/modalias") if [ "${bus_type}" = "usb" ]; then - vendor_and_device=$(cut -b 6-14 "/sys/class/net/${1}/device/modalias" | sed 's/^.//;s/p/:/') + vendor_and_device=$(cut -b 6-14 < "/sys/class/net/${1}/device/modalias" | sed 's/^.//;s/p/:/') chipset=$(lsusb | grep -i "${vendor_and_device}" | head -n1 - | cut -f3- -d ":" | sed "${sedrulewifi}") elif [[ "${bus_type}" =~ pci|ssb|bcma|pcmcia ]]; then From 0439744c5c2408dbe4dec30c1dd9578d346c86e7 Mon Sep 17 00:00:00 2001 From: Sotirios Roussis Date: Sat, 18 Feb 2017 02:43:44 +0200 Subject: [PATCH 25/41] Changed debug_mode=2 functionality (#59) * Corrected mistakes * hey, look over there! * Corrected indentation * Corrected indentation * Corrected indentation mistakes * Corrected indentation mistakes --- airgeddon.sh | 1005 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1001 insertions(+), 4 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 477150295..a68dd3481 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,16 +2,13 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20160203 +#Date.........: 20160217 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later #Enabled with extra-verbose mode 2 / Enabled 1 / Disabled 0 - Debug mode for faster development skipping intro and initial checks - Default value 0 debug_mode=0 -if [ ${debug_mode} -eq 2 ]; then - set -o xtrace -fi #Enabled 1 / Disabled 0 - Auto update feature (it has no effect on debug mode) - Default value 1 auto_update=1 @@ -261,6 +258,10 @@ normal_color="\e[1;0m" #Set different language text strings function language_strings() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + declare -A unknown_chipset unknown_chipset["ENGLISH"]="Unknown" unknown_chipset["SPANISH"]="Desconocido" @@ -3938,6 +3939,10 @@ function language_strings() { #Set the message to show again after an interrupt ([Ctrl+C] or [Ctrl+Z]) without exiting function interrupt_checkpoint() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -z "${last_buffered_type1}" ]; then last_buffered_message1=${1} last_buffered_message2=${1} @@ -3956,6 +3961,10 @@ function interrupt_checkpoint() { #Add the text on a menu when you miss an optional tool function special_text_missed_optional_tool() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + declare -a required_tools=("${!3}") allowed_menu_option=1 @@ -3981,6 +3990,10 @@ function special_text_missed_optional_tool() { #Generate the chars in front of and behind a text for titles and separators function generate_dynamic_line() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local type=${2} if [ "${type}" = "title" ]; then ncharstitle=78 @@ -4022,6 +4035,10 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_interface_mode case "${ifacemode}" in "Managed") @@ -4043,6 +4060,10 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_interface_mode case "${ifacemode}" in "Monitor") @@ -4064,6 +4085,10 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) if [[ ${mode} != "Monitor" ]]; then @@ -4078,6 +4103,10 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + execute_iwconfig_fix return $? } @@ -4085,6 +4114,10 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" eval "${iwcmd}" @@ -4095,6 +4128,10 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs for iface_name in "${IFACES_AND_MACS[@]}"; do @@ -4113,6 +4150,10 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + renew_ifaces_and_macs_list interface_auto_change=0 @@ -4143,6 +4184,10 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} six_wpsbssid_last_digits=${wps_bssid: -8} @@ -4154,6 +4199,10 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) } @@ -4161,12 +4210,20 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4189,6 +4246,10 @@ function calculate_easybox_algorithm() { #Calculate the last digit on pin following the checksum rule function pin_checksum_rule() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + current_calculated_pin=$((10#${1} * 10)) accum=0 @@ -4208,6 +4269,10 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 388 "blue" declare -g calculated_pins=("${wps_default_generic_pin}") @@ -4232,6 +4297,10 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do this_pin_already_included=0 @@ -4258,6 +4327,10 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" } @@ -4265,6 +4338,10 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + bssid_found_in_db=0 counter_pins_found=0 declare -g pins_found=() @@ -4284,6 +4361,10 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + disable_rfkill phy_iface=$(basename "$(readlink "/sys/class/net/${interface}/phy80211")") @@ -4298,6 +4379,10 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + et_initial_state=${ifacemode} if [ "${ifacemode}" != "Managed" ]; then @@ -4318,6 +4403,10 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 299 "blue" @@ -4343,6 +4432,10 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 fi @@ -4351,6 +4444,10 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_to_set_managed if [ "$?" != "0" ]; then @@ -4383,6 +4480,10 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_to_set_monitor if [ "$?" != "0" ]; then @@ -4430,6 +4531,10 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + execute_iwconfig_fix if [ "$?" != "0" ]; then ifacemode="(Non wifi card)" @@ -4459,6 +4564,10 @@ function check_interface_mode() { #Language change menu function language_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 87 "title" current_menu="language_menu" @@ -4550,6 +4659,10 @@ function language_menu() { #Read the chipset for an interface function set_chipset() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + chipset="" sedrule1="s/^....//" sedrule2="s/ Network Connection//g" @@ -4596,6 +4709,10 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 fi @@ -4687,6 +4804,10 @@ function select_internet_interface() { #Interface selection menu function select_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 88 "title" current_menu="select_interface_menu" @@ -4732,6 +4853,10 @@ function select_interface() { #Read the user input on yes/no questions function read_yesno() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" "${1}" "green" read -r yesno @@ -4740,6 +4865,10 @@ function read_yesno() { #Validate the input on yes/no questions function ask_yesno() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + yesno="" while [[ ! ${yesno} =~ ^[YyNn]$ ]]; do read_yesno "${1}" @@ -4756,6 +4885,10 @@ function ask_yesno() { #Read the user input on channel questions function read_channel() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 25 "green" if [ "${1}" = "wps" ]; then @@ -4768,6 +4901,10 @@ function read_channel() { #Validate the input on channel questions function ask_channel() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local regexp="^([1-9]|1[0-4])$" if [ "${1}" = "wps" ]; then @@ -4788,6 +4925,10 @@ function ask_channel() { #Read the user input on bssid questions function read_bssid() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 27 "green" if [ "${1}" = "wps" ]; then @@ -4800,6 +4941,10 @@ function read_bssid() { #Validate the input on bssid questions function ask_bssid() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local regexp="^([a-fA-F0-9]{2}:){5}[a-zA-Z0-9]{2}$" if [ "${1}" = "wps" ]; then @@ -4820,6 +4965,10 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 29 "green" read -r essid @@ -4828,6 +4977,10 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do read_essid @@ -4845,6 +4998,10 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 363 "green" read -r custom_pin @@ -4853,6 +5010,10 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local regexp="^[0-9]{8}$" custom_pin="" while [[ ! ${custom_pin} =~ ${regexp} ]]; do @@ -4866,6 +5027,10 @@ function ask_custom_pin() { #Read the user input on timeout questions function read_timeout() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo case ${1} in "standard") @@ -4881,6 +5046,10 @@ function read_timeout() { #Validate the user input for timeouts function ask_wps_timeout() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + case ${1} in "standard") local regexp="^[1-9][0-9]$|^100$|^$" @@ -4922,6 +5091,10 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -4938,6 +5111,10 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -4954,6 +5131,10 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -4970,6 +5151,10 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -4986,6 +5171,10 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -5002,6 +5191,10 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 32 "green" @@ -5018,6 +5211,10 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + wps_pin_database_prerequisites set_wps_attack_script "bully" "pindb" @@ -5029,6 +5226,10 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + wps_pin_database_prerequisites set_wps_attack_script "reaver" "pindb" @@ -5040,6 +5241,10 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 89 "title" language_strings "${language}" 32 "green" @@ -5058,6 +5263,10 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 90 "title" language_strings "${language}" 32 "green" @@ -5074,6 +5283,10 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 91 "title" language_strings "${language}" 32 "green" @@ -5088,6 +5301,10 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 92 "title" language_strings "${language}" 32 "green" @@ -5102,6 +5319,10 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 93 "title" language_strings "${language}" 32 "green" @@ -5116,6 +5337,10 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 94 "title" language_strings "${language}" 32 "green" @@ -5130,6 +5355,10 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 95 "title" language_strings "${language}" 35 "green" @@ -5150,6 +5379,10 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 96 "title" language_strings "${language}" 36 "green" @@ -5170,6 +5403,10 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 97 "title" language_strings "${language}" 37 "green" @@ -5190,6 +5427,10 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 98 "title" language_strings "${language}" 38 "green" @@ -5210,6 +5451,10 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 99 "title" language_strings "${language}" 39 "green" @@ -5229,6 +5474,10 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 100 "title" language_strings "${language}" 40 "green" @@ -5248,6 +5497,10 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_monitor_enabled if [ "$?" != "0" ]; then return 1 @@ -5278,6 +5531,10 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" echo @@ -5292,6 +5549,10 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then language_strings "${language}" 283 "blue" @@ -5304,6 +5565,10 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" if [ -n "${channel}" ]; then @@ -5325,6 +5590,10 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" else @@ -5351,6 +5620,10 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" else @@ -5397,6 +5670,10 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" else @@ -5429,6 +5706,10 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" else @@ -5453,6 +5734,10 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) aireplay_attack_dependencies=(${optional_tools_names[2]}) @@ -5473,6 +5758,10 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then arraliases=(${possible_alias_names[${item//[[:space:]]/ }]}) @@ -5489,6 +5778,10 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + declare -gA optional_tools=() for item in "${optional_tools_names[@]}"; do @@ -5499,6 +5792,10 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + forbidden_options=() case ${current_menu} in @@ -5562,6 +5859,10 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 rm -rf "${tmpdir}nws"* > /dev/null 2>&1 @@ -5592,6 +5893,10 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward fi @@ -5602,6 +5907,10 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + iptables -F iptables -t nat -F iptables -X @@ -5611,6 +5920,10 @@ function clean_iptables() { #Create an array from parameters function store_array() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local values=("${@:3}") for i in "${!values[@]}"; do eval "${1}[\$2|${i}]=\${values[i]}" @@ -5620,6 +5933,10 @@ function store_array() { #Check if something (first parameter) is inside an array (second parameter) contains_element() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local e for e in "${@:2}"; do [[ "${e}" = "${1}" ]] && return 0 @@ -5630,6 +5947,10 @@ contains_element() { #Print hints from the different hint pools depending of the menu function print_hint() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + declare -A hints case ${1} in @@ -5720,6 +6041,10 @@ function print_hint() { #airgeddon main menu function main_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 101 "title" current_menu="main_menu" @@ -5788,6 +6113,10 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 253 "title" current_menu="evil_twin_attacks_menu" @@ -5913,6 +6242,10 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return fi @@ -5986,6 +6319,10 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 334 "title" current_menu="wps_attacks_menu" @@ -6211,6 +6548,10 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 170 "title" current_menu="decrypt_menu" @@ -6290,6 +6631,10 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + validpath=1 while [[ "${validpath}" != "0" ]]; do read_path "rules" @@ -6300,6 +6645,10 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + validpath=1 while [[ "${validpath}" != "0" ]]; do read_path "dictionary" @@ -6310,6 +6659,10 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + validpath=1 while [[ "${validpath}" != "0" ]]; do read_path "targetfilefordecrypt" @@ -6320,6 +6673,10 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${enteredpath}" ]; then echo language_strings "${language}" 186 "blue" @@ -6335,6 +6692,10 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${DICTIONARY}" ]; then echo language_strings "${language}" 183 "blue" @@ -6350,6 +6711,10 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -n "${RULES}" ]; then echo language_strings "${language}" 239 "blue" @@ -6365,6 +6730,10 @@ function manage_asking_for_rule_file() { #Validate the file to be cleaned function check_valid_file_to_clean() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA|WEP" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') if [ "${nets_from_file}" = "" ]; then @@ -6398,6 +6767,10 @@ function check_valid_file_to_clean() { #Check if a bssid is present on a capture file to know if there is a Handshake with that bssid function check_bssid_in_captured_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') echo @@ -6436,6 +6809,10 @@ function check_bssid_in_captured_file() { #Set the target vars to a bssid selecting them from a capture file which has a Handshake function select_wpa_bssid_target_from_captured_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') echo @@ -6514,6 +6891,10 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + manage_asking_for_captured_file select_wpa_bssid_target_from_captured_file "${enteredpath}" @@ -6532,6 +6913,10 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + manage_asking_for_captured_file select_wpa_bssid_target_from_captured_file "${enteredpath}" @@ -6557,6 +6942,10 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + manage_asking_for_captured_file select_wpa_bssid_target_from_captured_file "${enteredpath}" @@ -6576,6 +6965,10 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + manage_asking_for_captured_file select_wpa_bssid_target_from_captured_file "${enteredpath}" @@ -6602,6 +6995,10 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + manage_asking_for_captured_file select_wpa_bssid_target_from_captured_file "${enteredpath}" @@ -6623,6 +7020,10 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then local regexp="Status\.{1,9}:[[:space:]]Cracked" @@ -6659,6 +7060,10 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + ettercap_log=0 ask_yesno 302 if [ ${yesno} = "y" ]; then @@ -6682,6 +7087,10 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + bettercap_log=0 ask_yesno 302 if [ ${yesno} = "y" ]; then @@ -6705,6 +7114,10 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} if [ "${lastcharetcaptiveportallogpath}" != "/" ]; then @@ -6721,6 +7134,10 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 293 "title" print_iface_selected @@ -6771,6 +7188,10 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do echo @@ -6782,6 +7203,10 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do echo @@ -6793,6 +7218,10 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_minlength maxlength=0 while [[ ${maxlength} -lt ${minlength} ]]; do @@ -6803,6 +7232,10 @@ function set_minlength_and_maxlength() { #Charset selection menu function set_charset() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 238 "title" language_strings "${language}" 196 "green" @@ -6894,6 +7327,10 @@ function set_charset() { #Set a var to show the chosen charset function set_show_charset() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + showcharset="" case ${1} in @@ -6926,6 +7363,10 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" } @@ -6933,6 +7374,10 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" } @@ -6940,6 +7385,10 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" exec 5>&1 @@ -6950,6 +7399,10 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" exec 5>&1 @@ -6960,6 +7413,10 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" exec 5>&1 @@ -6970,6 +7427,10 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_hostapd_config launch_fake_ap set_dhcp_config @@ -6991,6 +7452,10 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_hostapd_config launch_fake_ap set_dhcp_config @@ -7016,6 +7481,10 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_hostapd_config launch_fake_ap set_dhcp_config @@ -7042,6 +7511,10 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_hostapd_config launch_fake_ap set_dhcp_config @@ -7078,6 +7551,10 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_hostapd_config launch_fake_ap set_dhcp_config @@ -7106,6 +7583,10 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7124,6 +7605,10 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 nm_processes_killed=1 @@ -7148,6 +7633,10 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then et_ip_range=${ip_range} @@ -7229,6 +7718,10 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) ifconfig "${interface}" ${et_ip_router} netmask ${std_c_mask} > /dev/null 2>&1 @@ -7273,6 +7766,10 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + killall dhcpd > /dev/null 2>&1 recalculate_windows_sizes @@ -7295,6 +7792,10 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + prepare_et_monitor case ${et_dos_attack} in @@ -7334,6 +7835,10 @@ function exec_et_deauth() { #Create here-doc bash script used for wps pin attacks function set_wps_attack_script() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + tmpfiles_toclean=1 rm -rf "${tmpdir}${wps_attack_script_file}" > /dev/null 2>&1 rm -rf "${tmpdir}${wps_out_file}" > /dev/null 2>&1 @@ -7693,6 +8198,10 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 exec 7>"${tmpdir}${control_file}" @@ -7914,6 +8423,10 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & et_processes+=($!) @@ -7922,6 +8435,10 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + recalculate_windows_sizes case ${et_mode} in "et_onlyap") @@ -7951,6 +8468,10 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 { @@ -7974,6 +8495,10 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8178,6 +8703,10 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes if [ ${captive_portal_mode} = "internet" ]; then @@ -8192,6 +8721,10 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "Sslstrip" -e "sslstrip -w \"${tmpdir}${sslstrip_file}\" -p -l ${sslstrip_port} -f -k" > /dev/null 2>&1 & @@ -8201,6 +8734,10 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + recalculate_windows_sizes case ${et_mode} in "et_sniffing") @@ -8222,6 +8759,10 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8299,6 +8840,10 @@ function set_beef_config() { #Kill beef process function kill_beef() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then beef_pid=$(ps uax | pgrep -f "${optional_tools_names[19]}") @@ -8313,6 +8858,10 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) for item in "${BEEF_OUTPUT[@]}"; do @@ -8326,6 +8875,10 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do if [ -f "${item}beef" ]; then @@ -8340,6 +8893,10 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then language_strings "${language}" 405 "blue" @@ -8382,6 +8939,10 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + while [[ "${valid_possible_beef_path}" != "1" ]]; do echo language_strings "${language}" 402 "green" @@ -8419,6 +8980,10 @@ function manual_beef_set() { #Fix for not found beef executable function fix_beef_executable() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rm -rf "/usr/bin/beef" > /dev/null 2>&1 { echo -e "#!/bin/bash\n" @@ -8434,6 +8999,10 @@ function fix_beef_executable() { #Rewrite airgeddon script in a polymorphic way adding custom beef location to array to get persistence function rewrite_script_with_custom_beef() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_script_folder_and_name case ${1} in @@ -8453,6 +9022,10 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then systemctl restart "${optional_tools_names[19]}.service" > /dev/null 2>&1 @@ -8462,6 +9035,10 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + kill_beef if [ "${beef_found}" -eq 0 ]; then @@ -8483,6 +9060,10 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -8503,6 +9084,10 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 304 "blue" @@ -8541,6 +9126,10 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 304 "blue" @@ -8597,6 +9186,10 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" done @@ -8605,6 +9198,10 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null done @@ -8614,6 +9211,10 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 echo "1" | aircrack-ng "${enteredpath}" -J "${tmpdir}hctmp" -b "${bssid}" > /dev/null 2>&1 @@ -8622,6 +9223,10 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 120 "title" current_menu="handshake_tools_menu" @@ -8680,6 +9285,10 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo check_valid_file_to_clean "${filetoclean}" if [ "$?" != "0" ]; then @@ -8694,6 +9303,10 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo readpath=0 @@ -8723,6 +9336,10 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 102 "title" current_menu="dos_attacks_menu" @@ -8822,6 +9439,10 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo language_strings "${language}" 137 "red" @@ -8890,6 +9511,10 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo language_strings "${language}" 125 "yellow" @@ -8917,6 +9542,10 @@ function capture_handshake() { #Check if file exists function check_file_exists() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [[ ! -f "${1}" || -z "${1}" ]]; then language_strings "${language}" 161 "red" return 1 @@ -8927,6 +9556,10 @@ function check_file_exists() { #Validate path function validate_path() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + dirname=${1%/*} if [[ ! -d "${dirname}" ]] || [[ "${dirname}" = "." ]]; then @@ -8984,6 +9617,10 @@ function validate_path() { #Check for write permissions on a given path function check_write_permissions() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -w "${1}" ]; then return 0 fi @@ -8993,6 +9630,10 @@ function check_write_permissions() { #Create a var with the name passed to the function and reading the value from the user input function read_and_clean_path() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + settings="$(shopt -p extglob)" shopt -s extglob @@ -9007,6 +9648,10 @@ function read_and_clean_path() { #Read and validate a path function read_path() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo case ${1} in "handshake") @@ -9091,6 +9736,10 @@ function read_path() { #Launch the DoS selection menu before capture a Handshake and process the captured file function attack_handshake_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ "${1}" = "handshake" ]; then ask_yesno 145 handshake_captured=${yesno} @@ -9196,6 +9845,10 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + language_strings "${language}" 143 "blue" echo language_strings "${language}" 144 "yellow" @@ -9212,6 +9865,10 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 103 "title" language_strings "${language}" 65 "green" @@ -9286,6 +9943,10 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 103 "title" language_strings "${language}" 65 "green" @@ -9462,6 +10123,10 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 104 "title" echo @@ -9550,6 +10215,10 @@ function select_target() { #Perform a test to determine if fcs parameter is needed on wash scanning function set_wash_parametrization() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + fcs="" declare -gA wash_ifaces_already_set readarray -t WASH_OUTPUT < <(timeout -s SIGTERM 2 wash -i "${interface}" 2> /dev/null) @@ -9567,6 +10236,10 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_wps_mac_parameters include_pin_dbfile echo @@ -9592,6 +10265,10 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ ${retry_handshake_capture} -eq 1 ]; then return fi @@ -9725,6 +10402,10 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo readpath=0 @@ -9764,6 +10445,10 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ ${return_to_et_main_menu} -eq 1 ]; then return fi @@ -9940,6 +10625,10 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ ${internet_interface_selected} -eq 1 ]; then return 0 fi @@ -9966,6 +10655,10 @@ function detect_internet_interface() { #Show about and credits function credits_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear language_strings "${language}" 105 "title" language_strings "${language}" 74 "pink" @@ -9993,6 +10686,10 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 82 "red" echo @@ -10004,6 +10701,10 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + language_strings "${language}" 82 "red" echo language_strings "${language}" 115 "read" @@ -10013,6 +10714,10 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 220 "red" language_strings "${language}" 115 "read" @@ -10021,6 +10726,10 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 76 "red" language_strings "${language}" 115 "read" @@ -10029,6 +10738,10 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 77 "red" echo @@ -10040,6 +10753,10 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 77 "red" echo @@ -10051,6 +10768,10 @@ function invalid_internet_iface_selected() { #Manage behavior of captured traps function capture_traps() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + case "${1}" in INT|SIGTSTP) case ${current_menu} in @@ -10083,6 +10804,10 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + action_on_exit_taken=0 echo language_strings "${language}" 106 "title" @@ -10141,6 +10866,10 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then ${airmon} stop "${interface}" > /dev/null 2>&1 @@ -10168,6 +10897,10 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo -ne " " for (( j=1; j<=4; j++ )); do echo -ne "." @@ -10178,6 +10911,10 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + airmon="airmon-ng" if hash airmon-zc 2> /dev/null; then @@ -10188,6 +10925,10 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" if [ "${iwversion}" -lt 30 ]; then @@ -10198,6 +10939,10 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + hashcat_fix="" hashcat_charset_fix_needed=0 if compare_floats_greater_or_equal "${hashcat_version}" "${hashcat3_version}"; then @@ -10209,6 +10954,10 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} } @@ -10216,12 +10965,20 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } #Determine bully version function get_bully_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} } @@ -10229,6 +10986,10 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then reaver_version=$(reaver -h 2> /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') @@ -10239,6 +11000,10 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" else @@ -10249,6 +11014,10 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 fi @@ -10258,6 +11027,10 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 fi @@ -10267,6 +11040,10 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -10283,6 +11060,10 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" echo @@ -10349,6 +11130,10 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) if [ "${remote_pindb_file}" != "${curl_404_error}" ]; then @@ -10362,6 +11147,10 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + ask_yesno 380 if [ ${yesno} = "n" ]; then pin_dbfile_checked=1 @@ -10371,12 +11160,20 @@ function ask_for_pin_dbfile_download_retry() { #Get the checksum for local pin database file function get_local_pin_dbfile_checksum() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local_pin_dbfile_checksum=$(md5sum "${1}" | awk '{print $1}') } #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) if [ "${remote_pin_dbfile_checksum}" != "${curl_404_error}" ]; then @@ -10388,6 +11185,10 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + case "${OSTYPE}" in solaris*) distro="Solaris" @@ -10404,6 +11205,10 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null if [ "$?" = "0" ]; then @@ -10416,6 +11221,10 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then distro="CentOS" @@ -10461,6 +11270,10 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -10484,6 +11297,10 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + case ${distro} in "Wifislax") networkmanager_cmd="service restart networkmanager" @@ -10603,6 +11420,10 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + nm_min_main_version="1" nm_min_subversion="0" nm_min_subversion2="12" @@ -10638,6 +11459,10 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + compatible=0 distro="Unknown Linux" @@ -10668,6 +11493,10 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + user=$(whoami) if [ "${user}" != "root" ]; then @@ -10678,6 +11507,10 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' all_known_compatible_distros=($(printf "%s\n" "${all_known_compatible_distros[@]}" | sort)) @@ -10692,6 +11525,10 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 108 "blue" language_strings "${language}" 115 "read" @@ -10791,6 +11628,10 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" if compare_floats_greater_or_equal "${bashversion}" ${minimum_bash_version_required}; then @@ -10805,6 +11646,10 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then autoupdate_check @@ -10819,6 +11664,10 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + window_width=$(tput cols) window_height=$(tput lines) @@ -10840,6 +11689,10 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" sleep 0.15 && echo -e " \__ \ | \_ __ \/ ___\_/ __ \ / __ |/ __ |/ _ \ / \\" @@ -10855,6 +11708,10 @@ function print_intro() { #Generate the frames of the animated ascii art flying saucer function flying_saucer() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + case ${1} in 1) echo " " @@ -10895,6 +11752,10 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo -e "\033[s" for i in $(seq 1 8); do @@ -10911,6 +11772,10 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + exit_code=0 check_kill_needed=0 nm_processes_killed=0 @@ -10933,6 +11798,10 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + resolution_detected=0 if hash xdpyinfo 2> /dev/null; then resolution=$(xdpyinfo 2> /dev/null | grep -A 3 "screen #0" | grep "dimensions" | tr -s " " | cut -d " " -f 3 | grep "x") @@ -10952,6 +11821,10 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + set_xsizes set_ysizes set_ypositions @@ -10981,6 +11854,10 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") xtotaltmp=$(printf "%.0f" "${xtotal}" 2> /dev/null) @@ -11000,6 +11877,10 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) if [ "$?" != "0" ]; then @@ -11018,12 +11899,20 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } #Recalculate windows sizes and positions function recalculate_windows_sizes() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + detect_screen_resolution set_windows_sizes } @@ -11031,6 +11920,10 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + clear current_menu="pre_main_menu" initialize_script_settings @@ -11100,6 +11993,10 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then echo @@ -11122,18 +12019,30 @@ function airmonzc_security_check() { #Compare if first float argument is greater than float second argument function compare_floats_greater_than() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>n2) exit 0; exit 1}' } #Compare if first float argument is greater or equal than float second argument function compare_floats_greater_or_equal() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>=n2) exit 0; exit 1}' } #Update and relaunch the script function download_last_version() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -11154,6 +12063,10 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 287 "blue" check_internet_access "${host_to_check_internet}" @@ -11183,6 +12096,10 @@ function validate_et_internet_interface() { #Check for active internet connection function check_internet_access() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + ping -c 1 ${host_to_check_internet} -W 1 > /dev/null 2>&1 return $? } @@ -11190,6 +12107,10 @@ function check_internet_access() { #Check for default route on an interface function check_default_route() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + route | grep "${1}" | grep "default" > /dev/null return $? } @@ -11197,6 +12118,10 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo language_strings "${language}" 210 "blue" echo @@ -11231,6 +12156,10 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 fi @@ -11240,6 +12169,10 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" for lgkey in "${!lang_association[@]}"; do @@ -11254,6 +12187,10 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 echo "${aireplay_attack_dependencies[@]}" > /dev/null 2>&1 @@ -11275,18 +12212,30 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo_blue "---------" } #Print a large separator function print_large_separator() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + echo_blue "-------------------------------------------------------" } #Add the PoT prefix on printed strings if PoT mark is found function check_pending_of_translation() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + if [[ "${1}" =~ ^${escaped_pending_of_translation}([[:space:]])(.*)$ ]]; then text="${cyan_color}${pending_of_translation} ${2}${BASH_REMATCH[2]}" return 1 @@ -11307,6 +12256,10 @@ function check_pending_of_translation() { #Print under construction message used on some menu entries function under_construction_message() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + local var_uc="${under_constructionvar^}" echo echo_yellow "${var_uc}..." @@ -11316,6 +12269,10 @@ function under_construction_message() { #Canalize the echo functions function last_echo() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + check_pending_of_translation "${1}" "${2}" if [ "$?" != "0" ]; then echo -e "${2}${text}${normal_color}" @@ -11327,60 +12284,100 @@ function last_echo() { #Print green messages function echo_green() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${green_color}" } #Print blue messages function echo_blue() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${blue_color}" } #Print yellow messages function echo_yellow() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${yellow_color}" } #Print red messages function echo_red() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${red_color}" } #Print red messages using a slimmer thickness function echo_red_slim() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${red_color_slim}" } #Print black messages with background for titles function echo_green_title() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${green_color_title}" } #Print pink messages function echo_pink() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${pink_color}" } #Print cyan messages function echo_cyan() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${cyan_color}" } #Print brown messages function echo_brown() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${brown_color}" } #Print white messages function echo_white() { + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME}" "${@}" + fi + last_echo "${1}" "${white_color}" } From f29f204a4ebd218c3f0bb8cb01fe366f67401662 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sat, 18 Feb 2017 08:41:11 +0200 Subject: [PATCH 26/41] Improved debug_mode=2 --- CHANGELOG.md | 2 +- airgeddon.sh | 1013 ++++++++++++-------------------------------------- 2 files changed, 245 insertions(+), 770 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de25b667d..77d705f71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ###6.01 - - Shebang changed to more portable #!/usr/bin/env bash + - Shebang changed to a more portable one `#!/usr/bin/env bash` - New extra-verbose debug mode added - README.md major modifications - Added CONTRIBUTING.md diff --git a/airgeddon.sh b/airgeddon.sh index a68dd3481..ddd7f8f31 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20160217 +#Date.........: 20160218 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -258,10 +258,6 @@ normal_color="\e[1;0m" #Set different language text strings function language_strings() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - declare -A unknown_chipset unknown_chipset["ENGLISH"]="Unknown" unknown_chipset["SPANISH"]="Desconocido" @@ -3936,13 +3932,18 @@ function language_strings() { esac } +#Print the current function's name with the parameters that have been passed +#Call this function like this: debug_print_function_and_parameters "${@}" +function debug_print_function_and_parameters() { + + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME[1]}" "${@}" + fi +} + #Set the message to show again after an interrupt ([Ctrl+C] or [Ctrl+Z]) without exiting function interrupt_checkpoint() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - if [ -z "${last_buffered_type1}" ]; then last_buffered_message1=${1} last_buffered_message2=${1} @@ -3961,9 +3962,7 @@ function interrupt_checkpoint() { #Add the text on a menu when you miss an optional tool function special_text_missed_optional_tool() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" declare -a required_tools=("${!3}") @@ -3990,9 +3989,7 @@ function special_text_missed_optional_tool() { #Generate the chars in front of and behind a text for titles and separators function generate_dynamic_line() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local type=${2} if [ "${type}" = "title" ]; then @@ -4035,9 +4032,7 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4060,9 +4055,7 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4085,9 +4078,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) @@ -4103,9 +4094,7 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" execute_iwconfig_fix return $? @@ -4114,9 +4103,7 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" @@ -4128,9 +4115,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs @@ -4150,9 +4135,7 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" renew_ifaces_and_macs_list interface_auto_change=0 @@ -4184,9 +4167,7 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} @@ -4199,9 +4180,7 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) @@ -4210,9 +4189,7 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } @@ -4220,9 +4197,7 @@ function calculate_computepin_algorithm_step2() { #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4246,9 +4221,7 @@ function calculate_easybox_algorithm() { #Calculate the last digit on pin following the checksum rule function pin_checksum_rule() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" current_calculated_pin=$((10#${1} * 10)) @@ -4269,9 +4242,7 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 388 "blue" @@ -4297,9 +4268,7 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do @@ -4327,9 +4296,7 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" @@ -4338,9 +4305,7 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" bssid_found_in_db=0 counter_pins_found=0 @@ -4361,9 +4326,7 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" disable_rfkill @@ -4379,9 +4342,7 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" et_initial_state=${ifacemode} @@ -4403,9 +4364,7 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 299 "blue" @@ -4432,9 +4391,7 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 @@ -4444,9 +4401,7 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" check_to_set_managed @@ -4480,9 +4435,7 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" check_to_set_monitor @@ -4531,9 +4484,7 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" execute_iwconfig_fix if [ "$?" != "0" ]; then @@ -4564,9 +4515,7 @@ function check_interface_mode() { #Language change menu function language_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 87 "title" @@ -4659,9 +4608,7 @@ function language_menu() { #Read the chipset for an interface function set_chipset() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" chipset="" sedrule1="s/^....//" @@ -4709,9 +4656,7 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 @@ -4804,9 +4749,7 @@ function select_internet_interface() { #Interface selection menu function select_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 88 "title" @@ -4853,9 +4796,7 @@ function select_interface() { #Read the user input on yes/no questions function read_yesno() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" "${1}" "green" @@ -4865,9 +4806,7 @@ function read_yesno() { #Validate the input on yes/no questions function ask_yesno() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" yesno="" while [[ ! ${yesno} =~ ^[YyNn]$ ]]; do @@ -4885,9 +4824,7 @@ function ask_yesno() { #Read the user input on channel questions function read_channel() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 25 "green" @@ -4901,9 +4838,7 @@ function read_channel() { #Validate the input on channel questions function ask_channel() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local regexp="^([1-9]|1[0-4])$" @@ -4925,9 +4860,7 @@ function ask_channel() { #Read the user input on bssid questions function read_bssid() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 27 "green" @@ -4941,9 +4874,7 @@ function read_bssid() { #Validate the input on bssid questions function ask_bssid() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local regexp="^([a-fA-F0-9]{2}:){5}[a-zA-Z0-9]{2}$" @@ -4965,9 +4896,7 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 29 "green" @@ -4977,9 +4906,7 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do @@ -4998,9 +4925,7 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 363 "green" @@ -5010,9 +4935,7 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local regexp="^[0-9]{8}$" custom_pin="" @@ -5027,9 +4950,7 @@ function ask_custom_pin() { #Read the user input on timeout questions function read_timeout() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo case ${1} in @@ -5046,9 +4967,7 @@ function read_timeout() { #Validate the user input for timeouts function ask_wps_timeout() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" case ${1} in "standard") @@ -5091,9 +5010,7 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5111,9 +5028,7 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5131,9 +5046,7 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5151,9 +5064,7 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5171,9 +5082,7 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5191,9 +5100,7 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5211,9 +5118,7 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5226,9 +5131,7 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5241,9 +5144,7 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 89 "title" @@ -5263,9 +5164,7 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 90 "title" @@ -5283,9 +5182,7 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 91 "title" @@ -5301,9 +5198,7 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 92 "title" @@ -5319,9 +5214,7 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 93 "title" @@ -5337,9 +5230,7 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 94 "title" @@ -5355,9 +5246,7 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 95 "title" @@ -5379,9 +5268,7 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 96 "title" @@ -5403,9 +5290,7 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 97 "title" @@ -5427,9 +5312,7 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 98 "title" @@ -5451,9 +5334,7 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 99 "title" @@ -5474,9 +5355,7 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 100 "title" @@ -5497,9 +5376,7 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" check_monitor_enabled if [ "$?" != "0" ]; then @@ -5531,9 +5408,7 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" @@ -5549,9 +5424,7 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then @@ -5565,9 +5438,7 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5590,9 +5461,7 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5620,9 +5489,7 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5670,9 +5537,7 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" @@ -5706,9 +5571,7 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5734,9 +5597,7 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) @@ -5758,9 +5619,7 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then @@ -5778,9 +5637,7 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" declare -gA optional_tools=() @@ -5792,9 +5649,7 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" forbidden_options=() @@ -5859,9 +5714,7 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 @@ -5893,9 +5746,7 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward @@ -5907,9 +5758,7 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" iptables -F iptables -t nat -F @@ -5920,9 +5769,7 @@ function clean_iptables() { #Create an array from parameters function store_array() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local values=("${@:3}") for i in "${!values[@]}"; do @@ -5933,9 +5780,7 @@ function store_array() { #Check if something (first parameter) is inside an array (second parameter) contains_element() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local e for e in "${@:2}"; do @@ -5947,9 +5792,7 @@ contains_element() { #Print hints from the different hint pools depending of the menu function print_hint() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" declare -A hints @@ -6041,9 +5884,7 @@ function print_hint() { #airgeddon main menu function main_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 101 "title" @@ -6113,9 +5954,7 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 253 "title" @@ -6242,9 +6081,7 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return @@ -6319,9 +6156,7 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 334 "title" @@ -6548,9 +6383,7 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 170 "title" @@ -6631,9 +6464,7 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6645,9 +6476,7 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6659,9 +6488,7 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6673,9 +6500,7 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${enteredpath}" ]; then echo @@ -6692,9 +6517,7 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${DICTIONARY}" ]; then echo @@ -6711,9 +6534,7 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -n "${RULES}" ]; then echo @@ -6730,9 +6551,7 @@ function manage_asking_for_rule_file() { #Validate the file to be cleaned function check_valid_file_to_clean() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA|WEP" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6767,9 +6586,7 @@ function check_valid_file_to_clean() { #Check if a bssid is present on a capture file to know if there is a Handshake with that bssid function check_bssid_in_captured_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6809,9 +6626,7 @@ function check_bssid_in_captured_file() { #Set the target vars to a bssid selecting them from a capture file which has a Handshake function select_wpa_bssid_target_from_captured_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6891,9 +6706,7 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6913,9 +6726,7 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6942,9 +6753,7 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6965,9 +6774,7 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6995,9 +6802,7 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -7020,9 +6825,7 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then @@ -7060,9 +6863,7 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" ettercap_log=0 ask_yesno 302 @@ -7087,9 +6888,7 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" bettercap_log=0 ask_yesno 302 @@ -7114,9 +6913,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} @@ -7134,9 +6931,7 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 293 "title" @@ -7188,9 +6983,7 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7203,9 +6996,7 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7218,9 +7009,7 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_minlength maxlength=0 @@ -7232,9 +7021,7 @@ function set_minlength_and_maxlength() { #Charset selection menu function set_charset() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 238 "title" @@ -7327,9 +7114,7 @@ function set_charset() { #Set a var to show the chosen charset function set_show_charset() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" showcharset="" @@ -7363,9 +7148,7 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" @@ -7374,9 +7157,7 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" @@ -7385,9 +7166,7 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7399,9 +7178,7 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7413,9 +7190,7 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7427,9 +7202,7 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7452,9 +7225,7 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7481,9 +7252,7 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7511,9 +7280,7 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7551,9 +7318,7 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7583,9 +7348,7 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7605,9 +7368,7 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 @@ -7633,9 +7394,7 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then @@ -7718,9 +7477,7 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) @@ -7766,9 +7523,7 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" killall dhcpd > /dev/null 2>&1 @@ -7792,9 +7547,7 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" prepare_et_monitor @@ -7835,9 +7588,7 @@ function exec_et_deauth() { #Create here-doc bash script used for wps pin attacks function set_wps_attack_script() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${wps_attack_script_file}" > /dev/null 2>&1 @@ -8198,9 +7949,7 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 @@ -8423,9 +8172,7 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & @@ -8435,9 +8182,7 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8468,9 +8213,7 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 @@ -8495,9 +8238,7 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8703,9 +8444,7 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes @@ -8721,9 +8460,7 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes @@ -8734,9 +8471,7 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8759,9 +8494,7 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8840,9 +8573,7 @@ function set_beef_config() { #Kill beef process function kill_beef() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8858,9 +8589,7 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) @@ -8875,9 +8604,7 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do @@ -8893,9 +8620,7 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then @@ -8939,9 +8664,7 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" while [[ "${valid_possible_beef_path}" != "1" ]]; do echo @@ -8980,9 +8703,7 @@ function manual_beef_set() { #Fix for not found beef executable function fix_beef_executable() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rm -rf "/usr/bin/beef" > /dev/null 2>&1 { @@ -8999,9 +8720,7 @@ function fix_beef_executable() { #Rewrite airgeddon script in a polymorphic way adding custom beef location to array to get persistence function rewrite_script_with_custom_beef() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_script_folder_and_name @@ -9022,9 +8741,7 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -9035,9 +8752,7 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" kill_beef @@ -9060,9 +8775,7 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -9084,9 +8797,7 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -9126,9 +8837,7 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -9186,9 +8895,7 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" @@ -9198,9 +8905,7 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null @@ -9211,9 +8916,7 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 @@ -9223,9 +8926,7 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 120 "title" @@ -9285,9 +8986,7 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo check_valid_file_to_clean "${filetoclean}" @@ -9303,9 +9002,7 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -9336,9 +9033,7 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 102 "title" @@ -9439,9 +9134,7 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo @@ -9511,9 +9204,7 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo @@ -9542,9 +9233,7 @@ function capture_handshake() { #Check if file exists function check_file_exists() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [[ ! -f "${1}" || -z "${1}" ]]; then language_strings "${language}" 161 "red" @@ -9556,9 +9245,7 @@ function check_file_exists() { #Validate path function validate_path() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" dirname=${1%/*} @@ -9617,9 +9304,7 @@ function validate_path() { #Check for write permissions on a given path function check_write_permissions() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -w "${1}" ]; then return 0 @@ -9630,9 +9315,7 @@ function check_write_permissions() { #Create a var with the name passed to the function and reading the value from the user input function read_and_clean_path() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" settings="$(shopt -p extglob)" shopt -s extglob @@ -9648,9 +9331,7 @@ function read_and_clean_path() { #Read and validate a path function read_path() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo case ${1} in @@ -9736,9 +9417,7 @@ function read_path() { #Launch the DoS selection menu before capture a Handshake and process the captured file function attack_handshake_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ "${1}" = "handshake" ]; then ask_yesno 145 @@ -9845,9 +9524,7 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" language_strings "${language}" 143 "blue" echo @@ -9865,9 +9542,7 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -9943,9 +9618,7 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -10123,9 +9796,7 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 104 "title" @@ -10215,9 +9886,7 @@ function select_target() { #Perform a test to determine if fcs parameter is needed on wash scanning function set_wash_parametrization() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" fcs="" declare -gA wash_ifaces_already_set @@ -10236,9 +9905,7 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_wps_mac_parameters include_pin_dbfile @@ -10265,9 +9932,7 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ ${retry_handshake_capture} -eq 1 ]; then return @@ -10402,9 +10067,7 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -10445,9 +10108,7 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu} -eq 1 ]; then return @@ -10625,9 +10286,7 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ ${internet_interface_selected} -eq 1 ]; then return 0 @@ -10655,9 +10314,7 @@ function detect_internet_interface() { #Show about and credits function credits_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 105 "title" @@ -10686,9 +10343,7 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 82 "red" @@ -10701,9 +10356,7 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" language_strings "${language}" 82 "red" echo @@ -10714,9 +10367,7 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 220 "red" @@ -10726,9 +10377,7 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 76 "red" @@ -10738,9 +10387,7 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10753,9 +10400,7 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10768,9 +10413,7 @@ function invalid_internet_iface_selected() { #Manage behavior of captured traps function capture_traps() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" case "${1}" in INT|SIGTSTP) @@ -10804,9 +10447,7 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" action_on_exit_taken=0 echo @@ -10866,9 +10507,7 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then @@ -10897,9 +10536,7 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo -ne " " for (( j=1; j<=4; j++ )); do @@ -10911,9 +10548,7 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" airmon="airmon-ng" @@ -10925,9 +10560,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" @@ -10939,9 +10572,7 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" hashcat_fix="" hashcat_charset_fix_needed=0 @@ -10954,9 +10585,7 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} @@ -10965,9 +10594,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } @@ -10975,9 +10602,7 @@ function get_bettercap_version() { #Determine bully version function get_bully_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} @@ -10986,9 +10611,7 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then @@ -11000,9 +10623,7 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" @@ -11014,9 +10635,7 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 @@ -11027,9 +10646,7 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 @@ -11040,9 +10657,7 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -11060,9 +10675,7 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" @@ -11130,9 +10743,7 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) @@ -11147,9 +10758,7 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" ask_yesno 380 if [ ${yesno} = "n" ]; then @@ -11160,9 +10769,7 @@ function ask_for_pin_dbfile_download_retry() { #Get the checksum for local pin database file function get_local_pin_dbfile_checksum() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" local_pin_dbfile_checksum=$(md5sum "${1}" | awk '{print $1}') } @@ -11170,9 +10777,7 @@ function get_local_pin_dbfile_checksum() { #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) @@ -11185,9 +10790,7 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" case "${OSTYPE}" in solaris*) @@ -11205,9 +10808,7 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null @@ -11221,9 +10822,7 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then @@ -11270,9 +10869,7 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -11297,9 +10894,7 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" case ${distro} in "Wifislax") @@ -11420,9 +11015,7 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" nm_min_main_version="1" nm_min_subversion="0" @@ -11459,9 +11052,7 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" compatible=0 distro="Unknown Linux" @@ -11493,9 +11084,7 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" user=$(whoami) @@ -11507,9 +11096,7 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' @@ -11525,9 +11112,7 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 108 "blue" @@ -11628,9 +11213,7 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" @@ -11646,9 +11229,7 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then @@ -11664,9 +11245,7 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" window_width=$(tput cols) window_height=$(tput lines) @@ -11689,9 +11268,7 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" @@ -11708,9 +11285,7 @@ function print_intro() { #Generate the frames of the animated ascii art flying saucer function flying_saucer() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" case ${1} in 1) @@ -11752,9 +11327,7 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo -e "\033[s" @@ -11772,9 +11345,7 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" exit_code=0 check_kill_needed=0 @@ -11798,9 +11369,7 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" resolution_detected=0 if hash xdpyinfo 2> /dev/null; then @@ -11821,9 +11390,7 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" set_xsizes set_ysizes @@ -11854,9 +11421,7 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") @@ -11877,9 +11442,7 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) @@ -11899,9 +11462,7 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } @@ -11909,9 +11470,7 @@ function set_ypositions() { #Recalculate windows sizes and positions function recalculate_windows_sizes() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" detect_screen_resolution set_windows_sizes @@ -11920,9 +11479,7 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" clear current_menu="pre_main_menu" @@ -11993,9 +11550,7 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then @@ -12019,9 +11574,7 @@ function airmonzc_security_check() { #Compare if first float argument is greater than float second argument function compare_floats_greater_than() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>n2) exit 0; exit 1}' } @@ -12029,9 +11582,7 @@ function compare_floats_greater_than() { #Compare if first float argument is greater or equal than float second argument function compare_floats_greater_or_equal() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>=n2) exit 0; exit 1}' } @@ -12039,9 +11590,7 @@ function compare_floats_greater_or_equal() { #Update and relaunch the script function download_last_version() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -12063,9 +11612,7 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 287 "blue" @@ -12096,9 +11643,7 @@ function validate_et_internet_interface() { #Check for active internet connection function check_internet_access() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" ping -c 1 ${host_to_check_internet} -W 1 > /dev/null 2>&1 return $? @@ -12107,9 +11652,7 @@ function check_internet_access() { #Check for default route on an interface function check_default_route() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" route | grep "${1}" | grep "default" > /dev/null return $? @@ -12118,9 +11661,7 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 210 "blue" @@ -12156,9 +11697,7 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 @@ -12169,9 +11708,7 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" @@ -12187,9 +11724,7 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi + debug_print_function_and_parameters "${@}" echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 @@ -12212,30 +11747,18 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - echo_blue "---------" } #Print a large separator function print_large_separator() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - echo_blue "-------------------------------------------------------" } #Add the PoT prefix on printed strings if PoT mark is found function check_pending_of_translation() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - if [[ "${1}" =~ ^${escaped_pending_of_translation}([[:space:]])(.*)$ ]]; then text="${cyan_color}${pending_of_translation} ${2}${BASH_REMATCH[2]}" return 1 @@ -12256,10 +11779,6 @@ function check_pending_of_translation() { #Print under construction message used on some menu entries function under_construction_message() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - local var_uc="${under_constructionvar^}" echo echo_yellow "${var_uc}..." @@ -12269,10 +11788,6 @@ function under_construction_message() { #Canalize the echo functions function last_echo() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - check_pending_of_translation "${1}" "${2}" if [ "$?" != "0" ]; then echo -e "${2}${text}${normal_color}" @@ -12284,100 +11799,60 @@ function last_echo() { #Print green messages function echo_green() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${green_color}" } #Print blue messages function echo_blue() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${blue_color}" } #Print yellow messages function echo_yellow() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${yellow_color}" } #Print red messages function echo_red() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${red_color}" } #Print red messages using a slimmer thickness function echo_red_slim() { - - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - + last_echo "${1}" "${red_color_slim}" } #Print black messages with background for titles function echo_green_title() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${green_color_title}" } #Print pink messages function echo_pink() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${pink_color}" } #Print cyan messages function echo_cyan() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${cyan_color}" } #Print brown messages function echo_brown() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${brown_color}" } #Print white messages function echo_white() { - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME}" "${@}" - fi - last_echo "${1}" "${white_color}" } From f486f84bbb035c0950c9bf209872b70e1b53535a Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sat, 18 Feb 2017 08:49:25 +0200 Subject: [PATCH 27/41] Corrected tab indentation --- airgeddon.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index ddd7f8f31..9b5b1f420 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3935,10 +3935,10 @@ function language_strings() { #Print the current function's name with the parameters that have been passed #Call this function like this: debug_print_function_and_parameters "${@}" function debug_print_function_and_parameters() { - - if [ ${debug_mode} -eq 2 ]; then - echo "${FUNCNAME[1]}" "${@}" - fi + + if [ ${debug_mode} -eq 2 ]; then + echo "${FUNCNAME[1]}" "${@}" + fi } #Set the message to show again after an interrupt ([Ctrl+C] or [Ctrl+Z]) without exiting @@ -3962,7 +3962,7 @@ function interrupt_checkpoint() { #Add the text on a menu when you miss an optional tool function special_text_missed_optional_tool() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters "${@}" declare -a required_tools=("${!3}") From 3f7935dc75d2a20f0abb4f38114ea1fb2ba0b391 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sat, 18 Feb 2017 11:36:39 +0100 Subject: [PATCH 28/41] Minor fixes, spaces correction and updated credits. --- airgeddon.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 9b5b1f420..162e64e32 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20160218 +#Date.........: 20170218 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -625,7 +625,7 @@ function language_strings() { arr["SPANISH",11]="Saliendo de airgeddon script v${airgeddon_version} - Nos vemos pronto! :)" arr["FRENCH",11]="Fermeture du script airgeddon v${airgeddon_version} - A bientôt! :)" arr["CATALAN",11]="Sortint de airgeddon script v${airgeddon_version} - Ens veiem aviat! :)" - arr["PORTUGUESE",11]="Saindo do script airgeddon v${airgeddon_version} - Até breve! :)" + arr["PORTUGUESE",11]="Saindo do script airgeddon v${airgeddon_version} - Até breve! :)" arr["RUSSIAN",11]="Выход из скрипта airgeddon v${airgeddon_version} - До встречи! :)" arr["GREEK",11]="Κλείσιμο του airgeddon v${airgeddon_version} - Αντίο :)" @@ -1133,13 +1133,13 @@ function language_strings() { arr["RUSSIAN",74]="Этот скрипт под лицензией GPLv3 (или более поздней)" arr["GREEK",74]="Αυτό το script είναι υπό την άδεια GPLv3 (ή νεότερη)" - arr["ENGLISH",75]="Thanks to the \"Spanish pentesting crew\", to the \"Wifislax Staff\", to the forums people who help me, my collaborators, translators and specially to Kcdtv for beta testing and support received" - arr["SPANISH",75]="Gracias al \"Spanish pentesting crew\", al \"Wifislax Staff\", a la gente de los foros que me ayuda, a mis colaboradores, traductores y en especial a Kcdtv por el beta testing y el apoyo recibido" - arr["FRENCH",75]="Merci au \"Spanish pentesting crew\" , au \"Wifislax Staff\", aux gens des forums qui m'ont aidés, à mes collaborateurs, aux traducteurs et tout spécialement à Kcdtv pour les tests en phase bêta et son soutien" - arr["CATALAN",75]="Agraïments al \"Spanish pentesting crew\", al \"Wifislax Staff\", a la gent dels fòrums que m'ajuda, als meus col·laboradors, traductors i especialment al Kcdtv per les proves beta i el suport rebut" - arr["PORTUGUESE",75]="Agradecimentos a \"Spanish pentesting crew\", \"Wifislax Staff\", as pessoas dos fóruns por me ajudar, os colaboradores, tradutores e especialmente para Kcdtv por testes beta e também a todo apoio recebido" - arr["RUSSIAN",75]="Спасибо \"Spanish pentesting crew\", за \"Wifislax Staff\", людям с форумов, которые мне помогают, тем, кто принимает участие в проекте, переводчикам и особенно Kcdtv за бета тестирование и полученную поддержку" - arr["GREEK",75]="Τις ευχαριστίες μου στην \"Ισπανική ομάδα pentesting\", στο \"Wifislax Staff\", στα άτομα από το forum που με βοηθάνε, στους συνεργάτες μου, στους μεταφραστές και ειδικά στον Kcdtv για το beta testing και την υποστήριξη που λάβαμε από αυτόν" + arr["ENGLISH",75]="Thanks to the \"Spanish pentesting crew\", to the \"Wifislax Staff\", to the forums people who help me, my collaborators, translators and specially to Kcdtv and xtonousou for beta testing and support received" + arr["SPANISH",75]="Gracias al \"Spanish pentesting crew\", al \"Wifislax Staff\", a la gente de los foros que me ayuda, a mis colaboradores, traductores y en especial a Kcdtv y xtonousou por el beta testing y el apoyo recibido" + arr["FRENCH",75]="Merci au \"Spanish pentesting crew\" , au \"Wifislax Staff\", aux gens des forums qui m'ont aidés, à mes collaborateurs, aux traducteurs et tout spécialement à Kcdtv et xtonousou pour les tests en phase bêta et son soutien" + arr["CATALAN",75]="Agraïments al \"Spanish pentesting crew\", al \"Wifislax Staff\", a la gent dels fòrums que m'ajuda, als meus col·laboradors, traductors i especialment al Kcdtv i xtonousou per les proves beta i el suport rebut" + arr["PORTUGUESE",75]="Agradecimentos a \"Spanish pentesting crew\", \"Wifislax Staff\", as pessoas dos fóruns por me ajudar, os colaboradores, tradutores e especialmente para Kcdtv e xtonousou por testes beta e também a todo apoio recebido" + arr["RUSSIAN",75]="Спасибо \"Spanish pentesting crew\", за \"Wifislax Staff\", людям с форумов, которые мне помогают, тем, кто принимает участие в проекте, переводчикам и особенно Kcdtv и xtonousou за бета тестирование и полученную поддержку" + arr["GREEK",75]="Τις ευχαριστίες μου στην \"Ισπανική ομάδα pentesting\", στο \"Wifislax Staff\", στα άτομα από το forum που με βοηθάνε, στους συνεργάτες μου, στους μεταφραστές και ειδικά στον Kcdtv και xtonousou για το beta testing και την υποστήριξη που λάβαμε από αυτόν" arr["ENGLISH",76]="Invalid menu option was chosen" arr["SPANISH",76]="Opción del menú no válida" @@ -1777,7 +1777,7 @@ function language_strings() { arr["SPANISH",155]="El directorio existe pero no se especificó nombre de fichero. Se autogenerará [${normal_color}${suggested_filename}${yellow_color}]" arr["FRENCH",155]="Le dossier existe mais sans qu'aucun nom pour le fichier soit précisé. Il sera donc appelé [${normal_color}${suggested_filename}${yellow_color}]" arr["CATALAN",155]="El directori existeix però no s'ha especificat nom de fitxer. Es autogenerará [${normal_color}${suggested_filename}${yellow_color}]" - arr["PORTUGUESE",155]="O diretório existe, mas o nome do arquivo não foi especificado. Será gerado automaticamente [${normal_color}${suggested_filename}${yellow_color}]" + arr["PORTUGUESE",155]="O diretório existe, mas o nome do arquivo não foi especificado. Será gerado automaticamente [${normal_color}${suggested_filename}${yellow_color}]" arr["RUSSIAN",155]="Директория существует, но вы не указали имя файла. Оно будет сгенерировано автоматически [${normal_color}${suggested_filename}${yellow_color}]" arr["GREEK",155]="Ο κατάλογος υπάρχει αλλά δεν έχετε προσδιορίσει το όνομα του αρχείου [${normal_color}${suggested_filename}${yellow_color}]" @@ -2649,7 +2649,7 @@ function language_strings() { arr["SPANISH",264]="El ataque del portal cautivo intentará conseguir que uno de los clientes de la red nos proporcione la contraseña de la red wifi introduciéndola en nuestro portal" arr["FRENCH",264]="Le portail captif d'attaque tente d'obtenir l'un des clients du réseau nous fournir le mot de passe pour le réseau sans fil en entrant sur notre site" arr["CATALAN",264]="L'atac de portal captiu intenta aconseguir que un dels clients de la xarxa ens proporcioni la contrasenya de la xarxa wifi introduint-la al nostre portal" - arr["PORTUGUESE",264]="O ataque com portal cativo tenta fazer com que um dos clientes da rede nos forneça a senha da rede sem fio digitando-o em nosso site" + arr["PORTUGUESE",264]="O ataque com portal cativo tenta fazer com que um dos clientes da rede nos forneça a senha da rede sem fio digitando-o em nosso site" arr["RUSSIAN",264]="Атака с перехватывающим порталом заключается в том, что мы ждём когда кто-то из пользователей введёт верный пароль от Wi-Fi на веб-странице, которую мы ему показываем" arr["GREEK",264]="Η επίθεση captive portal κάνει έναν από τους χρήστες του δικτύου να μας παρέχει τον κωδικό πρόσβασης του δικτύου wifi βάζοντάς τον στο portal μας" @@ -2690,7 +2690,7 @@ function language_strings() { arr["FRENCH",269]="Pour mener à bien une attaque Evil Twin il vous faut être dans de bonnes conditions d'émission et de réception tantôt avec le point d'accès qu'avec le(s) client(s)" arr["CATALAN",269]="Per realitzar un atac Evil Twin et caldrà estar molt a prop de l'AP objectiu o tenir una antena wifi molt potent. El teu senyal ha d'arribar als clients igual de fort o més que la de l'AP legítim" arr["PORTUGUESE",269]="Para fazer um ataque Evil Twin você precisa estar perto do alvo ou ter uma antena wifi muito poderosa. Seu sinal deve atingir os clientes igualmente forte ou mais do que o AP legítimo" - arr["RUSSIAN",269]="Для выполнения атаки злой двойник, вы должны быть очень близко к целевой ТД или иметь очень мощную wifi антенну. Ваш сигнал должен достигать клиентов с такой же силой, или даже сильнее, чем легитимная ТД" + arr["RUSSIAN",269]="Для выполнения атаки злой двойник, вы должны быть очень близко к целевой ТД или иметь очень мощную wifi антенну. Ваш сигнал должен достигать клиентов с такой же силой, или даже сильнее, чем легитимная ТД" arr["GREEK",269]="Για να πραγματοποιηθεί μία επίθεση Evil Twin θα πρέπει να είστε αρκετά κοντά στο AP-στόχο ή να έχετε μία πολύ ισχυρή κεραία. Το σήμα πρέπει να φτάνει στους χρήστες το ίδιο ή περισσότερο από το αρχικό AP" arr["ENGLISH",270]="Evil Twin attack just AP" @@ -3683,7 +3683,7 @@ function language_strings() { arr["CATALAN",393]="Escriu un valor en segons (10-100) per al temps d'espera o prem [Enter] per acceptar el valor proposat [${normal_color}${timeout_secs_per_pin}${green_color}] :" arr["PORTUGUESE",393]="Insira um valor em segundos (10-100) para o timeout ou pressione [Enter] para aceitar o valor padrão [${normal_color}${timeout_secs_per_pin}${green_color}] :" arr["RUSSIAN",393]="Введите значение в секундах (10-100) для тайм-аута или нажмите [Enter], чтобы оставить по умолчанию [${normal_color}${timeout_secs_per_pin}${green_color}] :" - arr["GREEK",393]="Εισάγετε μια τιμή σε δευτερόλεπτα (10-100) για το timeout ή πατήστε [Enter] για να τεθεί η προεπιλεγμένη τιμή [${normal_color}${timeout_secs_per_pin}${green_color}] :" + arr["GREEK",393]="Εισάγετε μια τιμή σε δευτερόλεπτα (10-100) για το timeout ή πατήστε [Enter] για να τεθεί η προεπιλεγμένη τιμή [${normal_color}${timeout_secs_per_pin}${green_color}] :" arr["ENGLISH",394]="Type value in seconds (25-2400) for Pixie Dust timeout or press [Enter] to accept the proposal [${normal_color}${timeout_secs_per_pixiedust}${green_color}] :" arr["SPANISH",394]="Escribe un valor en segundos (25-2400) para el timeout de Pixie Dust o pulsa [Enter] para aceptar el valor propuesto [${normal_color}${timeout_secs_per_pixiedust}${green_color}] :" @@ -3801,7 +3801,7 @@ function language_strings() { arr["SPANISH",408]="Si instalaste BeEF manualmente, puede que airgeddon no sea capaz de encontrarlo y la opción del ataque te aparezca restringida. Puedes intentar solucionarlo usando la opción del menú especial para ello. Esto sólo funcionará si BeEF ya está instalado correctamente y el único problema que tienes es que el script no lo detecta" arr["FRENCH",408]="Si BeEF a été installé manuellement, il se peut qu'airgeddon ne soit pas en mesure de le trouver. L'option dédiée ne sera pas accessible. Vous pouvez essayer de la réparer en utilisant l'option consacrée à cette tâche depuis le menu spécial. Ça ne marchera que si BeEf est correctement instalé et c'est le script qui n'est pas capable de le détecter" arr["CATALAN",408]="Si vas instal·lar BeEF manualment, pot ser que airgeddon no sigui capaç de trobar-lo i l'opció de l'atac t'aparegui restringida. Pots intentar solucionar usant l'opció del menú especial per a això. Això només funcionarà si BeEF ja està instal·lat correctament i l'únic problema que tens és que el script no el detecta" - arr["PORTUGUESE",408]="Se BeEF foi instalado manualmente, o airgeddon não pode encontrá-lo automaticamente e a opção de ataque aparecerá bloqueada. Você pode tentar corrigi-lo usando a opção de menu especial para isso. Isso só vai funcionar se BeEF já está instalado com êxito e o único problema que você tem é que o script não o detecta" + arr["PORTUGUESE",408]="Se BeEF foi instalado manualmente, o airgeddon não pode encontrá-lo automaticamente e a opção de ataque aparecerá bloqueada. Você pode tentar corrigi-lo usando a opção de menu especial para isso. Isso só vai funcionar se BeEF já está instalado com êxito e o único problema que você tem é que o script não o detecta" arr["RUSSIAN",408]="Если вы установили BeEF вручную, airgeddon может быть не в состоянии найти его, и опция атаки в меню может быть ограничена. Для исправления этого, вы можете попытаться решить эту проблему с помощью специального пункта меню. Это сработает только если BeEF уже правильно установлен, и ваша единственная проблема в том, что скрипт не обнаруживает его" arr["GREEK",408]="Εάν έχετε εγκαταστήσει χειροκίνητα το BeEF, το airgeddon μπορεί να μην μπορέσει να το βρεί και η επιλογή της επίθεσης μπορεί να φανεί σαν περιορισμένη. Μπορείτε να προσπαθήσετε να διορθώσετε το πρόβλημα κάνοντας χρήση της ειδικής επιλογής στο μενού. Θα λειτουργήσει μόνο αν το BeEF έχει ήδη εγκατασταθεί σωστά και το μόνο πρόβλημα είναι ότι το script δεν το εντοπίζει" @@ -11822,7 +11822,7 @@ function echo_red() { #Print red messages using a slimmer thickness function echo_red_slim() { - + last_echo "${1}" "${red_color_slim}" } From b48473a4e5d3dec32b0979e5e28f73e45d41c435 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sat, 18 Feb 2017 14:42:27 +0100 Subject: [PATCH 29/41] Changed debug_mode=2 functionality --- airgeddon.sh | 103 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 86 insertions(+), 17 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 162e64e32..2113c5b42 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -185,17 +185,17 @@ currentpassfile="ag.et_currentpass.txt" successfile="ag.et_success.txt" processesfile="ag.et_processes.txt" possible_dhcp_leases_files=( - "/var/lib/dhcp/dhcpd.leases" - "/var/state/dhcp/dhcpd.leases" - "/var/lib/dhcpd/dhcpd.leases" - ) -possible_beef_known_locations=( - "/usr/share/beef/" - "/usr/share/beef-xss/" - "/opt/beef/" - "/opt/beef-project/" - #Custom BeEF location (set=0) + "/var/lib/dhcp/dhcpd.leases" + "/var/state/dhcp/dhcpd.leases" + "/var/lib/dhcpd/dhcpd.leases" ) +possible_beef_known_locations=( + "/usr/share/beef/" + "/usr/share/beef-xss/" + "/opt/beef/" + "/opt/beef-project/" + #Custom BeEF location (set=0) + ) #Distros vars known_compatible_distros=( @@ -217,10 +217,10 @@ known_compatible_distros=( ) known_arm_compatible_distros=( - "Raspbian" - "Parrot arm" - "Kali arm" - ) + "Raspbian" + "Parrot arm" + "Kali arm" + ) #Hint vars declare main_hints=(128 134 163) @@ -258,6 +258,8 @@ normal_color="\e[1;0m" #Set different language text strings function language_strings() { + debug_print_function_and_parameters "${@}" + declare -A unknown_chipset unknown_chipset["ENGLISH"]="Unknown" unknown_chipset["SPANISH"]="Desconocido" @@ -3932,18 +3934,55 @@ function language_strings() { esac } -#Print the current function's name with the parameters that have been passed -#Call this function like this: debug_print_function_and_parameters "${@}" +#Print the current function's name with the parameters that have been passed for some (on which are useful) functions function debug_print_function_and_parameters() { - + if [ ${debug_mode} -eq 2 ]; then + + excluded_functions=( + "ask_yesno" + "check_pending_of_translation" + "contains_element" + "echo_blue" + "echo_brown" + "echo_cyan" + "echo_green" + "echo_green_title" + "echo_pink" + "echo_red" + "echo_red_slim" + "echo_white" + "echo_yellow" + "generate_dynamic_line" + "interrupt_checkpoint" + "language_strings" + "last_echo" + "print_hint" + "print_large_separator" + "print_simple_separator" + "read_yesno" + "remove_warnings" + "special_text_missed_optional_tool" + "store_array" + "under_construction_message" + ) + + for item in "${excluded_functions[@]}"; do + if [ "${item}" = "${FUNCNAME[1]}" ]; then + return 1 + fi + done + echo "${FUNCNAME[1]}" "${@}" + return 0 fi } #Set the message to show again after an interrupt ([Ctrl+C] or [Ctrl+Z]) without exiting function interrupt_checkpoint() { + debug_print_function_and_parameters "${@}" + if [ -z "${last_buffered_type1}" ]; then last_buffered_message1=${1} last_buffered_message2=${1} @@ -11747,18 +11786,24 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { + debug_print_function_and_parameters "${@}" + echo_blue "---------" } #Print a large separator function print_large_separator() { + debug_print_function_and_parameters "${@}" + echo_blue "-------------------------------------------------------" } #Add the PoT prefix on printed strings if PoT mark is found function check_pending_of_translation() { + debug_print_function_and_parameters "${@}" + if [[ "${1}" =~ ^${escaped_pending_of_translation}([[:space:]])(.*)$ ]]; then text="${cyan_color}${pending_of_translation} ${2}${BASH_REMATCH[2]}" return 1 @@ -11779,6 +11824,8 @@ function check_pending_of_translation() { #Print under construction message used on some menu entries function under_construction_message() { + debug_print_function_and_parameters "${@}" + local var_uc="${under_constructionvar^}" echo echo_yellow "${var_uc}..." @@ -11788,6 +11835,8 @@ function under_construction_message() { #Canalize the echo functions function last_echo() { + debug_print_function_and_parameters "${@}" + check_pending_of_translation "${1}" "${2}" if [ "$?" != "0" ]; then echo -e "${2}${text}${normal_color}" @@ -11799,60 +11848,80 @@ function last_echo() { #Print green messages function echo_green() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${green_color}" } #Print blue messages function echo_blue() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${blue_color}" } #Print yellow messages function echo_yellow() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${yellow_color}" } #Print red messages function echo_red() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${red_color}" } #Print red messages using a slimmer thickness function echo_red_slim() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${red_color_slim}" } #Print black messages with background for titles function echo_green_title() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${green_color_title}" } #Print pink messages function echo_pink() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${pink_color}" } #Print cyan messages function echo_cyan() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${cyan_color}" } #Print brown messages function echo_brown() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${brown_color}" } #Print white messages function echo_white() { + debug_print_function_and_parameters "${@}" + last_echo "${1}" "${white_color}" } From f8be5bcc40d02b1e4420bcc06d94ccc844e22de1 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sat, 18 Feb 2017 15:07:31 +0100 Subject: [PATCH 30/41] Telegram group mention and some guidelines added on CONTRIBUTING.md --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b10ee6d3..420a7b02a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,10 +26,15 @@ Please note we have a code of conduct, please follow it in all your interactions - *Y* is a minor release with a new feature for an existing menu or a new submenu for an existing feature - *Z* is a minor release with new bug fixes, small modifications or code improvements 6. Update the date on `airgeddon.sh` under shebang, if appropriate. -7. Direct push to [Master] is not allowed. Pull Requests require revision and approvement. +7. Direct push to [Master] is not allowed. +8. Pull Requests to [Master] are not allowed. Should be done over `dev` or any other branch. They require revision and approvement. +9. All the development and coding must be in English. *Be sure to merge the latest from "upstream" before making a pull request!* +We also have a private Telegram group for *trusted collaborators* for more agile discussion about developments, improvements, etc. +To be added on it you must prove first you are a *trusted collaborator* with your contributions. + ## WPS PIN Database Collaborators 1. Add PINs ordered by the key in the associative array. (Keys are the first 6 BSSID digits). From 36592dcb69f358abca227f96fedd17364b9c1ba7 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sat, 18 Feb 2017 15:15:31 +0100 Subject: [PATCH 31/41] Return two "wc -l" lines to their old state to fix errors. --- airgeddon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 2113c5b42..71dabc11c 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -8053,7 +8053,7 @@ function set_control_script() { cat >&7 <<-'EOF' echo "${msg_good_pass} $( (cat < ${success_pass_path}) 2> /dev/null)" >> ${log_path} - attempts_number=$( (wc -l < "${attempts_path}") 2> /dev/null) + attempts_number=$( (cat < "${attempts_path}" | wc -l) 2> /dev/null) et_password=$( (cat < ${success_pass_path}) 2> /dev/null) echo -e "\t${et_password}" echo @@ -8149,7 +8149,7 @@ function set_control_script() { echo finish_evil_twin else - attempts_number=$( (wc -l < "${attempts_path}") 2> /dev/null) + attempts_number=$( (cat < "${attempts_path}" | wc -l) 2> /dev/null) last_password=$(grep "." ${attempts_path} 2> /dev/null | tail -1) tput el && echo -ne "\t${attempts_text} ${attempts_number}" if [ "${attempts_number}" -gt 0 ]; then From 620be5552f1b68959b004fe5954493028a4f81b6 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 19 Feb 2017 04:09:46 +0100 Subject: [PATCH 32/41] Improved performance on array search in debug_print_function_and_parameters function --- airgeddon.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 71dabc11c..b1101d475 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3967,11 +3967,9 @@ function debug_print_function_and_parameters() { "under_construction_message" ) - for item in "${excluded_functions[@]}"; do - if [ "${item}" = "${FUNCNAME[1]}" ]; then - return 1 - fi - done + if (IFS=$'\n'; echo "${excluded_functions[*]}") | grep -qFx "${FUNCNAME[1]}"; then + return 1 + fi echo "${FUNCNAME[1]}" "${@}" return 0 From 42f567af562eec717bd177561f9611e1dc3ceca5 Mon Sep 17 00:00:00 2001 From: OscarAkaElvis Date: Sun, 19 Feb 2017 14:58:20 +0100 Subject: [PATCH 33/41] Small modification on greetings on README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0335e106a..1f269d3e9 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,8 @@ Use it only on your own networks or with the network's owner permission.
**El padrino** and [cLn] for Catalan translations,
[Luan] for Portuguese translations,
[MiAl] for Russian translations,
-[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff. +[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff,
+[OscarAkaElvis] for allowing me to own his body when I visit the earth. #### Hat tip to @@ -257,3 +258,4 @@ Use it only on your own networks or with the network's owner permission.
[Luan]: https://github.com/Luan7805 [MiAl]: https://github.com/Mi-Al [xtonousou]: https://github.com/xtonousou "xT" +[OscarAkaElvis]: https://github.com/OscarAkaElvis From 66f1642506b2225fd3cac8e944180867e50b611b Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 19 Feb 2017 19:55:30 +0100 Subject: [PATCH 34/41] Removed SC2119 and SC2120 warnings --- airgeddon.sh | 400 +++++++++++++++++++++++++-------------------------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index b1101d475..87fcec6dd 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20170218 +#Date.........: 20170219 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -4069,7 +4069,7 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters check_interface_mode case "${ifacemode}" in @@ -4092,7 +4092,7 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters check_interface_mode case "${ifacemode}" in @@ -4115,7 +4115,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) @@ -4131,7 +4131,7 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters execute_iwconfig_fix return $? @@ -4140,7 +4140,7 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" @@ -4152,7 +4152,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs @@ -4172,7 +4172,7 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters renew_ifaces_and_macs_list interface_auto_change=0 @@ -4204,7 +4204,7 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} @@ -4217,7 +4217,7 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) @@ -4226,7 +4226,7 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } @@ -4234,7 +4234,7 @@ function calculate_computepin_algorithm_step2() { #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4279,7 +4279,7 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 388 "blue" @@ -4305,7 +4305,7 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do @@ -4333,7 +4333,7 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" @@ -4342,7 +4342,7 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters bssid_found_in_db=0 counter_pins_found=0 @@ -4363,7 +4363,7 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters disable_rfkill @@ -4379,7 +4379,7 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters et_initial_state=${ifacemode} @@ -4401,7 +4401,7 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 299 "blue" @@ -4428,7 +4428,7 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 @@ -4438,7 +4438,7 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters check_to_set_managed @@ -4472,7 +4472,7 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters check_to_set_monitor @@ -4521,7 +4521,7 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters execute_iwconfig_fix if [ "$?" != "0" ]; then @@ -4552,7 +4552,7 @@ function check_interface_mode() { #Language change menu function language_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 87 "title" @@ -4693,7 +4693,7 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 @@ -4786,7 +4786,7 @@ function select_internet_interface() { #Interface selection menu function select_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 88 "title" @@ -4933,7 +4933,7 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 29 "green" @@ -4943,7 +4943,7 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do @@ -4962,7 +4962,7 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 363 "green" @@ -4972,7 +4972,7 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters local regexp="^[0-9]{8}$" custom_pin="" @@ -5047,7 +5047,7 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5065,7 +5065,7 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5083,7 +5083,7 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5101,7 +5101,7 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5119,7 +5119,7 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5137,7 +5137,7 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 32 "green" @@ -5155,7 +5155,7 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters wps_pin_database_prerequisites @@ -5168,7 +5168,7 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters wps_pin_database_prerequisites @@ -5181,7 +5181,7 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 89 "title" @@ -5201,7 +5201,7 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 90 "title" @@ -5219,7 +5219,7 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 91 "title" @@ -5235,7 +5235,7 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 92 "title" @@ -5251,7 +5251,7 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 93 "title" @@ -5267,7 +5267,7 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 94 "title" @@ -5283,7 +5283,7 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 95 "title" @@ -5305,7 +5305,7 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 96 "title" @@ -5327,7 +5327,7 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 97 "title" @@ -5349,7 +5349,7 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 98 "title" @@ -5371,7 +5371,7 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 99 "title" @@ -5392,7 +5392,7 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 100 "title" @@ -5413,7 +5413,7 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters check_monitor_enabled if [ "$?" != "0" ]; then @@ -5445,7 +5445,7 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" @@ -5461,7 +5461,7 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then @@ -5475,7 +5475,7 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5498,7 +5498,7 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5526,7 +5526,7 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5574,7 +5574,7 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" @@ -5608,7 +5608,7 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5634,7 +5634,7 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) @@ -5656,7 +5656,7 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then @@ -5674,7 +5674,7 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters declare -gA optional_tools=() @@ -5686,7 +5686,7 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters forbidden_options=() @@ -5751,7 +5751,7 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 @@ -5783,7 +5783,7 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward @@ -5795,7 +5795,7 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters iptables -F iptables -t nat -F @@ -5921,7 +5921,7 @@ function print_hint() { #airgeddon main menu function main_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 101 "title" @@ -5991,7 +5991,7 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 253 "title" @@ -6118,7 +6118,7 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return @@ -6193,7 +6193,7 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 334 "title" @@ -6420,7 +6420,7 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 170 "title" @@ -6501,7 +6501,7 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6513,7 +6513,7 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6525,7 +6525,7 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6537,7 +6537,7 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${enteredpath}" ]; then echo @@ -6554,7 +6554,7 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${DICTIONARY}" ]; then echo @@ -6571,7 +6571,7 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -n "${RULES}" ]; then echo @@ -6743,7 +6743,7 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters manage_asking_for_captured_file @@ -6763,7 +6763,7 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters manage_asking_for_captured_file @@ -6790,7 +6790,7 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters manage_asking_for_captured_file @@ -6811,7 +6811,7 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters manage_asking_for_captured_file @@ -6839,7 +6839,7 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters manage_asking_for_captured_file @@ -6862,7 +6862,7 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then @@ -6900,7 +6900,7 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters ettercap_log=0 ask_yesno 302 @@ -6925,7 +6925,7 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters bettercap_log=0 ask_yesno 302 @@ -6950,7 +6950,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} @@ -6968,7 +6968,7 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 293 "title" @@ -7020,7 +7020,7 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7033,7 +7033,7 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7046,7 +7046,7 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_minlength maxlength=0 @@ -7185,7 +7185,7 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" @@ -7194,7 +7194,7 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" @@ -7203,7 +7203,7 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7215,7 +7215,7 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7227,7 +7227,7 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7239,7 +7239,7 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_hostapd_config launch_fake_ap @@ -7262,7 +7262,7 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_hostapd_config launch_fake_ap @@ -7289,7 +7289,7 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_hostapd_config launch_fake_ap @@ -7317,7 +7317,7 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_hostapd_config launch_fake_ap @@ -7355,7 +7355,7 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_hostapd_config launch_fake_ap @@ -7385,7 +7385,7 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7405,7 +7405,7 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 @@ -7431,7 +7431,7 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then @@ -7514,7 +7514,7 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) @@ -7560,7 +7560,7 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters killall dhcpd > /dev/null 2>&1 @@ -7584,7 +7584,7 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters prepare_et_monitor @@ -7986,7 +7986,7 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 @@ -8209,7 +8209,7 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & @@ -8219,7 +8219,7 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters recalculate_windows_sizes case ${et_mode} in @@ -8250,7 +8250,7 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 @@ -8275,7 +8275,7 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8481,7 +8481,7 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes @@ -8497,7 +8497,7 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes @@ -8508,7 +8508,7 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters recalculate_windows_sizes case ${et_mode} in @@ -8531,7 +8531,7 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8610,7 +8610,7 @@ function set_beef_config() { #Kill beef process function kill_beef() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8626,7 +8626,7 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) @@ -8641,7 +8641,7 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do @@ -8657,7 +8657,7 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then @@ -8701,7 +8701,7 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters while [[ "${valid_possible_beef_path}" != "1" ]]; do echo @@ -8778,7 +8778,7 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8789,7 +8789,7 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters kill_beef @@ -8812,7 +8812,7 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -8834,7 +8834,7 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 304 "blue" @@ -8874,7 +8874,7 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 304 "blue" @@ -8932,7 +8932,7 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" @@ -8942,7 +8942,7 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null @@ -8953,7 +8953,7 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 @@ -8963,7 +8963,7 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 120 "title" @@ -9023,7 +9023,7 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo check_valid_file_to_clean "${filetoclean}" @@ -9039,7 +9039,7 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo readpath=0 @@ -9070,7 +9070,7 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 102 "title" @@ -9171,7 +9171,7 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo @@ -9241,7 +9241,7 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo @@ -9561,7 +9561,7 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters language_strings "${language}" 143 "blue" echo @@ -9579,7 +9579,7 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 103 "title" @@ -9655,7 +9655,7 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 103 "title" @@ -9833,7 +9833,7 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 104 "title" @@ -9923,7 +9923,7 @@ function select_target() { #Perform a test to determine if fcs parameter is needed on wash scanning function set_wash_parametrization() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters fcs="" declare -gA wash_ifaces_already_set @@ -9942,7 +9942,7 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_wps_mac_parameters include_pin_dbfile @@ -9969,7 +9969,7 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ ${retry_handshake_capture} -eq 1 ]; then return @@ -10104,7 +10104,7 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo readpath=0 @@ -10145,7 +10145,7 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ ${return_to_et_main_menu} -eq 1 ]; then return @@ -10323,7 +10323,7 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ ${internet_interface_selected} -eq 1 ]; then return 0 @@ -10351,7 +10351,7 @@ function detect_internet_interface() { #Show about and credits function credits_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear language_strings "${language}" 105 "title" @@ -10380,7 +10380,7 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 82 "red" @@ -10393,7 +10393,7 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters language_strings "${language}" 82 "red" echo @@ -10404,7 +10404,7 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 220 "red" @@ -10414,7 +10414,7 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 76 "red" @@ -10424,7 +10424,7 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 77 "red" @@ -10437,7 +10437,7 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 77 "red" @@ -10484,7 +10484,7 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters action_on_exit_taken=0 echo @@ -10544,7 +10544,7 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then @@ -10573,7 +10573,7 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo -ne " " for (( j=1; j<=4; j++ )); do @@ -10585,7 +10585,7 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters airmon="airmon-ng" @@ -10597,7 +10597,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" @@ -10609,7 +10609,7 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters hashcat_fix="" hashcat_charset_fix_needed=0 @@ -10622,7 +10622,7 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} @@ -10631,7 +10631,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } @@ -10639,7 +10639,7 @@ function get_bettercap_version() { #Determine bully version function get_bully_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} @@ -10648,7 +10648,7 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then @@ -10660,7 +10660,7 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" @@ -10672,7 +10672,7 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 @@ -10683,7 +10683,7 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 @@ -10694,7 +10694,7 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -10712,7 +10712,7 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" @@ -10780,7 +10780,7 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) @@ -10795,7 +10795,7 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters ask_yesno 380 if [ ${yesno} = "n" ]; then @@ -10814,7 +10814,7 @@ function get_local_pin_dbfile_checksum() { #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) @@ -10827,7 +10827,7 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters case "${OSTYPE}" in solaris*) @@ -10845,7 +10845,7 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null @@ -10859,7 +10859,7 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then @@ -10906,7 +10906,7 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -10931,7 +10931,7 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters case ${distro} in "Wifislax") @@ -11052,7 +11052,7 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters nm_min_main_version="1" nm_min_subversion="0" @@ -11089,7 +11089,7 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters compatible=0 distro="Unknown Linux" @@ -11121,7 +11121,7 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters user=$(whoami) @@ -11133,7 +11133,7 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' @@ -11149,7 +11149,7 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 108 "blue" @@ -11250,7 +11250,7 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" @@ -11266,7 +11266,7 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then @@ -11282,7 +11282,7 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters window_width=$(tput cols) window_height=$(tput lines) @@ -11305,7 +11305,7 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" @@ -11364,7 +11364,7 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo -e "\033[s" @@ -11382,7 +11382,7 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters exit_code=0 check_kill_needed=0 @@ -11406,7 +11406,7 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters resolution_detected=0 if hash xdpyinfo 2> /dev/null; then @@ -11427,7 +11427,7 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters set_xsizes set_ysizes @@ -11458,7 +11458,7 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") @@ -11479,7 +11479,7 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) @@ -11499,7 +11499,7 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } @@ -11507,7 +11507,7 @@ function set_ypositions() { #Recalculate windows sizes and positions function recalculate_windows_sizes() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters detect_screen_resolution set_windows_sizes @@ -11516,7 +11516,7 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters clear current_menu="pre_main_menu" @@ -11587,7 +11587,7 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then @@ -11627,7 +11627,7 @@ function compare_floats_greater_or_equal() { #Update and relaunch the script function download_last_version() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -11649,7 +11649,7 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 287 "blue" @@ -11698,7 +11698,7 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo language_strings "${language}" 210 "blue" @@ -11734,7 +11734,7 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 @@ -11745,7 +11745,7 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" @@ -11761,7 +11761,7 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 @@ -11784,7 +11784,7 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo_blue "---------" } @@ -11792,7 +11792,7 @@ function print_simple_separator() { #Print a large separator function print_large_separator() { - debug_print_function_and_parameters "${@}" + debug_print_function_and_parameters echo_blue "-------------------------------------------------------" } From 8749369d0046de2cf671229dd4f81e199c6a439e Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Sun, 19 Feb 2017 19:57:25 +0100 Subject: [PATCH 35/41] Corrected typo in function name --- airgeddon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 87fcec6dd..845481771 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -9671,7 +9671,7 @@ function explore_for_wps_targets_option() { echo if ! grep -qe "${interface}" <(echo "${!wash_ifaces_already_set[@]}"); then language_strings "${language}" 353 "blue" - set_wash_parametrization + set_wash_parameterization language_strings "${language}" 354 "yellow" else language_strings "${language}" 355 "blue" @@ -9921,7 +9921,7 @@ function select_target() { } #Perform a test to determine if fcs parameter is needed on wash scanning -function set_wash_parametrization() { +function set_wash_parameterization() { debug_print_function_and_parameters From cb91e758432412712c12a4da002437246dc2b553 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sun, 19 Feb 2017 23:19:03 +0200 Subject: [PATCH 36/41] Revert "Small modification on greetings on README.md" This reverts commit 42f567af562eec717bd177561f9611e1dc3ceca5. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f269d3e9..0335e106a 100644 --- a/README.md +++ b/README.md @@ -195,8 +195,7 @@ Use it only on your own networks or with the network's owner permission.
**El padrino** and [cLn] for Catalan translations,
[Luan] for Portuguese translations,
[MiAl] for Russian translations,
-[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff,
-[OscarAkaElvis] for allowing me to own his body when I visit the earth. +[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff. #### Hat tip to @@ -258,4 +257,3 @@ Use it only on your own networks or with the network's owner permission.
[Luan]: https://github.com/Luan7805 [MiAl]: https://github.com/Mi-Al [xtonousou]: https://github.com/xtonousou "xT" -[OscarAkaElvis]: https://github.com/OscarAkaElvis From 9ebdeec3a2ce9bce56df482bd58b521b0bfc78ad Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sun, 19 Feb 2017 23:19:28 +0200 Subject: [PATCH 37/41] Revert "Corrected typo in function name" This reverts commit 8749369d0046de2cf671229dd4f81e199c6a439e. --- airgeddon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 845481771..87fcec6dd 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -9671,7 +9671,7 @@ function explore_for_wps_targets_option() { echo if ! grep -qe "${interface}" <(echo "${!wash_ifaces_already_set[@]}"); then language_strings "${language}" 353 "blue" - set_wash_parameterization + set_wash_parametrization language_strings "${language}" 354 "yellow" else language_strings "${language}" 355 "blue" @@ -9921,7 +9921,7 @@ function select_target() { } #Perform a test to determine if fcs parameter is needed on wash scanning -function set_wash_parameterization() { +function set_wash_parametrization() { debug_print_function_and_parameters From 40386dc1250ad8eb0982be5a33d9c2ad122da7a9 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Sun, 19 Feb 2017 23:19:35 +0200 Subject: [PATCH 38/41] Revert "Removed SC2119 and SC2120 warnings" This reverts commit 66f1642506b2225fd3cac8e944180867e50b611b. --- airgeddon.sh | 400 +++++++++++++++++++++++++-------------------------- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 87fcec6dd..b1101d475 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20170219 +#Date.........: 20170218 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -4069,7 +4069,7 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4092,7 +4092,7 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_interface_mode case "${ifacemode}" in @@ -4115,7 +4115,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) @@ -4131,7 +4131,7 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" execute_iwconfig_fix return $? @@ -4140,7 +4140,7 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" @@ -4152,7 +4152,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs @@ -4172,7 +4172,7 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" renew_ifaces_and_macs_list interface_auto_change=0 @@ -4204,7 +4204,7 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} @@ -4217,7 +4217,7 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) @@ -4226,7 +4226,7 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } @@ -4234,7 +4234,7 @@ function calculate_computepin_algorithm_step2() { #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4279,7 +4279,7 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 388 "blue" @@ -4305,7 +4305,7 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do @@ -4333,7 +4333,7 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" @@ -4342,7 +4342,7 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bssid_found_in_db=0 counter_pins_found=0 @@ -4363,7 +4363,7 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" disable_rfkill @@ -4379,7 +4379,7 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" et_initial_state=${ifacemode} @@ -4401,7 +4401,7 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 299 "blue" @@ -4428,7 +4428,7 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 @@ -4438,7 +4438,7 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_to_set_managed @@ -4472,7 +4472,7 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_to_set_monitor @@ -4521,7 +4521,7 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" execute_iwconfig_fix if [ "$?" != "0" ]; then @@ -4552,7 +4552,7 @@ function check_interface_mode() { #Language change menu function language_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 87 "title" @@ -4693,7 +4693,7 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 @@ -4786,7 +4786,7 @@ function select_internet_interface() { #Interface selection menu function select_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 88 "title" @@ -4933,7 +4933,7 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 29 "green" @@ -4943,7 +4943,7 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do @@ -4962,7 +4962,7 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 363 "green" @@ -4972,7 +4972,7 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" local regexp="^[0-9]{8}$" custom_pin="" @@ -5047,7 +5047,7 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5065,7 +5065,7 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5083,7 +5083,7 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5101,7 +5101,7 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5119,7 +5119,7 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5137,7 +5137,7 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 32 "green" @@ -5155,7 +5155,7 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5168,7 +5168,7 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" wps_pin_database_prerequisites @@ -5181,7 +5181,7 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 89 "title" @@ -5201,7 +5201,7 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 90 "title" @@ -5219,7 +5219,7 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 91 "title" @@ -5235,7 +5235,7 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 92 "title" @@ -5251,7 +5251,7 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 93 "title" @@ -5267,7 +5267,7 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 94 "title" @@ -5283,7 +5283,7 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 95 "title" @@ -5305,7 +5305,7 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 96 "title" @@ -5327,7 +5327,7 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 97 "title" @@ -5349,7 +5349,7 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 98 "title" @@ -5371,7 +5371,7 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 99 "title" @@ -5392,7 +5392,7 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 100 "title" @@ -5413,7 +5413,7 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" check_monitor_enabled if [ "$?" != "0" ]; then @@ -5445,7 +5445,7 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" @@ -5461,7 +5461,7 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then @@ -5475,7 +5475,7 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5498,7 +5498,7 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5526,7 +5526,7 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5574,7 +5574,7 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" @@ -5608,7 +5608,7 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5634,7 +5634,7 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) @@ -5656,7 +5656,7 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then @@ -5674,7 +5674,7 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" declare -gA optional_tools=() @@ -5686,7 +5686,7 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" forbidden_options=() @@ -5751,7 +5751,7 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 @@ -5783,7 +5783,7 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward @@ -5795,7 +5795,7 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iptables -F iptables -t nat -F @@ -5921,7 +5921,7 @@ function print_hint() { #airgeddon main menu function main_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 101 "title" @@ -5991,7 +5991,7 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 253 "title" @@ -6118,7 +6118,7 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return @@ -6193,7 +6193,7 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 334 "title" @@ -6420,7 +6420,7 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 170 "title" @@ -6501,7 +6501,7 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6513,7 +6513,7 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6525,7 +6525,7 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6537,7 +6537,7 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${enteredpath}" ]; then echo @@ -6554,7 +6554,7 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${DICTIONARY}" ]; then echo @@ -6571,7 +6571,7 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -n "${RULES}" ]; then echo @@ -6743,7 +6743,7 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6763,7 +6763,7 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6790,7 +6790,7 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6811,7 +6811,7 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6839,7 +6839,7 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" manage_asking_for_captured_file @@ -6862,7 +6862,7 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then @@ -6900,7 +6900,7 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ettercap_log=0 ask_yesno 302 @@ -6925,7 +6925,7 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bettercap_log=0 ask_yesno 302 @@ -6950,7 +6950,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} @@ -6968,7 +6968,7 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 293 "title" @@ -7020,7 +7020,7 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7033,7 +7033,7 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7046,7 +7046,7 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_minlength maxlength=0 @@ -7185,7 +7185,7 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" @@ -7194,7 +7194,7 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" @@ -7203,7 +7203,7 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7215,7 +7215,7 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7227,7 +7227,7 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7239,7 +7239,7 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7262,7 +7262,7 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7289,7 +7289,7 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7317,7 +7317,7 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7355,7 +7355,7 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_hostapd_config launch_fake_ap @@ -7385,7 +7385,7 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7405,7 +7405,7 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 @@ -7431,7 +7431,7 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then @@ -7514,7 +7514,7 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) @@ -7560,7 +7560,7 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall dhcpd > /dev/null 2>&1 @@ -7584,7 +7584,7 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" prepare_et_monitor @@ -7986,7 +7986,7 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 @@ -8209,7 +8209,7 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & @@ -8219,7 +8219,7 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8250,7 +8250,7 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 @@ -8275,7 +8275,7 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8481,7 +8481,7 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes @@ -8497,7 +8497,7 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes @@ -8508,7 +8508,7 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes case ${et_mode} in @@ -8531,7 +8531,7 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8610,7 +8610,7 @@ function set_beef_config() { #Kill beef process function kill_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8626,7 +8626,7 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) @@ -8641,7 +8641,7 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do @@ -8657,7 +8657,7 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then @@ -8701,7 +8701,7 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" while [[ "${valid_possible_beef_path}" != "1" ]]; do echo @@ -8778,7 +8778,7 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8789,7 +8789,7 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" kill_beef @@ -8812,7 +8812,7 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -8834,7 +8834,7 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -8874,7 +8874,7 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 304 "blue" @@ -8932,7 +8932,7 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" @@ -8942,7 +8942,7 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null @@ -8953,7 +8953,7 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 @@ -8963,7 +8963,7 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 120 "title" @@ -9023,7 +9023,7 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo check_valid_file_to_clean "${filetoclean}" @@ -9039,7 +9039,7 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -9070,7 +9070,7 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 102 "title" @@ -9171,7 +9171,7 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo @@ -9241,7 +9241,7 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo @@ -9561,7 +9561,7 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" language_strings "${language}" 143 "blue" echo @@ -9579,7 +9579,7 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -9655,7 +9655,7 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 103 "title" @@ -9833,7 +9833,7 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 104 "title" @@ -9923,7 +9923,7 @@ function select_target() { #Perform a test to determine if fcs parameter is needed on wash scanning function set_wash_parametrization() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" fcs="" declare -gA wash_ifaces_already_set @@ -9942,7 +9942,7 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_wps_mac_parameters include_pin_dbfile @@ -9969,7 +9969,7 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${retry_handshake_capture} -eq 1 ]; then return @@ -10104,7 +10104,7 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo readpath=0 @@ -10145,7 +10145,7 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${return_to_et_main_menu} -eq 1 ]; then return @@ -10323,7 +10323,7 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${internet_interface_selected} -eq 1 ]; then return 0 @@ -10351,7 +10351,7 @@ function detect_internet_interface() { #Show about and credits function credits_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear language_strings "${language}" 105 "title" @@ -10380,7 +10380,7 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 82 "red" @@ -10393,7 +10393,7 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" language_strings "${language}" 82 "red" echo @@ -10404,7 +10404,7 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 220 "red" @@ -10414,7 +10414,7 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 76 "red" @@ -10424,7 +10424,7 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10437,7 +10437,7 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 77 "red" @@ -10484,7 +10484,7 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" action_on_exit_taken=0 echo @@ -10544,7 +10544,7 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then @@ -10573,7 +10573,7 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -ne " " for (( j=1; j<=4; j++ )); do @@ -10585,7 +10585,7 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" airmon="airmon-ng" @@ -10597,7 +10597,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" @@ -10609,7 +10609,7 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hashcat_fix="" hashcat_charset_fix_needed=0 @@ -10622,7 +10622,7 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} @@ -10631,7 +10631,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } @@ -10639,7 +10639,7 @@ function get_bettercap_version() { #Determine bully version function get_bully_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} @@ -10648,7 +10648,7 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then @@ -10660,7 +10660,7 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" @@ -10672,7 +10672,7 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 @@ -10683,7 +10683,7 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 @@ -10694,7 +10694,7 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -10712,7 +10712,7 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" @@ -10780,7 +10780,7 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) @@ -10795,7 +10795,7 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ask_yesno 380 if [ ${yesno} = "n" ]; then @@ -10814,7 +10814,7 @@ function get_local_pin_dbfile_checksum() { #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) @@ -10827,7 +10827,7 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" case "${OSTYPE}" in solaris*) @@ -10845,7 +10845,7 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null @@ -10859,7 +10859,7 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then @@ -10906,7 +10906,7 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -10931,7 +10931,7 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" case ${distro} in "Wifislax") @@ -11052,7 +11052,7 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" nm_min_main_version="1" nm_min_subversion="0" @@ -11089,7 +11089,7 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" compatible=0 distro="Unknown Linux" @@ -11121,7 +11121,7 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" user=$(whoami) @@ -11133,7 +11133,7 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' @@ -11149,7 +11149,7 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 108 "blue" @@ -11250,7 +11250,7 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" @@ -11266,7 +11266,7 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then @@ -11282,7 +11282,7 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" window_width=$(tput cols) window_height=$(tput lines) @@ -11305,7 +11305,7 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" @@ -11364,7 +11364,7 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo -e "\033[s" @@ -11382,7 +11382,7 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" exit_code=0 check_kill_needed=0 @@ -11406,7 +11406,7 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" resolution_detected=0 if hash xdpyinfo 2> /dev/null; then @@ -11427,7 +11427,7 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" set_xsizes set_ysizes @@ -11458,7 +11458,7 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") @@ -11479,7 +11479,7 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) @@ -11499,7 +11499,7 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } @@ -11507,7 +11507,7 @@ function set_ypositions() { #Recalculate windows sizes and positions function recalculate_windows_sizes() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" detect_screen_resolution set_windows_sizes @@ -11516,7 +11516,7 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" clear current_menu="pre_main_menu" @@ -11587,7 +11587,7 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then @@ -11627,7 +11627,7 @@ function compare_floats_greater_or_equal() { #Update and relaunch the script function download_last_version() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -11649,7 +11649,7 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 287 "blue" @@ -11698,7 +11698,7 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo language_strings "${language}" 210 "blue" @@ -11734,7 +11734,7 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 @@ -11745,7 +11745,7 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" @@ -11761,7 +11761,7 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 @@ -11784,7 +11784,7 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo_blue "---------" } @@ -11792,7 +11792,7 @@ function print_simple_separator() { #Print a large separator function print_large_separator() { - debug_print_function_and_parameters + debug_print_function_and_parameters "${@}" echo_blue "-------------------------------------------------------" } From 828219a3c7ac7fd6871eb5ffc9f305dc813a63a4 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Mon, 20 Feb 2017 01:57:22 +0200 Subject: [PATCH 39/41] Changed debug_mode=2 functionality --- README.md | 6 +- airgeddon.sh | 514 +++++++++++++++++++++++++-------------------------- 2 files changed, 261 insertions(+), 259 deletions(-) diff --git a/README.md b/README.md index 0335e106a..d9adcf59d 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Tested on these compatible Linux distributions: - *Gentoo 20160514 and 20160704* - *Fedora 24* - *Red Hat 7 (Maipo)* -- *Arch 4.6.2-1 to 4.9.8-1* +- *Arch 4.6.2-1 to 4.9.9-1* - *Raspbian 7 (Wheezy) and 8 (Jessie) (Raspberry Pi)* - *OpenMandriva LX3* @@ -195,7 +195,8 @@ Use it only on your own networks or with the network's owner permission.
**El padrino** and [cLn] for Catalan translations,
[Luan] for Portuguese translations,
[MiAl] for Russian translations,
-[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff. +[xtonousou] for Greek translations, beta testing, suggestions, the help received fixing code warnings and other stuff,
+[OscarAkaElvis] for allowing me to own his body when I visit the earth. #### Hat tip to @@ -257,3 +258,4 @@ Use it only on your own networks or with the network's owner permission.
[Luan]: https://github.com/Luan7805 [MiAl]: https://github.com/Mi-Al [xtonousou]: https://github.com/xtonousou "xT" +[OscarAkaElvis]: https://github.com/OscarAkaElvis diff --git a/airgeddon.sh b/airgeddon.sh index b1101d475..189684c26 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -2,7 +2,7 @@ #Title........: airgeddon.sh #Description..: This is a multi-use bash script for Linux systems to audit wireless networks. #Author.......: v1s1t0r -#Date.........: 20170218 +#Date.........: 20170220 #Version......: 6.01 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -258,7 +258,7 @@ normal_color="\e[1;0m" #Set different language text strings function language_strings() { - debug_print_function_and_parameters "${@}" + debug_print declare -A unknown_chipset unknown_chipset["ENGLISH"]="Unknown" @@ -3934,12 +3934,12 @@ function language_strings() { esac } -#Print the current function's name with the parameters that have been passed for some (on which are useful) functions -function debug_print_function_and_parameters() { +#Print the current line of where this was called and the function's name. Applies to some (which are useful) functions +function debug_print() { if [ ${debug_mode} -eq 2 ]; then - excluded_functions=( + declare excluded_functions=( "ask_yesno" "check_pending_of_translation" "contains_element" @@ -3971,7 +3971,7 @@ function debug_print_function_and_parameters() { return 1 fi - echo "${FUNCNAME[1]}" "${@}" + echo "Line:${BASH_LINENO[1]}" "${FUNCNAME[1]}" # "${@}" to print parameters return 0 fi } @@ -3979,7 +3979,7 @@ function debug_print_function_and_parameters() { #Set the message to show again after an interrupt ([Ctrl+C] or [Ctrl+Z]) without exiting function interrupt_checkpoint() { - debug_print_function_and_parameters "${@}" + debug_print if [ -z "${last_buffered_type1}" ]; then last_buffered_message1=${1} @@ -3999,7 +3999,7 @@ function interrupt_checkpoint() { #Add the text on a menu when you miss an optional tool function special_text_missed_optional_tool() { - debug_print_function_and_parameters "${@}" + debug_print declare -a required_tools=("${!3}") @@ -4026,7 +4026,7 @@ function special_text_missed_optional_tool() { #Generate the chars in front of and behind a text for titles and separators function generate_dynamic_line() { - debug_print_function_and_parameters "${@}" + debug_print local type=${2} if [ "${type}" = "title" ]; then @@ -4069,7 +4069,7 @@ function generate_dynamic_line() { #Wrapper to check managed mode on an interface function check_to_set_managed() { - debug_print_function_and_parameters "${@}" + debug_print check_interface_mode case "${ifacemode}" in @@ -4092,7 +4092,7 @@ function check_to_set_managed() { #Wrapper to check monitor mode on an interface function check_to_set_monitor() { - debug_print_function_and_parameters "${@}" + debug_print check_interface_mode case "${ifacemode}" in @@ -4115,7 +4115,7 @@ function check_to_set_monitor() { #Check for monitor mode on an interface function check_monitor_enabled() { - debug_print_function_and_parameters "${@}" + debug_print mode=$(iwconfig "${interface}" 2> /dev/null | grep Mode: | awk '{print $4}' | cut -d ':' -f 2) @@ -4131,7 +4131,7 @@ function check_monitor_enabled() { #Check if an interface is a wifi card or not function check_interface_wifi() { - debug_print_function_and_parameters "${@}" + debug_print execute_iwconfig_fix return $? @@ -4140,7 +4140,7 @@ function check_interface_wifi() { #Execute the iwconfig fix to know if an interface is a wifi card or not function execute_iwconfig_fix() { - debug_print_function_and_parameters "${@}" + debug_print iwconfig_fix iwcmd="iwconfig ${interface} ${iwcmdfix} > /dev/null 2> /dev/null" @@ -4152,7 +4152,7 @@ function execute_iwconfig_fix() { #Create a list of interfaces associated to its macs function renew_ifaces_and_macs_list() { - debug_print_function_and_parameters "${@}" + debug_print readarray -t IFACES_AND_MACS < <(ip link | egrep "^[0-9]+" | cut -d ':' -f 2 | awk '{print $1}' | grep lo -v | grep "${interface}" -v) declare -gA ifaces_and_macs @@ -4172,7 +4172,7 @@ function renew_ifaces_and_macs_list() { #Check the interface coherence between interface names and macs function check_interface_coherence() { - debug_print_function_and_parameters "${@}" + debug_print renew_ifaces_and_macs_list interface_auto_change=0 @@ -4204,7 +4204,7 @@ function check_interface_coherence() { #Prepare the vars to be used on wps pin database attacks function set_wps_mac_parameters() { - debug_print_function_and_parameters "${@}" + debug_print six_wpsbssid_first_digits=${wps_bssid:0:8} six_wpsbssid_first_digits_clean=${six_wpsbssid_first_digits//:} @@ -4217,7 +4217,7 @@ function set_wps_mac_parameters() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 1 function calculate_computepin_algorithm_step1() { - debug_print_function_and_parameters "${@}" + debug_print hex_to_dec=$(printf '%d\n' 0x"${six_wpsbssid_last_digits_clean}") 2> /dev/null computepin_pin=$((hex_to_dec % 10000000)) @@ -4226,7 +4226,7 @@ function calculate_computepin_algorithm_step1() { #Calculate pin based on Zhao Chunsheng algorithm (computepin), step 2 function calculate_computepin_algorithm_step2() { - debug_print_function_and_parameters "${@}" + debug_print computepin_pin=$(printf '%08d\n' $((10#${computepin_pin} * 10 + checksum_digit))) } @@ -4234,7 +4234,7 @@ function calculate_computepin_algorithm_step2() { #Calculate pin based on Stefan Viehböck algorithm (easybox) function calculate_easybox_algorithm() { - debug_print_function_and_parameters "${@}" + debug_print hex_to_dec=($(printf "%04d" "0x${four_wpsbssid_last_digits_clean}" | sed 's/.*\(....\)/\1/;s/./& /g')) [[ ${four_wpsbssid_last_digits_clean} =~ ${four_wpsbssid_last_digits_clean//?/(.)} ]] && hexi=($(printf '%s\n' "${BASH_REMATCH[*]:1}")) @@ -4258,7 +4258,7 @@ function calculate_easybox_algorithm() { #Calculate the last digit on pin following the checksum rule function pin_checksum_rule() { - debug_print_function_and_parameters "${@}" + debug_print current_calculated_pin=$((10#${1} * 10)) @@ -4279,7 +4279,7 @@ function pin_checksum_rule() { #Manage the calls to check common wps pin algorithms function check_and_set_common_algorithms() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 388 "blue" @@ -4305,7 +4305,7 @@ function check_and_set_common_algorithms() { #Integrate calculated pins from algorithms into pins array function integrate_algorithms_pins() { - debug_print_function_and_parameters "${@}" + debug_print some_calculated_pin_included=0 for pin in "${calculated_pins[@]}"; do @@ -4333,7 +4333,7 @@ function integrate_algorithms_pins() { #Include the code of the pin database file function include_pin_dbfile() { - debug_print_function_and_parameters "${@}" + debug_print dbfile_to_include="source \"${scriptfolder}${known_pins_dbfile}\"" eval "${dbfile_to_include}" @@ -4342,7 +4342,7 @@ function include_pin_dbfile() { #Search for target wps bssid mac in pin database and set the vars to be used function search_in_pin_database() { - debug_print_function_and_parameters "${@}" + debug_print bssid_found_in_db=0 counter_pins_found=0 @@ -4363,7 +4363,7 @@ function search_in_pin_database() { #Prepare monitor mode avoiding the use of airmon-ng or airmon-zc generating two interfaces from one function prepare_et_monitor() { - debug_print_function_and_parameters "${@}" + debug_print disable_rfkill @@ -4379,7 +4379,7 @@ function prepare_et_monitor() { #Assure the mode of the interface before the Evil Twin process function prepare_et_interface() { - debug_print_function_and_parameters "${@}" + debug_print et_initial_state=${ifacemode} @@ -4401,7 +4401,7 @@ function prepare_et_interface() { #Restore the state of the interfaces after Evil Twin process function restore_et_interface() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 299 "blue" @@ -4428,7 +4428,7 @@ function restore_et_interface() { #Unblock if possible the interface if blocked function disable_rfkill() { - debug_print_function_and_parameters "${@}" + debug_print if hash rfkill 2> /dev/null; then rfkill unblock all > /dev/null 2>&1 @@ -4438,7 +4438,7 @@ function disable_rfkill() { #Put the interface on managed mode and manage the possible name change function managed_option() { - debug_print_function_and_parameters "${@}" + debug_print check_to_set_managed @@ -4472,7 +4472,7 @@ function managed_option() { #Put the interface on monitor mode and manage the possible name change function monitor_option() { - debug_print_function_and_parameters "${@}" + debug_print check_to_set_monitor @@ -4521,7 +4521,7 @@ function monitor_option() { #Check the interface mode function check_interface_mode() { - debug_print_function_and_parameters "${@}" + debug_print execute_iwconfig_fix if [ "$?" != "0" ]; then @@ -4552,7 +4552,7 @@ function check_interface_mode() { #Language change menu function language_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 87 "title" @@ -4645,7 +4645,7 @@ function language_menu() { #Read the chipset for an interface function set_chipset() { - debug_print_function_and_parameters "${@}" + debug_print chipset="" sedrule1="s/^....//" @@ -4693,7 +4693,7 @@ function set_chipset() { #Internet interface selection menu function select_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print if [ "${return_to_et_main_menu}" -eq 1 ]; then return 1 @@ -4786,7 +4786,7 @@ function select_internet_interface() { #Interface selection menu function select_interface() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 88 "title" @@ -4833,7 +4833,7 @@ function select_interface() { #Read the user input on yes/no questions function read_yesno() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" "${1}" "green" @@ -4843,7 +4843,7 @@ function read_yesno() { #Validate the input on yes/no questions function ask_yesno() { - debug_print_function_and_parameters "${@}" + debug_print yesno="" while [[ ! ${yesno} =~ ^[YyNn]$ ]]; do @@ -4861,7 +4861,7 @@ function ask_yesno() { #Read the user input on channel questions function read_channel() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 25 "green" @@ -4875,7 +4875,7 @@ function read_channel() { #Validate the input on channel questions function ask_channel() { - debug_print_function_and_parameters "${@}" + debug_print local regexp="^([1-9]|1[0-4])$" @@ -4897,7 +4897,7 @@ function ask_channel() { #Read the user input on bssid questions function read_bssid() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 27 "green" @@ -4911,7 +4911,7 @@ function read_bssid() { #Validate the input on bssid questions function ask_bssid() { - debug_print_function_and_parameters "${@}" + debug_print local regexp="^([a-fA-F0-9]{2}:){5}[a-zA-Z0-9]{2}$" @@ -4933,7 +4933,7 @@ function ask_bssid() { #Read the user input on essid questions function read_essid() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 29 "green" @@ -4943,7 +4943,7 @@ function read_essid() { #Validate the input on essid questions function ask_essid() { - debug_print_function_and_parameters "${@}" + debug_print if [ -z "${essid}" ]; then while [[ -z "${essid}" ]]; do @@ -4962,7 +4962,7 @@ function ask_essid() { #Read the user input on custom pin questions function read_custom_pin() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 363 "green" @@ -4972,7 +4972,7 @@ function read_custom_pin() { #Validate the input on custom pin questions function ask_custom_pin() { - debug_print_function_and_parameters "${@}" + debug_print local regexp="^[0-9]{8}$" custom_pin="" @@ -4987,7 +4987,7 @@ function ask_custom_pin() { #Read the user input on timeout questions function read_timeout() { - debug_print_function_and_parameters "${@}" + debug_print echo case ${1} in @@ -5004,7 +5004,7 @@ function read_timeout() { #Validate the user input for timeouts function ask_wps_timeout() { - debug_print_function_and_parameters "${@}" + debug_print case ${1} in "standard") @@ -5047,7 +5047,7 @@ function ask_wps_timeout() { #Execute wps custom pin bully attack function exec_wps_custom_pin_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5065,7 +5065,7 @@ function exec_wps_custom_pin_bully_attack() { #Execute wps custom pin reaver attack function exec_wps_custom_pin_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5083,7 +5083,7 @@ function exec_wps_custom_pin_reaver_attack() { #Execute bully pixie dust attack function exec_bully_pixiewps_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5101,7 +5101,7 @@ function exec_bully_pixiewps_attack() { #Execute reaver pixie dust attack function exec_reaver_pixiewps_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5119,7 +5119,7 @@ function exec_reaver_pixiewps_attack() { #Execute wps bruteforce pin bully attack function exec_wps_bruteforce_pin_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5137,7 +5137,7 @@ function exec_wps_bruteforce_pin_bully_attack() { #Execute wps bruteforce pin reaver attack function exec_wps_bruteforce_pin_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 32 "green" @@ -5155,7 +5155,7 @@ function exec_wps_bruteforce_pin_reaver_attack() { #Execute wps pin database bully attack function exec_wps_pin_database_bully_attack() { - debug_print_function_and_parameters "${@}" + debug_print wps_pin_database_prerequisites @@ -5168,7 +5168,7 @@ function exec_wps_pin_database_bully_attack() { #Execute wps pin database reaver attack function exec_wps_pin_database_reaver_attack() { - debug_print_function_and_parameters "${@}" + debug_print wps_pin_database_prerequisites @@ -5181,7 +5181,7 @@ function exec_wps_pin_database_reaver_attack() { #Execute mdk3 deauth DoS attack function exec_mdk3deauth() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 89 "title" @@ -5201,7 +5201,7 @@ function exec_mdk3deauth() { #Execute aireplay DoS attack function exec_aireplaydeauth() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 90 "title" @@ -5219,7 +5219,7 @@ function exec_aireplaydeauth() { #Execute WDS confusion DoS attack function exec_wdsconfusion() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 91 "title" @@ -5235,7 +5235,7 @@ function exec_wdsconfusion() { #Execute Beacon flood DoS attack function exec_beaconflood() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 92 "title" @@ -5251,7 +5251,7 @@ function exec_beaconflood() { #Execute Auth DoS attack function exec_authdos() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 93 "title" @@ -5267,7 +5267,7 @@ function exec_authdos() { #Execute Michael Shutdown DoS attack function exec_michaelshutdown() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 94 "title" @@ -5283,7 +5283,7 @@ function exec_michaelshutdown() { #Validate Mdk3 parameters function mdk3_deauth_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 95 "title" @@ -5305,7 +5305,7 @@ function mdk3_deauth_option() { #Validate Aireplay parameters function aireplay_deauth_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 96 "title" @@ -5327,7 +5327,7 @@ function aireplay_deauth_option() { #Validate WDS confusion parameters function wds_confusion_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 97 "title" @@ -5349,7 +5349,7 @@ function wds_confusion_option() { #Validate Beacon flood parameters function beacon_flood_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 98 "title" @@ -5371,7 +5371,7 @@ function beacon_flood_option() { #Validate Auth DoS parameters function auth_dos_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 99 "title" @@ -5392,7 +5392,7 @@ function auth_dos_option() { #Validate Michael Shutdown parameters function michael_shutdown_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 100 "title" @@ -5413,7 +5413,7 @@ function michael_shutdown_option() { #Validate wps parameters for custom pin, pixie dust, bruteforce and pin database attacks function wps_attacks_parameters() { - debug_print_function_and_parameters "${@}" + debug_print check_monitor_enabled if [ "$?" != "0" ]; then @@ -5445,7 +5445,7 @@ function wps_attacks_parameters() { #Print selected interface function print_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print if [ -z "${interface}" ]; then language_strings "${language}" 41 "red" @@ -5461,7 +5461,7 @@ function print_iface_selected() { #Print selected internet interface function print_iface_internet_selected() { - debug_print_function_and_parameters "${@}" + debug_print if [[ "${et_mode}" != "et_captive_portal" ]] || [[ ${captive_portal_mode} = "internet" ]]; then if [ -z "${internet_interface}" ]; then @@ -5475,7 +5475,7 @@ function print_iface_internet_selected() { #Print selected target parameters (bssid, channel, essid and type of encryption) function print_all_target_vars() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5498,7 +5498,7 @@ function print_all_target_vars() { #Print selected target parameters on evil twin menu (bssid, channel and essid) function print_all_target_vars_et() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5526,7 +5526,7 @@ function print_all_target_vars_et() { #Print selected target parameters on evil twin submenus (bssid, channel, essid, DoS type and Handshake file) function print_et_target_vars() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5574,7 +5574,7 @@ function print_et_target_vars() { #Print selected target parameters on wps attacks menu (bssid, channel and essid) function print_all_target_vars_wps() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${wps_bssid}" ]; then language_strings "${language}" 335 "blue" @@ -5608,7 +5608,7 @@ function print_all_target_vars_wps() { #Print selected target parameters on decrypt menu (bssid, Handshake file, dictionary file and rules file) function print_decrypt_vars() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${bssid}" ]; then language_strings "${language}" 43 "blue" @@ -5634,7 +5634,7 @@ function print_decrypt_vars() { #Create the dependencies arrays function initialize_menu_options_dependencies() { - debug_print_function_and_parameters "${@}" + debug_print clean_handshake_dependencies=(${optional_tools_names[0]}) aircrack_attacks_dependencies=(${optional_tools_names[1]}) @@ -5656,7 +5656,7 @@ function initialize_menu_options_dependencies() { #Set possible changes for some commands that can be found in different ways depending of the O.S. function set_possible_aliases() { - debug_print_function_and_parameters "${@}" + debug_print for item in "${!possible_alias_names[@]}"; do if ! hash "${item}" 2> /dev/null || [[ "${item}" = "beef" ]]; then @@ -5674,7 +5674,7 @@ function set_possible_aliases() { #Initialize optional_tools values function initialize_optional_tools_values() { - debug_print_function_and_parameters "${@}" + debug_print declare -gA optional_tools=() @@ -5686,7 +5686,7 @@ function initialize_optional_tools_values() { #Set some vars depending of the menu and invoke the printing of target vars function initialize_menu_and_print_selections() { - debug_print_function_and_parameters "${@}" + debug_print forbidden_options=() @@ -5751,7 +5751,7 @@ function initialize_menu_and_print_selections() { #Clean temporary files function clean_tmpfiles() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf "${tmpdir}bl.txt" > /dev/null 2>&1 rm -rf "${tmpdir}handshake"* > /dev/null 2>&1 @@ -5783,7 +5783,7 @@ function clean_tmpfiles() { #Manage cleaning firewall rules and restore orginal routing state function clean_routing_rules() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${original_routing_state}" ]; then echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward @@ -5795,7 +5795,7 @@ function clean_routing_rules() { #Clean iptables rules function clean_iptables() { - debug_print_function_and_parameters "${@}" + debug_print iptables -F iptables -t nat -F @@ -5806,7 +5806,7 @@ function clean_iptables() { #Create an array from parameters function store_array() { - debug_print_function_and_parameters "${@}" + debug_print local values=("${@:3}") for i in "${!values[@]}"; do @@ -5817,7 +5817,7 @@ function store_array() { #Check if something (first parameter) is inside an array (second parameter) contains_element() { - debug_print_function_and_parameters "${@}" + debug_print local e for e in "${@:2}"; do @@ -5829,7 +5829,7 @@ contains_element() { #Print hints from the different hint pools depending of the menu function print_hint() { - debug_print_function_and_parameters "${@}" + debug_print declare -A hints @@ -5921,7 +5921,7 @@ function print_hint() { #airgeddon main menu function main_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 101 "title" @@ -5991,7 +5991,7 @@ function main_menu() { #Evil Twin attacks menu function evil_twin_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 253 "title" @@ -6118,7 +6118,7 @@ function evil_twin_attacks_menu() { #beef pre attack menu function beef_pre_menu() { - debug_print_function_and_parameters "${@}" + debug_print if [ ${return_to_et_main_menu_from_beef} -eq 1 ]; then return @@ -6193,7 +6193,7 @@ function beef_pre_menu() { #WPS attacks menu function wps_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 334 "title" @@ -6420,7 +6420,7 @@ function wps_attacks_menu() { #Offline decryption attacks menu function decrypt_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 170 "title" @@ -6501,7 +6501,7 @@ function decrypt_menu() { #Read the user input on rules file questions function ask_rules() { - debug_print_function_and_parameters "${@}" + debug_print validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6513,7 +6513,7 @@ function ask_rules() { #Read the user input on dictionary file questions function ask_dictionary() { - debug_print_function_and_parameters "${@}" + debug_print validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6525,7 +6525,7 @@ function ask_dictionary() { #Read the user input on Handshake file questions function ask_capture_file() { - debug_print_function_and_parameters "${@}" + debug_print validpath=1 while [[ "${validpath}" != "0" ]]; do @@ -6537,7 +6537,7 @@ function ask_capture_file() { #Manage the questions on Handshake file questions function manage_asking_for_captured_file() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${enteredpath}" ]; then echo @@ -6554,7 +6554,7 @@ function manage_asking_for_captured_file() { #Manage the questions on dictionary file questions function manage_asking_for_dictionary_file() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${DICTIONARY}" ]; then echo @@ -6571,7 +6571,7 @@ function manage_asking_for_dictionary_file() { #Manage the questions on rules file questions function manage_asking_for_rule_file() { - debug_print_function_and_parameters "${@}" + debug_print if [ -n "${RULES}" ]; then echo @@ -6588,7 +6588,7 @@ function manage_asking_for_rule_file() { #Validate the file to be cleaned function check_valid_file_to_clean() { - debug_print_function_and_parameters "${@}" + debug_print nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA|WEP" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6623,7 +6623,7 @@ function check_valid_file_to_clean() { #Check if a bssid is present on a capture file to know if there is a Handshake with that bssid function check_bssid_in_captured_file() { - debug_print_function_and_parameters "${@}" + debug_print nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6663,7 +6663,7 @@ function check_bssid_in_captured_file() { #Set the target vars to a bssid selecting them from a capture file which has a Handshake function select_wpa_bssid_target_from_captured_file() { - debug_print_function_and_parameters "${@}" + debug_print nets_from_file=$(echo "1" | aircrack-ng "${1}" 2> /dev/null | egrep "WPA \([1-9][0-9]? handshake" | awk '{ saved = $1; $1 = ""; print substr($0, 2) }') @@ -6743,7 +6743,7 @@ function select_wpa_bssid_target_from_captured_file() { #Validate and ask for the different parameters used in an aircrack dictionary based attack function aircrack_dictionary_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print manage_asking_for_captured_file @@ -6763,7 +6763,7 @@ function aircrack_dictionary_attack_option() { #Validate and ask for the different parameters used in an aircrack bruteforce based attack function aircrack_bruteforce_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print manage_asking_for_captured_file @@ -6790,7 +6790,7 @@ function aircrack_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat dictionary based attack function hashcat_dictionary_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print manage_asking_for_captured_file @@ -6811,7 +6811,7 @@ function hashcat_dictionary_attack_option() { #Validate and ask for the different parameters used in a hashcat bruteforce based attack function hashcat_bruteforce_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print manage_asking_for_captured_file @@ -6839,7 +6839,7 @@ function hashcat_bruteforce_attack_option() { #Validate and ask for the different parameters used in a hashcat rule based attack function hashcat_rulebased_attack_option() { - debug_print_function_and_parameters "${@}" + debug_print manage_asking_for_captured_file @@ -6862,7 +6862,7 @@ function hashcat_rulebased_attack_option() { #Check if the password was decrypted using hashcat and manage to save it on a file function manage_hashcat_pot() { - debug_print_function_and_parameters "${@}" + debug_print local regexp="All hashes have been recovered" if [ -n "${hashcat_fix}" ]; then @@ -6900,7 +6900,7 @@ function manage_hashcat_pot() { #Check if the passwords were captured using ettercap and manage to save them on a file function manage_ettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print ettercap_log=0 ask_yesno 302 @@ -6925,7 +6925,7 @@ function manage_ettercap_log() { #Check if the passwords were captured using bettercap and manage to save them on a file function manage_bettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print bettercap_log=0 ask_yesno 302 @@ -6950,7 +6950,7 @@ function manage_bettercap_log() { #Check if the passwords were captured using the captive portal Evil Twin attack and manage to save them on a file function manage_captive_portal_log() { - debug_print_function_and_parameters "${@}" + debug_print default_et_captive_portal_logpath=$(env | grep ^HOME | awk -F = '{print $2}') lastcharetcaptiveportallogpath=${default_et_captive_portal_logpath: -1} @@ -6968,7 +6968,7 @@ function manage_captive_portal_log() { #Captive portal language menu function set_captive_portal_language() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 293 "title" @@ -7020,7 +7020,7 @@ function set_captive_portal_language() { #Read and validate the minlength var function set_minlength() { - debug_print_function_and_parameters "${@}" + debug_print minlength=0 while [[ ! ${minlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7033,7 +7033,7 @@ function set_minlength() { #Read and validate the maxlength var function set_maxlength() { - debug_print_function_and_parameters "${@}" + debug_print maxlength=0 while [[ ! ${maxlength} =~ ^[8-9]$|^[1-5][0-9]$|^6[0-3]$ ]]; do @@ -7046,7 +7046,7 @@ function set_maxlength() { #Manage the minlength and maxlength vars on bruteforce attacks function set_minlength_and_maxlength() { - debug_print_function_and_parameters "${@}" + debug_print set_minlength maxlength=0 @@ -7058,7 +7058,7 @@ function set_minlength_and_maxlength() { #Charset selection menu function set_charset() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 238 "title" @@ -7151,7 +7151,7 @@ function set_charset() { #Set a var to show the chosen charset function set_show_charset() { - debug_print_function_and_parameters "${@}" + debug_print showcharset="" @@ -7185,7 +7185,7 @@ function set_show_charset() { #Execute aircrack+crunch bruteforce attack function exec_aircrack_bruteforce_attack() { - debug_print_function_and_parameters "${@}" + debug_print crunch "${minlength}" "${maxlength}" "${charset}" | aircrack-ng -a 2 -b "${bssid}" -w - "${enteredpath}" language_strings "${language}" 115 "read" @@ -7194,7 +7194,7 @@ function exec_aircrack_bruteforce_attack() { #Execute aircrack dictionary attack function exec_aircrack_dictionary_attack() { - debug_print_function_and_parameters "${@}" + debug_print aircrack-ng -a 2 -b "${bssid}" -w "${DICTIONARY}" "${enteredpath}" language_strings "${language}" 115 "read" @@ -7203,7 +7203,7 @@ function exec_aircrack_dictionary_attack() { #Execute hashcat dictionary attack function exec_hashcat_dictionary_attack() { - debug_print_function_and_parameters "${@}" + debug_print convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7215,7 +7215,7 @@ function exec_hashcat_dictionary_attack() { #Execute hashcat bruteforce attack function exec_hashcat_bruteforce_attack() { - debug_print_function_and_parameters "${@}" + debug_print convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 3 \"${tmpdir}hctmp.hccap\" \"${charset}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7227,7 +7227,7 @@ function exec_hashcat_bruteforce_attack() { #Execute hashcat rule based attack function exec_hashcat_rulebased_attack() { - debug_print_function_and_parameters "${@}" + debug_print convert_cap_to_hashcat_format hashcat_cmd="hashcat -m 2500 -a 0 \"${tmpdir}hctmp.hccap\" \"${DICTIONARY}\" -r \"${RULES}\" --potfile-disable -o \"${tmpdir}hctmp.pot\" ${hashcat_fix} | tee /dev/fd/5" @@ -7239,7 +7239,7 @@ function exec_hashcat_rulebased_attack() { #Execute Evil Twin only Access Point attack function exec_et_onlyap_attack() { - debug_print_function_and_parameters "${@}" + debug_print set_hostapd_config launch_fake_ap @@ -7262,7 +7262,7 @@ function exec_et_onlyap_attack() { #Execute Evil Twin with sniffing attack function exec_et_sniffing_attack() { - debug_print_function_and_parameters "${@}" + debug_print set_hostapd_config launch_fake_ap @@ -7289,7 +7289,7 @@ function exec_et_sniffing_attack() { #Execute Evil Twin with sniffing+sslstrip attack function exec_et_sniffing_sslstrip_attack() { - debug_print_function_and_parameters "${@}" + debug_print set_hostapd_config launch_fake_ap @@ -7317,7 +7317,7 @@ function exec_et_sniffing_sslstrip_attack() { #Execute Evil Twin with sniffing+bettercap-sslstrip2/beef attack function exec_et_sniffing_sslstrip2_attack() { - debug_print_function_and_parameters "${@}" + debug_print set_hostapd_config launch_fake_ap @@ -7355,7 +7355,7 @@ function exec_et_sniffing_sslstrip2_attack() { #Execute captive portal Evil Twin attack function exec_et_captive_portal_attack() { - debug_print_function_and_parameters "${@}" + debug_print set_hostapd_config launch_fake_ap @@ -7385,7 +7385,7 @@ function exec_et_captive_portal_attack() { #Create configuration file for hostapd function set_hostapd_config() { - debug_print_function_and_parameters "${@}" + debug_print tmpfiles_toclean=1 rm -rf "${tmpdir}${hostapd_file}" > /dev/null 2>&1 @@ -7405,7 +7405,7 @@ function set_hostapd_config() { #Launch hostapd fake Access Point function launch_fake_ap() { - debug_print_function_and_parameters "${@}" + debug_print killall hostapd > /dev/null 2>&1 ${airmon} check kill > /dev/null 2>&1 @@ -7431,7 +7431,7 @@ function launch_fake_ap() { #Create configuration file for dhcpd function set_dhcp_config() { - debug_print_function_and_parameters "${@}" + debug_print route | grep ${ip_range} > /dev/null if [ "$?" != "0" ]; then @@ -7514,7 +7514,7 @@ function set_dhcp_config() { #Set routing state and firewall rules for Evil Twin attacks function set_std_internet_routing_rules() { - debug_print_function_and_parameters "${@}" + debug_print routing_toclean=1 original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward) @@ -7560,7 +7560,7 @@ function set_std_internet_routing_rules() { #Launch dhcpd server function launch_dhcp_server() { - debug_print_function_and_parameters "${@}" + debug_print killall dhcpd > /dev/null 2>&1 @@ -7584,7 +7584,7 @@ function launch_dhcp_server() { #Execute DoS for Evil Twin attacks function exec_et_deauth() { - debug_print_function_and_parameters "${@}" + debug_print prepare_et_monitor @@ -7625,7 +7625,7 @@ function exec_et_deauth() { #Create here-doc bash script used for wps pin attacks function set_wps_attack_script() { - debug_print_function_and_parameters "${@}" + debug_print tmpfiles_toclean=1 rm -rf "${tmpdir}${wps_attack_script_file}" > /dev/null 2>&1 @@ -7986,7 +7986,7 @@ function set_wps_attack_script() { #Create here-doc bash script used for control windows on Evil Twin attacks function set_control_script() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf "${tmpdir}${control_file}" > /dev/null 2>&1 @@ -8209,7 +8209,7 @@ function set_control_script() { #Launch dnsspoof dns black hole for captive portal Evil Twin attack function launch_dns_blackhole() { - debug_print_function_and_parameters "${@}" + debug_print recalculate_windows_sizes xterm -hold -bg black -fg green -geometry "${g4_middleright_window}" -T "DNS" -e "${optional_tools_names[12]} -i ${interface}" > /dev/null 2>&1 & @@ -8219,7 +8219,7 @@ function launch_dns_blackhole() { #Launch control window for Evil Twin attacks function launch_control_window() { - debug_print_function_and_parameters "${@}" + debug_print recalculate_windows_sizes case ${et_mode} in @@ -8250,7 +8250,7 @@ function launch_control_window() { #Create configuration file for lighttpd function set_webserver_config() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf "${tmpdir}${webserver_file}" > /dev/null 2>&1 @@ -8275,7 +8275,7 @@ function set_webserver_config() { #Create captive portal files. Cgi bash scripts, css and js file function set_captive_portal_page() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf -R "${tmpdir}${webdir}" > /dev/null 2>&1 mkdir "${tmpdir}${webdir}" > /dev/null 2>&1 @@ -8481,7 +8481,7 @@ function set_captive_portal_page() { #Launch lighttpd webserver for captive portal Evil Twin attack function launch_webserver() { - debug_print_function_and_parameters "${@}" + debug_print killall lighttpd > /dev/null 2>&1 recalculate_windows_sizes @@ -8497,7 +8497,7 @@ function launch_webserver() { #Launch sslstrip for sslstrip sniffing Evil Twin attack function launch_sslstrip() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf "${tmpdir}${sslstrip_file}" > /dev/null 2>&1 recalculate_windows_sizes @@ -8508,7 +8508,7 @@ function launch_sslstrip() { #Launch ettercap sniffer function launch_ettercap_sniffing() { - debug_print_function_and_parameters "${@}" + debug_print recalculate_windows_sizes case ${et_mode} in @@ -8531,7 +8531,7 @@ function launch_ettercap_sniffing() { #Create configuration file for beef function set_beef_config() { - debug_print_function_and_parameters "${@}" + debug_print tmpfiles_toclean=1 rm -rf "${tmpdir}${beef_file}" > /dev/null 2>&1 @@ -8610,7 +8610,7 @@ function set_beef_config() { #Kill beef process function kill_beef() { - debug_print_function_and_parameters "${@}" + debug_print killall "${optional_tools_names[19]}" > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8626,7 +8626,7 @@ function kill_beef() { #Detects if your beef is Flexible Brainfuck interpreter instead of BeEF function detect_fake_beef() { - debug_print_function_and_parameters "${@}" + debug_print readarray -t BEEF_OUTPUT < <(timeout -s SIGTERM 0.5 beef -h 2> /dev/null) @@ -8641,7 +8641,7 @@ function detect_fake_beef() { #Search for beef path function search_for_beef() { - debug_print_function_and_parameters "${@}" + debug_print if [ "${beef_found}" -eq 0 ]; then for item in "${possible_beef_known_locations[@]}"; do @@ -8657,7 +8657,7 @@ function search_for_beef() { #Prepare system to work with beef function prepare_beef_start() { - debug_print_function_and_parameters "${@}" + debug_print valid_possible_beef_path=0 if [[ ${beef_found} -eq 0 ]] && [[ ${optional_tools[${optional_tools_names[19]}]} -eq 0 ]]; then @@ -8701,7 +8701,7 @@ function prepare_beef_start() { #Set beef path manually function manual_beef_set() { - debug_print_function_and_parameters "${@}" + debug_print while [[ "${valid_possible_beef_path}" != "1" ]]; do echo @@ -8740,7 +8740,7 @@ function manual_beef_set() { #Fix for not found beef executable function fix_beef_executable() { - debug_print_function_and_parameters "${@}" + debug_print rm -rf "/usr/bin/beef" > /dev/null 2>&1 { @@ -8757,7 +8757,7 @@ function fix_beef_executable() { #Rewrite airgeddon script in a polymorphic way adding custom beef location to array to get persistence function rewrite_script_with_custom_beef() { - debug_print_function_and_parameters "${@}" + debug_print set_script_folder_and_name @@ -8778,7 +8778,7 @@ function rewrite_script_with_custom_beef() { #Start beef process as a service function start_beef_service() { - debug_print_function_and_parameters "${@}" + debug_print service "${optional_tools_names[19]}" restart > /dev/null 2>&1 if [ "$?" != "0" ]; then @@ -8789,7 +8789,7 @@ function start_beef_service() { #Launch beef browser exploitation framework function launch_beef() { - debug_print_function_and_parameters "${@}" + debug_print kill_beef @@ -8812,7 +8812,7 @@ function launch_beef() { #Launch bettercap sniffer function launch_bettercap_sniffing() { - debug_print_function_and_parameters "${@}" + debug_print recalculate_windows_sizes sniffing_scr_window_position=${g4_bottomright_window} @@ -8834,7 +8834,7 @@ function launch_bettercap_sniffing() { #Parse ettercap log searching for captured passwords function parse_ettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 304 "blue" @@ -8874,7 +8874,7 @@ function parse_ettercap_log() { #Parse bettercap log searching for captured passwords function parse_bettercap_log() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 304 "blue" @@ -8932,7 +8932,7 @@ function parse_bettercap_log() { #Write on a file the id of the captive portal Evil Twin attack processes function write_et_processes() { - debug_print_function_and_parameters "${@}" + debug_print for item in "${et_processes[@]}"; do echo "${item}" >> "${tmpdir}${webdir}${processesfile}" @@ -8942,7 +8942,7 @@ function write_et_processes() { #Kill the Evil Twin processes function kill_et_windows() { - debug_print_function_and_parameters "${@}" + debug_print for item in "${et_processes[@]}"; do kill "${item}" &> /dev/null @@ -8953,7 +8953,7 @@ function kill_et_windows() { #Convert capture file to hashcat format function convert_cap_to_hashcat_format() { - debug_print_function_and_parameters "${@}" + debug_print tmpfiles_toclean=1 rm -rf "${tmpdir}hctmp"* > /dev/null 2>&1 @@ -8963,7 +8963,7 @@ function convert_cap_to_hashcat_format() { #Handshake tools menu function handshake_tools_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 120 "title" @@ -9023,7 +9023,7 @@ function handshake_tools_menu() { #Execute the cleaning of a Handshake file function exec_clean_handshake_file() { - debug_print_function_and_parameters "${@}" + debug_print echo check_valid_file_to_clean "${filetoclean}" @@ -9039,7 +9039,7 @@ function exec_clean_handshake_file() { #Validate and ask for the parameters used to clean a Handshake file function clean_handshake_file_option() { - debug_print_function_and_parameters "${@}" + debug_print echo readpath=0 @@ -9070,7 +9070,7 @@ function clean_handshake_file_option() { #DoS attacks menu function dos_attacks_menu() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 102 "title" @@ -9171,7 +9171,7 @@ function dos_attacks_menu() { #Capture Handshake on Evil Twin attack function capture_handshake_evil_twin() { - debug_print_function_and_parameters "${@}" + debug_print if [[ ${enc} != "WPA" ]] && [[ ${enc} != "WPA2" ]]; then echo @@ -9241,7 +9241,7 @@ function capture_handshake_evil_twin() { #Capture Handshake on Handshake tools function capture_handshake() { - debug_print_function_and_parameters "${@}" + debug_print if [[ -z ${bssid} ]] || [[ -z ${essid} ]] || [[ -z ${channel} ]] || [[ "${essid}" = "(Hidden Network)" ]]; then echo @@ -9270,7 +9270,7 @@ function capture_handshake() { #Check if file exists function check_file_exists() { - debug_print_function_and_parameters "${@}" + debug_print if [[ ! -f "${1}" || -z "${1}" ]]; then language_strings "${language}" 161 "red" @@ -9282,7 +9282,7 @@ function check_file_exists() { #Validate path function validate_path() { - debug_print_function_and_parameters "${@}" + debug_print dirname=${1%/*} @@ -9341,7 +9341,7 @@ function validate_path() { #Check for write permissions on a given path function check_write_permissions() { - debug_print_function_and_parameters "${@}" + debug_print if [ -w "${1}" ]; then return 0 @@ -9352,7 +9352,7 @@ function check_write_permissions() { #Create a var with the name passed to the function and reading the value from the user input function read_and_clean_path() { - debug_print_function_and_parameters "${@}" + debug_print settings="$(shopt -p extglob)" shopt -s extglob @@ -9368,7 +9368,7 @@ function read_and_clean_path() { #Read and validate a path function read_path() { - debug_print_function_and_parameters "${@}" + debug_print echo case ${1} in @@ -9454,7 +9454,7 @@ function read_path() { #Launch the DoS selection menu before capture a Handshake and process the captured file function attack_handshake_menu() { - debug_print_function_and_parameters "${@}" + debug_print if [ "${1}" = "handshake" ]; then ask_yesno 145 @@ -9561,7 +9561,7 @@ function attack_handshake_menu() { #Launch the Handshake capture window function capture_handshake_window() { - debug_print_function_and_parameters "${@}" + debug_print language_strings "${language}" 143 "blue" echo @@ -9579,7 +9579,7 @@ function capture_handshake_window() { #Manage target exploration and parse the output files function explore_for_targets_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 103 "title" @@ -9655,7 +9655,7 @@ function explore_for_targets_option() { #Manage target exploration only for Access Points with WPS activated. Parse output files and print menu with results function explore_for_wps_targets_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 103 "title" @@ -9671,7 +9671,7 @@ function explore_for_wps_targets_option() { echo if ! grep -qe "${interface}" <(echo "${!wash_ifaces_already_set[@]}"); then language_strings "${language}" 353 "blue" - set_wash_parametrization + set_wash_parameterization language_strings "${language}" 354 "yellow" else language_strings "${language}" 355 "blue" @@ -9833,7 +9833,7 @@ function explore_for_wps_targets_option() { #Create a menu to select target from the parsed data function select_target() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 104 "title" @@ -9921,9 +9921,9 @@ function select_target() { } #Perform a test to determine if fcs parameter is needed on wash scanning -function set_wash_parametrization() { +function set_wash_parameterization() { - debug_print_function_and_parameters "${@}" + debug_print fcs="" declare -gA wash_ifaces_already_set @@ -9942,7 +9942,7 @@ function set_wash_parametrization() { #Manage and validate the prerequisites for wps pin database attacks function wps_pin_database_prerequisites() { - debug_print_function_and_parameters "${@}" + debug_print set_wps_mac_parameters include_pin_dbfile @@ -9969,7 +9969,7 @@ function wps_pin_database_prerequisites() { #Manage and validate the prerequisites for Evil Twin attacks function et_prerequisites() { - debug_print_function_and_parameters "${@}" + debug_print if [ ${retry_handshake_capture} -eq 1 ]; then return @@ -10104,7 +10104,7 @@ function et_prerequisites() { #Manage the Handshake file requirement for captive portal Evil Twin attack function ask_et_handshake_file() { - debug_print_function_and_parameters "${@}" + debug_print echo readpath=0 @@ -10145,7 +10145,7 @@ function ask_et_handshake_file() { #DoS Evil Twin attacks menu function et_dos_menu() { - debug_print_function_and_parameters "${@}" + debug_print if [ ${return_to_et_main_menu} -eq 1 ]; then return @@ -10323,7 +10323,7 @@ function et_dos_menu() { #Selected internet interface detection function detect_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print if [ ${internet_interface_selected} -eq 1 ]; then return 0 @@ -10351,7 +10351,7 @@ function detect_internet_interface() { #Show about and credits function credits_option() { - debug_print_function_and_parameters "${@}" + debug_print clear language_strings "${language}" 105 "title" @@ -10380,7 +10380,7 @@ function credits_option() { #Show message for invalid selected language function invalid_language_selected() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 82 "red" @@ -10393,7 +10393,7 @@ function invalid_language_selected() { #Show message for captive portal invalid selected language function invalid_captive_portal_language_selected() { - debug_print_function_and_parameters "${@}" + debug_print language_strings "${language}" 82 "red" echo @@ -10404,7 +10404,7 @@ function invalid_captive_portal_language_selected() { #Show message for forbidden selected option function forbidden_menu_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 220 "red" @@ -10414,7 +10414,7 @@ function forbidden_menu_option() { #Show message for invalid selected option function invalid_menu_option() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 76 "red" @@ -10424,7 +10424,7 @@ function invalid_menu_option() { #Show message for invalid selected interface function invalid_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 77 "red" @@ -10437,7 +10437,7 @@ function invalid_iface_selected() { #Show message for invalid selected internet interface function invalid_internet_iface_selected() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 77 "red" @@ -10450,7 +10450,7 @@ function invalid_internet_iface_selected() { #Manage behavior of captured traps function capture_traps() { - debug_print_function_and_parameters "${@}" + debug_print case "${1}" in INT|SIGTSTP) @@ -10484,7 +10484,7 @@ function capture_traps() { #Exit the script managing possible pending tasks function exit_script_option() { - debug_print_function_and_parameters "${@}" + debug_print action_on_exit_taken=0 echo @@ -10544,7 +10544,7 @@ function exit_script_option() { #Exit the script managing possible pending tasks but not showing anything function hardcore_exit() { - debug_print_function_and_parameters "${@}" + debug_print exit_code=2 if [ "${ifacemode}" = "Monitor" ]; then @@ -10573,7 +10573,7 @@ function hardcore_exit() { #Generate a small time loop printing some dots function time_loop() { - debug_print_function_and_parameters "${@}" + debug_print echo -ne " " for (( j=1; j<=4; j++ )); do @@ -10585,7 +10585,7 @@ function time_loop() { #Determine which version of airmon to use function airmon_fix() { - debug_print_function_and_parameters "${@}" + debug_print airmon="airmon-ng" @@ -10597,7 +10597,7 @@ function airmon_fix() { #Prepare the fix for iwconfig command depending of the wireless tools version function iwconfig_fix() { - debug_print_function_and_parameters "${@}" + debug_print iwversion=$(iwconfig --version | grep version | awk '{print $4}') iwcmdfix="" @@ -10609,7 +10609,7 @@ function iwconfig_fix() { #Set hashcat parameters based on version function set_hashcat_parameters() { - debug_print_function_and_parameters "${@}" + debug_print hashcat_fix="" hashcat_charset_fix_needed=0 @@ -10622,7 +10622,7 @@ function set_hashcat_parameters() { #Determine hashcat version function get_hashcat_version() { - debug_print_function_and_parameters "${@}" + debug_print hashcat_version=$(hashcat -V 2> /dev/null) hashcat_version=${hashcat_version#"v"} @@ -10631,7 +10631,7 @@ function get_hashcat_version() { #Determine bettercap version function get_bettercap_version() { - debug_print_function_and_parameters "${@}" + debug_print bettercap_version=$(bettercap -v 2> /dev/null | egrep "^bettercap [0-9]" | awk '{print $2}') } @@ -10639,7 +10639,7 @@ function get_bettercap_version() { #Determine bully version function get_bully_version() { - debug_print_function_and_parameters "${@}" + debug_print bully_version=$(bully -V 2> /dev/null) bully_version=${bully_version#"v"} @@ -10648,7 +10648,7 @@ function get_bully_version() { #Determine reaver version function get_reaver_version() { - debug_print_function_and_parameters "${@}" + debug_print reaver_version=$(reaver -h 2>&1 > /dev/null | egrep "^Reaver v[0-9]" | awk '{print $2}') if [ -z "${reaver_version}" ]; then @@ -10660,7 +10660,7 @@ function get_reaver_version() { #Set verbosity for bully based on version function set_bully_verbosity() { - debug_print_function_and_parameters "${@}" + debug_print if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_verbosity4_version}"; then bully_verbosity="4" @@ -10672,7 +10672,7 @@ function set_bully_verbosity() { #Validate if bully version is able to perform integrated pixiewps attack function validate_bully_pixiewps_version() { - debug_print_function_and_parameters "${@}" + debug_print if compare_floats_greater_or_equal "${bully_version}" "${minimum_bully_pixiewps_version}"; then return 0 @@ -10683,7 +10683,7 @@ function validate_bully_pixiewps_version() { #Validate if reaver version is able to perform integrated pixiewps attack function validate_reaver_pixiewps_version() { - debug_print_function_and_parameters "${@}" + debug_print if compare_floats_greater_or_equal "${reaver_version}" "${minimum_reaver_pixiewps_version}"; then return 0 @@ -10694,7 +10694,7 @@ function validate_reaver_pixiewps_version() { #Set the script folder var if necessary function set_script_folder_and_name() { - debug_print_function_and_parameters "${@}" + debug_print if [ -z "${scriptfolder}" ]; then scriptfolder=${0} @@ -10712,7 +10712,7 @@ function set_script_folder_and_name() { #Check if pins database file exist and try to download the new one if proceed function check_pins_database_file() { - debug_print_function_and_parameters "${@}" + debug_print if [ -f "${scriptfolder}${known_pins_dbfile}" ]; then language_strings "${language}" 376 "yellow" @@ -10780,7 +10780,7 @@ function check_pins_database_file() { #Download the pins database file function download_pins_database_file() { - debug_print_function_and_parameters "${@}" + debug_print remote_pindb_file=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile} 2> /dev/null) @@ -10795,7 +10795,7 @@ function download_pins_database_file() { #Ask for try to download pin db file again and set the var to skip it function ask_for_pin_dbfile_download_retry() { - debug_print_function_and_parameters "${@}" + debug_print ask_yesno 380 if [ ${yesno} = "n" ]; then @@ -10806,7 +10806,7 @@ function ask_for_pin_dbfile_download_retry() { #Get the checksum for local pin database file function get_local_pin_dbfile_checksum() { - debug_print_function_and_parameters "${@}" + debug_print local_pin_dbfile_checksum=$(md5sum "${1}" | awk '{print $1}') } @@ -10814,7 +10814,7 @@ function get_local_pin_dbfile_checksum() { #Get the checksum for remote pin database file function get_remote_pin_dbfile_checksum() { - debug_print_function_and_parameters "${@}" + debug_print remote_pin_dbfile_checksum=$(timeout -s SIGTERM 15 curl -L ${urlscript_pins_dbfile_checksum} 2> /dev/null | head -n 1) @@ -10827,7 +10827,7 @@ function get_remote_pin_dbfile_checksum() { #Check for possible non Linux operating systems function non_linux_os_check() { - debug_print_function_and_parameters "${@}" + debug_print case "${OSTYPE}" in solaris*) @@ -10845,7 +10845,7 @@ function non_linux_os_check() { #First phase of Linux distro detection based on uname output function detect_distro_phase1() { - debug_print_function_and_parameters "${@}" + debug_print for i in "${known_compatible_distros[@]}"; do uname -a | grep "${i}" -i > /dev/null @@ -10859,7 +10859,7 @@ function detect_distro_phase1() { #Second phase of Linux distro detection based on architecture and version file function detect_distro_phase2() { - debug_print_function_and_parameters "${@}" + debug_print if [ "${distro}" = "Unknown Linux" ]; then if [ -f ${osversionfile_dir}"centos-release" ]; then @@ -10906,7 +10906,7 @@ function detect_distro_phase2() { #Detect if arm architecture is present on system function detect_arm_architecture() { - debug_print_function_and_parameters "${@}" + debug_print distro_already_known=0 uname -m | grep -i "arm" > /dev/null @@ -10931,7 +10931,7 @@ function detect_arm_architecture() { #Set some useful vars based on Linux distro function special_distro_features() { - debug_print_function_and_parameters "${@}" + debug_print case ${distro} in "Wifislax") @@ -11052,7 +11052,7 @@ function special_distro_features() { #Determine if NetworkManager must be killed on your system. Only needed for previous versions of 1.0.12 function check_if_kill_needed() { - debug_print_function_and_parameters "${@}" + debug_print nm_min_main_version="1" nm_min_subversion="0" @@ -11089,7 +11089,7 @@ function check_if_kill_needed() { #Do some checks for some general configuration function general_checkings() { - debug_print_function_and_parameters "${@}" + debug_print compatible=0 distro="Unknown Linux" @@ -11121,7 +11121,7 @@ function general_checkings() { #Check if the user is root function check_root_permissions() { - debug_print_function_and_parameters "${@}" + debug_print user=$(whoami) @@ -11133,7 +11133,7 @@ function check_root_permissions() { #Print Linux known distros function print_known_distros() { - debug_print_function_and_parameters "${@}" + debug_print all_known_compatible_distros=("${known_compatible_distros[@]}" "${known_arm_compatible_distros[@]}") IFS=$'\n' @@ -11149,7 +11149,7 @@ function print_known_distros() { #Check if you have installed the tools (essential and optional) that the script uses function check_compatibility() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 108 "blue" @@ -11250,7 +11250,7 @@ function check_compatibility() { #Check for the minimum bash version requirement function check_bash_version() { - debug_print_function_and_parameters "${@}" + debug_print echo bashversion="${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}" @@ -11266,7 +11266,7 @@ function check_bash_version() { #Check if you have installed the tools required to update the script function check_update_tools() { - debug_print_function_and_parameters "${@}" + debug_print if [ ${auto_update} -eq 1 ]; then if [ ${update_toolsok} -eq 1 ]; then @@ -11282,7 +11282,7 @@ function check_update_tools() { #Check if window size is enough for intro function check_window_size_for_intro() { - debug_print_function_and_parameters "${@}" + debug_print window_width=$(tput cols) window_height=$(tput lines) @@ -11305,7 +11305,7 @@ function check_window_size_for_intro() { #Print the script intro function print_intro() { - debug_print_function_and_parameters "${@}" + debug_print echo -e "${yellow_color} .__ .___ .___" sleep 0.15 && echo -e " _____ |__|______ ____ ____ __| _/__| _/____ ____" @@ -11322,7 +11322,7 @@ function print_intro() { #Generate the frames of the animated ascii art flying saucer function flying_saucer() { - debug_print_function_and_parameters "${@}" + debug_print case ${1} in 1) @@ -11364,7 +11364,7 @@ function flying_saucer() { #Print animated ascii art flying saucer function print_animated_flying_saucer() { - debug_print_function_and_parameters "${@}" + debug_print echo -e "\033[s" @@ -11382,7 +11382,7 @@ function print_animated_flying_saucer() { #Initialize script settings function initialize_script_settings() { - debug_print_function_and_parameters "${@}" + debug_print exit_code=0 check_kill_needed=0 @@ -11406,7 +11406,7 @@ function initialize_script_settings() { #Detect screen resolution if possible function detect_screen_resolution() { - debug_print_function_and_parameters "${@}" + debug_print resolution_detected=0 if hash xdpyinfo 2> /dev/null; then @@ -11427,7 +11427,7 @@ function detect_screen_resolution() { #Set windows sizes and positions function set_windows_sizes() { - debug_print_function_and_parameters "${@}" + debug_print set_xsizes set_ysizes @@ -11458,7 +11458,7 @@ function set_windows_sizes() { #Set sizes for x axis function set_xsizes() { - debug_print_function_and_parameters "${@}" + debug_print xtotal=$(awk -v n1="${resolution_x}" "BEGIN{print n1 / ${xratio}}") @@ -11479,7 +11479,7 @@ function set_xsizes() { #Set sizes for y axis function set_ysizes() { - debug_print_function_and_parameters "${@}" + debug_print ytotal=$(awk -v n1="${resolution_y}" "BEGIN{print n1 / ${yratio}}") ytotaltmp=$(printf "%.0f" "${ytotal}" 2> /dev/null) @@ -11499,7 +11499,7 @@ function set_ysizes() { #Set positions for y axis function set_ypositions() { - debug_print_function_and_parameters "${@}" + debug_print middle_position=$((resolution_y / 3 + ywindow_edge_pixels)) } @@ -11507,7 +11507,7 @@ function set_ypositions() { #Recalculate windows sizes and positions function recalculate_windows_sizes() { - debug_print_function_and_parameters "${@}" + debug_print detect_screen_resolution set_windows_sizes @@ -11516,7 +11516,7 @@ function recalculate_windows_sizes() { #Script starting point function welcome() { - debug_print_function_and_parameters "${@}" + debug_print clear current_menu="pre_main_menu" @@ -11587,7 +11587,7 @@ function welcome() { #Avoid the problem of using airmon-zc without ethtool or lspci installed function airmonzc_security_check() { - debug_print_function_and_parameters "${@}" + debug_print if [ "${airmon}" = "airmon-zc" ]; then if ! hash ethtool 2> /dev/null; then @@ -11611,7 +11611,7 @@ function airmonzc_security_check() { #Compare if first float argument is greater than float second argument function compare_floats_greater_than() { - debug_print_function_and_parameters "${@}" + debug_print awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>n2) exit 0; exit 1}' } @@ -11619,7 +11619,7 @@ function compare_floats_greater_than() { #Compare if first float argument is greater or equal than float second argument function compare_floats_greater_or_equal() { - debug_print_function_and_parameters "${@}" + debug_print awk -v n1="${1}" -v n2="${2}" 'BEGIN{if (n1>=n2) exit 0; exit 1}' } @@ -11627,7 +11627,7 @@ function compare_floats_greater_or_equal() { #Update and relaunch the script function download_last_version() { - debug_print_function_and_parameters "${@}" + debug_print rewrite_script_with_custom_beef "search" timeout -s SIGTERM 15 curl -L ${urlscript_directlink} -s -o "${0}" @@ -11649,7 +11649,7 @@ function download_last_version() { #Validate if the selected internet interface has internet access function validate_et_internet_interface() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 287 "blue" @@ -11680,7 +11680,7 @@ function validate_et_internet_interface() { #Check for active internet connection function check_internet_access() { - debug_print_function_and_parameters "${@}" + debug_print ping -c 1 ${host_to_check_internet} -W 1 > /dev/null 2>&1 return $? @@ -11689,7 +11689,7 @@ function check_internet_access() { #Check for default route on an interface function check_default_route() { - debug_print_function_and_parameters "${@}" + debug_print route | grep "${1}" | grep "default" > /dev/null return $? @@ -11698,7 +11698,7 @@ function check_default_route() { #Update the script if your version is lower than the cloud version function autoupdate_check() { - debug_print_function_and_parameters "${@}" + debug_print echo language_strings "${language}" 210 "blue" @@ -11734,7 +11734,7 @@ function autoupdate_check() { #Check if you can launch captive portal Evil Twin attack function check_et_without_internet_compatibility() { - debug_print_function_and_parameters "${@}" + debug_print if ! hash "${optional_tools_names[12]}" 2> /dev/null; then return 1 @@ -11745,7 +11745,7 @@ function check_et_without_internet_compatibility() { #Change script language automatically if OS language is supported by the script and different from current language function autodetect_language() { - debug_print_function_and_parameters "${@}" + debug_print [[ $(locale | grep LANG) =~ ^(.*)=\"?([a-zA-Z]+)_(.*)$ ]] && lang="${BASH_REMATCH[2]}" @@ -11761,7 +11761,7 @@ function autodetect_language() { #Clean some known and controlled warnings for shellcheck tool function remove_warnings() { - debug_print_function_and_parameters "${@}" + debug_print echo "${clean_handshake_dependencies[@]}" > /dev/null 2>&1 echo "${aircrack_attacks_dependencies[@]}" > /dev/null 2>&1 @@ -11784,7 +11784,7 @@ function remove_warnings() { #Print a simple separator function print_simple_separator() { - debug_print_function_and_parameters "${@}" + debug_print echo_blue "---------" } @@ -11792,7 +11792,7 @@ function print_simple_separator() { #Print a large separator function print_large_separator() { - debug_print_function_and_parameters "${@}" + debug_print echo_blue "-------------------------------------------------------" } @@ -11800,7 +11800,7 @@ function print_large_separator() { #Add the PoT prefix on printed strings if PoT mark is found function check_pending_of_translation() { - debug_print_function_and_parameters "${@}" + debug_print if [[ "${1}" =~ ^${escaped_pending_of_translation}([[:space:]])(.*)$ ]]; then text="${cyan_color}${pending_of_translation} ${2}${BASH_REMATCH[2]}" @@ -11822,7 +11822,7 @@ function check_pending_of_translation() { #Print under construction message used on some menu entries function under_construction_message() { - debug_print_function_and_parameters "${@}" + debug_print local var_uc="${under_constructionvar^}" echo @@ -11833,7 +11833,7 @@ function under_construction_message() { #Canalize the echo functions function last_echo() { - debug_print_function_and_parameters "${@}" + debug_print check_pending_of_translation "${1}" "${2}" if [ "$?" != "0" ]; then @@ -11846,7 +11846,7 @@ function last_echo() { #Print green messages function echo_green() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${green_color}" } @@ -11854,7 +11854,7 @@ function echo_green() { #Print blue messages function echo_blue() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${blue_color}" } @@ -11862,7 +11862,7 @@ function echo_blue() { #Print yellow messages function echo_yellow() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${yellow_color}" } @@ -11870,7 +11870,7 @@ function echo_yellow() { #Print red messages function echo_red() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${red_color}" } @@ -11878,7 +11878,7 @@ function echo_red() { #Print red messages using a slimmer thickness function echo_red_slim() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${red_color_slim}" } @@ -11886,7 +11886,7 @@ function echo_red_slim() { #Print black messages with background for titles function echo_green_title() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${green_color_title}" } @@ -11894,7 +11894,7 @@ function echo_green_title() { #Print pink messages function echo_pink() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${pink_color}" } @@ -11902,7 +11902,7 @@ function echo_pink() { #Print cyan messages function echo_cyan() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${cyan_color}" } @@ -11910,7 +11910,7 @@ function echo_cyan() { #Print brown messages function echo_brown() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${brown_color}" } @@ -11918,7 +11918,7 @@ function echo_brown() { #Print white messages function echo_white() { - debug_print_function_and_parameters "${@}" + debug_print last_echo "${1}" "${white_color}" } From 8a5d47cce81476c05affa6f16087d027aedb06de Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Tue, 21 Feb 2017 21:28:41 +0100 Subject: [PATCH 40/41] TODO added for future function arguments on debug_mode=2 --- airgeddon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airgeddon.sh b/airgeddon.sh index 189684c26..d88f93b15 100644 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -3971,7 +3971,7 @@ function debug_print() { return 1 fi - echo "Line:${BASH_LINENO[1]}" "${FUNCNAME[1]}" # "${@}" to print parameters + echo "Line:${BASH_LINENO[1]}" "${FUNCNAME[1]}" #TODO "${@}" to print parameters return 0 fi } From 661e811450ad195082f6f795b6d8473787320d03 Mon Sep 17 00:00:00 2001 From: Sotiris Roussis Date: Wed, 22 Feb 2017 01:00:17 +0200 Subject: [PATCH 41/41] Beautified README.md --- README.md | 88 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index d9adcf59d..b66dfd08b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,35 @@ + + # :satellite: airgeddon [![Version-shield]](CHANGELOG.md) [![Bash4.2-shield]](http://tldp.org/LDP/abs/html/bashver4.html#AEN21220) [![License-shield]](LICENSE.md) [![Paypal-shield]](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7ELM486P7XKKG) [![Bitcoin-shield]](https://blockchain.info/address/1AKnTXbomtwUzrm81FRzi5acSSXxGteGTH) -This is a multi-use bash script for Linux systems to audit wireless networks. +> This is a multi-use bash script for Linux systems to audit wireless networks. ![Banner] +
+ Table Of Contents +- [Features] +- [Requirements] + - [Essential Tools] + - [Optional Tools] + - [Update Tools] + - [Internal Tools] + - [BeEF Tips] +- [Usage] +- [Supported Languages] +- [Known Incompatibilities] +- [Contributing] +- [Changelog] +- [Disclaimer & License] +- [Acknowledgments] + - [Hat Tip To] + - [Inspiration] +
+ --- ### Features @@ -36,7 +58,7 @@ This is a multi-use bash script for Linux systems to audit wireless networks. - Drag and drop files on console window for entering file paths - Dynamic screen resolution detection and windows auto-sizing for optimal 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) +- Multilanguage support and autodetect OS language feature (see [Supported Languages] section) - Help hints in every zone/menu for easy use - Auto-update. Script checks for newer version if possible @@ -48,9 +70,14 @@ Bash **4.2** or later. Compatible with any Linux that has installed the tools needed. The script checks for them at the beginning. - -Tested on these compatible Linux distributions: +> `airgeddon` is already included in some Linux distributions and repositories: +> - [Wifislax] 4.12, 64-1.0 or higher +> - [BlackArch] 2017.01.28 or later +> - [ArchStrike] repository + +
+ Tested on these compatible Linux distributions - *Kali 2.0, 2016.1, 2016.2 and arm versions (Raspberry Pi)* - *Wifislax 4.11.1, 4.12 and 64-1.0* - *Backbox 4.5.1 and 4.6* @@ -67,11 +94,7 @@ Tested on these compatible Linux distributions: - *Arch 4.6.2-1 to 4.9.9-1* - *Raspbian 7 (Wheezy) and 8 (Jessie) (Raspberry Pi)* - *OpenMandriva LX3* - -`airgeddon` is already included in some Linux distributions and repositories: -- [Wifislax] 4.12, 64-1.0 or higher -- [BlackArch] 2017.01.28 or later -- [ArchStrike] repository +
#### Essential tools ← The script does not work if you don't have installed all of them @@ -167,13 +190,13 @@ Even with no initial error, it will maybe show itself later. Always use bash! - More WPS pins for the database - Testing and feedback -Read [Contributing] file for more details on our code of conduct, and the process of project collaborating. +Read [Contributing File] for more details on our code of conduct, and the process of project collaborating. --- ### Changelog -Read [Changelog] file to review changes. +Read [Changelog File] to review changes. --- @@ -220,7 +243,24 @@ Use it only on your own networks or with the network's owner permission.
- Goyfilms → Goyscript - [Kcdtv] → WPSPin - + +[Features]: #features +[Essential Tools]: #essential-tools--the-script-does-not-work-if-you-dont-have-installed-all-of-them +[Optional Tools]: #optional-tools--not-necessary-to-work-only-needed-for-some-features +[BeEF Tips]: #important-tips-about-beef +[Update Tools]: #update-tools--not-necessary-to-work-only-used-for-auto-update +[Internal Tools]: #internal-tools--these-are-internally-checked-not-necessary-to-work-good-to-have +[Requirements]: #requirements +[Usage]: #usage +[Supported Languages]: #supported-languages +[Known Incompatibilities]: #known-incompatibilities +[Contributing]: #contributing +[Changelog]: #changelog +[Disclaimer & License]: #disclaimer--license +[Acknowledgments]: #acknowledgments +[Hat Tip To]: #hat-tip-to +[Inspiration]: #inspiration + [Banner]: /imgs/banners/airgeddon_banner.png "We will conquer the earth!!" [English]: /imgs/flags/us.png "English" [Spanish]: /imgs/flags/es.png "Spanish" @@ -229,18 +269,10 @@ Use it only on your own networks or with the network's owner permission.
[Portuguese]: /imgs/flags/pt.png "Portuguese" [Russian]: /imgs/flags/ru.png "Russian" [Greek]: /imgs/flags/gr.png "Greek" - -[Requirements]: #requirements -[Languages]: #supported-languages -[License]: LICENSE.md -[Contributing]: CONTRIBUTING.md -[Changelog]: CHANGELOG.md - -[Version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" -[Bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" -[License-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" -[Paypal-shield]: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&colorA=002f86&colorB=009cde "Show me the money!" -[Bitcoin-shield]: https://img.shields.io/badge/donate-bitcoin-blue.svg?style=flat-square&colorA=273133&colorB=f7931a "Show me the money!" + +[Changelog File]: CHANGELOG.md +[Contributing File]: CONTRIBUTING.md +[License File]: LICENSE.md [Wifislax]: http://www.wifislax.com [BlackArch]: https://blackarch.org @@ -250,7 +282,7 @@ Use it only on your own networks or with the network's owner permission.
[Wifi-libre.com]: https://www.wifi-libre.com [Lampiweb.com]: http://lampiweb.com/foro [Hackware.ru]: https://hackware.ru - + [vk496]: https://github.com/vk496 [MatToufoutu]: https://github.com/mattoufoutu [Kcdtv]: https://github.com/kcdtv @@ -259,3 +291,9 @@ Use it only on your own networks or with the network's owner permission.
[MiAl]: https://github.com/Mi-Al [xtonousou]: https://github.com/xtonousou "xT" [OscarAkaElvis]: https://github.com/OscarAkaElvis + +[Version-shield]: https://img.shields.io/badge/version-6.01-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later" +[License-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+" +[Paypal-shield]: https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square&colorA=002f86&colorB=009cde "Show me the money!" +[Bitcoin-shield]: https://img.shields.io/badge/donate-bitcoin-blue.svg?style=flat-square&colorA=273133&colorB=f7931a "Show me the money!"