From 99a391025f70edc486ea2ada5407723c8cce3cc2 Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Thu, 5 Sep 2024 17:32:01 +0200 Subject: [PATCH 01/72] Preparing version numbers for v11.40 --- README.md | 2 +- airgeddon.sh | 6 +++--- language_strings.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 89d53dae2..6f36f8776 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ All the needed info about how to "install | use | enjoy" `airgeddon` is present [Hat Tip To]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Hat%20Tip%20To [Inspiration]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Inspiration -[Version-shield]: https://img.shields.io/badge/version-11.31-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version" +[Version-shield]: https://img.shields.io/badge/version-11.40-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+" [Docker-shield]: https://img.shields.io/docker/automated/v1s1t0r1sh3r3/airgeddon.svg?style=flat-square&colorA=273133&colorB=a9a9a9 "Docker rules!" diff --git a/airgeddon.sh b/airgeddon.sh index 3fedc26ec..325d084d4 100755 --- 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 -#Version......: 11.31 +#Version......: 11.40 #Usage........: bash airgeddon.sh #Bash Version.: 4.2 or later @@ -123,8 +123,8 @@ declare -A possible_alias_names=( ) #General vars -airgeddon_version="11.31" -language_strings_expected_version="11.31-1" +airgeddon_version="11.40" +language_strings_expected_version="11.40-1" standardhandshake_filename="handshake-01.cap" standardpmkid_filename="pmkid_hash.txt" standardpmkidcap_filename="pmkid.cap" diff --git a/language_strings.sh b/language_strings.sh index a995cab34..278a3ad32 100644 --- a/language_strings.sh +++ b/language_strings.sh @@ -10,7 +10,7 @@ function set_language_strings_version() { debug_print - language_strings_version="11.31-1" + language_strings_version="11.40-1" } #Set different language text strings From a0fd6f666e331ec152bf26cd0168e0cf16c3bd8c Mon Sep 17 00:00:00 2001 From: v1s1t0r1sh3r3 Date: Fri, 6 Sep 2024 11:45:47 +0200 Subject: [PATCH 02/72] Refactor of heredoc set_captive_portal_page function to avoid use of 'EOF'. Now just EOF used with escaped vars when needed. --- airgeddon.sh | 59 +++++++++++++--------------------------------------- 1 file changed, 15 insertions(+), 44 deletions(-) diff --git a/airgeddon.sh b/airgeddon.sh index 325d084d4..df6c5834e 100755 --- a/airgeddon.sh +++ b/airgeddon.sh @@ -11734,6 +11734,7 @@ function set_captive_portal_page() { cat >&4 <<-EOF #!/usr/bin/env bash + echo '' echo '' echo -e '\t' @@ -11745,75 +11746,45 @@ function set_captive_portal_page() { echo -e '\t' echo -e '\t\t
' echo -e '\t\t\t

' - EOF - cat >&4 <<-'EOF' - POST_DATA=$(cat /dev/stdin) - if [[ "${REQUEST_METHOD}" = "POST" ]] && [[ "${CONTENT_LENGTH}" -gt 0 ]]; then - POST_DATA=${POST_DATA#*=} - password=${POST_DATA//+/ } - password=${password//[*&\/?<>]} - password=$(printf '%b' "${password//%/\\x}") - password=${password//[*&\/?<>]} + POST_DATA=\$(cat /dev/stdin) + if [[ "\${REQUEST_METHOD}" = "POST" ]] && [[ "\${CONTENT_LENGTH}" -gt 0 ]]; then + POST_DATA=\${POST_DATA#*=} + password=\${POST_DATA//+/ } + password=\${password//[*&\/?<>]} + password=\$(printf '%b' "\${password//%/\\\x}") + password=\${password//[*&\/?<>]} fi - if [[ "${#password}" -ge 8 ]] && [[ "${#password}" -le 63 ]]; then - EOF - - cat >&4 <<-EOF + if [[ "\${#password}" -ge 8 ]] && [[ "\${#password}" -le 63 ]]; then rm -rf "${tmpdir}${webdir}${currentpassfile}" > /dev/null 2>&1 - EOF - - cat >&4 <<-'EOF' - echo "${password}" >\ - EOF - - cat >&4 <<-EOF + echo "\${password}" >\ "${tmpdir}${webdir}${currentpassfile}" aircrack-ng -a 2 -b ${bssid} -w "${tmpdir}${webdir}${currentpassfile}" "${et_handshake}" | grep "KEY FOUND!" > /dev/null - EOF - - cat >&4 <<-'EOF' - if [ "$?" = "0" ]; then - EOF - cat >&4 <<-EOF + if [ "\$?" -eq 0 ]; then touch "${tmpdir}${webdir}${et_successfile}" > /dev/null 2>&1 echo '${et_misc_texts[${captive_portal_language},18]}' et_successful=1 else - EOF - - cat >&4 <<-'EOF' - echo "${password}" >>\ - EOF - - cat >&4 <<-EOF - "${tmpdir}${webdir}${attemptsfile}" + echo "\${password}" >> "${tmpdir}${webdir}${attemptsfile}" echo '${et_misc_texts[${captive_portal_language},17]}' et_successful=0 fi - EOF - - cat >&4 <<-'EOF' - elif [[ "${#password}" -gt 0 ]] && [[ "${#password}" -lt 8 ]]; then - EOF - - cat >&4 <<-EOF + elif [[ "\${#password}" -gt 0 ]] && [[ "\${#password}" -lt 8 ]]; then echo '${et_misc_texts[${captive_portal_language},26]}' et_successful=0 else echo '${et_misc_texts[${captive_portal_language},14]}' et_successful=0 fi + echo -e '\t\t\t

' echo -e '\t\t
' echo -e '\t' echo '' - EOF - cat >&4 <<-'EOF' - if [ "${et_successful}" -eq 1 ]; then + if [ "\${et_successful}" -eq 1 ]; then exit 0 else echo '