Skip to content

Commit

Permalink
Merge pull request #91 from v1s1t0r1sh3r3/dev
Browse files Browse the repository at this point in the history
Dev to master v7.01
  • Loading branch information
OscarAkaElvis authored May 12, 2017
2 parents d1df2d6 + fa8c4f1 commit f018a4d
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 19 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 7.01
- Fixed bug while changing interface mode if the destination interface name is in use
- Removed util-linux dependency for rev use
- The existing iptables rules before the launch of airgeddon are now restored upon exiting if modified
- Fixed bug while checking for NetworkManager's version on some linux distributions
- Tested compatibility with Kali Linux 2017.1 and Parrot 3.5
- Dockerfile updated

### 7.0
- New WEP attacks menu
- Added All-in-One WEP attack
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ COPY \

#airgeddon install method 2 (only one method can be used, other must be commented)
#Install airgeddon (manual image build)
#Uncomment one of the three to select branch (master->latest, dev->beta, docker->alpha)
#Uncomment one of them to select branch (master->latest, dev->beta)
#ENV BRANCH="master"
#ENV BRANCH="dev"
#ENV BRANCH="docker"
#RUN \
# git clone -b ${BRANCH} ${AIRGEDDON_URL}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ All the needed info about how to install|use|enjoy `airgeddon` is present at [Gi
[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-7.0-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version"
[Version-shield]: https://img.shields.io/badge/version-7.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+"
[Docker-shield]: https://img.shields.io/docker/automated/v1s1t0r1sh3r3/airgeddon.svg?style=flat-square&colorA=273133&colorB=f9ff5a "Docker rules!"
Expand Down
76 changes: 62 additions & 14 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#Title........: airgeddon.sh
#Description..: This is a multi-use bash script for Linux systems to audit wireless networks.
#Author.......: v1s1t0r
#Date.........: 20170505
#Version......: 7.0
#Date.........: 20170508
#Version......: 7.01
#Usage........: bash airgeddon.sh
#Bash Version.: 4.2 or later

Expand Down Expand Up @@ -106,8 +106,8 @@ declare -A possible_alias_names=(
)

#General vars
airgeddon_version="7.0"
language_strings_expected_version="7.0-1"
airgeddon_version="7.01"
language_strings_expected_version="7.01-1"
standardhandshake_filename="handshake-01.cap"
tmpdir="/tmp/"
osversionfile_dir="/etc/"
Expand Down Expand Up @@ -751,7 +751,7 @@ function calculate_easybox_algorithm() {
Z1=$((0x${hexi[2]} ^ hex_to_dec[3]))
Z2=$((0x${hexi[3]} ^ hex_to_dec[2]))

easybox_pin=$(printf '%08d\n' "$((0x$X1$X2$Y1$Y2$Z1$Z2$X3))" | rev | cut -c -7 | rev)
easybox_pin=$(printf '%08d\n' "$((0x$X1$X2$Y1$Y2$Z1$Z2$X3))" | awk '{for(i=length; i!=0; i--) x=x substr($0, i, 1);} END {print x}' | cut -c -7 | awk '{for(i=length; i!=0; i--) x=x substr($0, i, 1);} END {print x}')
}

#Calculate the last digit on pin following the checksum rule
Expand Down Expand Up @@ -874,7 +874,7 @@ function prepare_et_interface() {
et_initial_state=${ifacemode}

if [ "${ifacemode}" != "Managed" ]; then
new_interface=$(${airmon} stop "${interface}" 2> /dev/null | grep station)
new_interface=$(${airmon} stop "${interface}" 2> /dev/null | grep station | head -n 1)
ifacemode="Managed"
[[ ${new_interface} =~ \]?([A-Za-z0-9]+)\)?$ ]] && new_interface="${BASH_REMATCH[1]}"
if [ "${interface}" != "${new_interface}" ]; then
Expand Down Expand Up @@ -909,6 +909,14 @@ function restore_et_interface() {
ifacemode="Managed"
else
new_interface=$(${airmon} start "${interface}" 2> /dev/null | grep monitor)
desired_interface_name=""
[[ ${new_interface} =~ ^You[[:space:]]already[[:space:]]have[[:space:]]a[[:space:]]([A-Za-z0-9]+)[[:space:]]device ]] && desired_interface_name="${BASH_REMATCH[1]}"
if [ -n "${desired_interface_name}" ]; then
echo
language_strings "${language}" 435 "red"
language_strings "${language}" 115 "read"
return
fi
ifacemode="Monitor"
[[ ${new_interface} =~ \]?([A-Za-z0-9]+)\)?$ ]] && new_interface="${BASH_REMATCH[1]}"
if [ "${interface}" != "${new_interface}" ]; then
Expand Down Expand Up @@ -943,7 +951,7 @@ function managed_option() {
language_strings "${language}" 17 "blue"
ifconfig "${interface}" up

new_interface=$(${airmon} stop "${interface}" 2> /dev/null | grep station)
new_interface=$(${airmon} stop "${interface}" 2> /dev/null | grep station | head -n 1)
ifacemode="Managed"
[[ ${new_interface} =~ \]?([A-Za-z0-9]+)\)?$ ]] && new_interface="${BASH_REMATCH[1]}"

Expand Down Expand Up @@ -993,6 +1001,16 @@ function monitor_option() {
fi

new_interface=$(${airmon} start "${interface}" 2> /dev/null | grep monitor)

desired_interface_name=""
[[ ${new_interface} =~ ^You[[:space:]]already[[:space:]]have[[:space:]]a[[:space:]]([A-Za-z0-9]+)[[:space:]]device ]] && desired_interface_name="${BASH_REMATCH[1]}"
if [ -n "${desired_interface_name}" ]; then
echo
language_strings "${language}" 435 "red"
language_strings "${language}" 115 "read"
return
fi

ifacemode="Monitor"
[[ ${new_interface} =~ \]?([A-Za-z0-9]+)\)?$ ]] && new_interface="${BASH_REMATCH[1]}"

Expand Down Expand Up @@ -2855,7 +2873,30 @@ function clean_routing_rules() {
echo "${original_routing_state}" > /proc/sys/net/ipv4/ip_forward
fi

clean_iptables
if [ "${iptables_saved}" -eq 1 ]; then
restore_iptables
else
clean_iptables
fi
}

#Save iptables rules
function save_iptables() {

debug_print

iptables-save > "${tmpdir}ag.iptables" 2> /dev/null
if [ "$?" = "0" ]; then
iptables_saved=1
fi
}

#Restore iptables rules
function restore_iptables() {

debug_print

iptables-restore < "${tmpdir}ag.iptables" 2> /dev/null
}

#Clean iptables rules
Expand Down Expand Up @@ -4705,9 +4746,13 @@ function set_std_internet_routing_rules() {

debug_print

routing_toclean=1
original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward)
if [ "${routing_modified}" -eq 0 ]; then
original_routing_state=$(cat /proc/sys/net/ipv4/ip_forward)
save_iptables
fi

ifconfig "${interface}" ${et_ip_router} netmask ${std_c_mask} > /dev/null 2>&1
routing_modified=1

clean_iptables

Expand Down Expand Up @@ -7747,7 +7792,7 @@ function exit_script_option() {
echo -e "${green_color} Ok\r${normal_color}"
fi

if [ ${routing_toclean} -eq 1 ]; then
if [ ${routing_modified} -eq 1 ]; then
action_on_exit_taken=1
language_strings "${language}" 297 "multiline"
clean_routing_rules
Expand Down Expand Up @@ -7793,7 +7838,7 @@ function hardcore_exit() {
clean_tmpfiles
fi

if [ ${routing_toclean} -eq 1 ]; then
if [ ${routing_modified} -eq 1 ]; then
clean_routing_rules
killall dhcpd > /dev/null 2>&1
killall hostapd > /dev/null 2>&1
Expand Down Expand Up @@ -8318,7 +8363,9 @@ function check_if_kill_needed() {

if [ "${nm_system_version}" != "" ]; then

[[ ${nm_system_version} =~ ^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]+).*?$ ]] && nm_main_system_version="${BASH_REMATCH[1]}" && nm_system_subversion="${BASH_REMATCH[2]}" && nm_system_subversion2="${BASH_REMATCH[3]}"
[[ ${nm_system_version} =~ ^([0-9]{1,2})\.([0-9]{1,2})\.?(([0-9]+)|.+)? ]] && nm_main_system_version="${BASH_REMATCH[1]}" && nm_system_subversion="${BASH_REMATCH[2]}" && nm_system_subversion2="${BASH_REMATCH[3]}"
[[ ${nm_system_subversion2} =~ [a-zA-Z] ]] && nm_system_subversion2="0"
if [ "${nm_main_system_version}" -lt ${nm_min_main_version} ]; then
check_kill_needed=1
Expand Down Expand Up @@ -8654,7 +8701,8 @@ function initialize_script_settings() {
airmon_fix
autochanged_language=0
tmpfiles_toclean=0
routing_toclean=0
routing_modified=0
iptables_saved=0
spoofed_mac=0
mac_spoofing_desired=0
dhcpd_path_changed=0
Expand Down
Binary file added binaries/kali/airgeddon_7.01-1_all.deb
Binary file not shown.
File renamed without changes.
12 changes: 10 additions & 2 deletions language_strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#Title........: language_strings.sh
#Description..: All the translated strings that airgeddon uses are located here.
#Author.......: v1s1t0r
#Date.........: 20170505
#Date.........: 20170507
#Bash Version.: 4.2 or later

#Set language_strings file version
Expand All @@ -11,7 +11,7 @@ function set_language_strings_version() {

debug_print

language_strings_version="7.0-1"
language_strings_version="7.01-1"
}

#Set different language text strings
Expand Down Expand Up @@ -3841,6 +3841,14 @@ function language_strings() {
arr["RUSSIAN",434]="Атака WEP \"Все-в-Одном\" началась. Для её остановки клавишу [Enter] в этом окне"
arr["GREEK",434]="Η επίθεση WEP \"All-in-One\" έχει αρχίσει. Πατήστε το κουμπί [Enter] σε αυτό το παράθυρο για να την σταματήσετε"

arr["ENGLISH",435]="Error trying to change interface mode. During the process the interface name must be changed, but it looks like you already have an interface occupying the name that would be needed (${normal_color}${desired_interface_name}${red_color})"
arr["SPANISH",435]="Error al intentar cambiar el modo de la interfaz. En el proceso el nombre del interfaz cambia, pero parece que ya tienes un interfaz ocupando el nombre que se necesitaría (${normal_color}${desired_interface_name}${red_color})"
arr["FRENCH",435]="${pending_of_translation} Erreur lors de la tentative de changer le mode d'interface. Dans le processus, le nom des modifications de l'interface, mais il semble que vous avez déjà une interface occupant le nom nécessaire (${normal_color}${desired_interface_name}${red_color})"
arr["CATALAN",435]="${pending_of_translation} Error en intentar canviar el mode de la interfície. En el procés el nom de la interfície canvia, però sembla que ja tens una interfície ocupant el nom que es necessitaria (${normal_color}${desired_interface_name}${red_color})"
arr["PORTUGUESE",435]="${pending_of_translation} Erro ao tentar alterar o modo de interface. No processo, o nome das mudanças de interface, mas parece que você já tem uma interface que ocupa o nome necessário (${normal_color}${desired_interface_name}${red_color})"
arr["RUSSIAN",435]="${pending_of_translation} Ошибка при попытке изменить режим интерфейса. Во время процесса имя интерфейса должно быть изменено, но похоже, что у вас уже есть интерфейс, занимающий нужное имя (${normal_color}${desired_interface_name}${red_color})"
arr["GREEK",435]="${pending_of_translation} Σφάλμα κατά την προσπάθεια να αλλάξει την κατάσταση διασύνδεσης. Κατά τη διάρκεια της διαδικασίας, το όνομα διεπαφής πρέπει να αλλάξει, αλλά φαίνεται ότι έχετε ήδη μια διεπαφή που καταλαμβάνει το όνομα που θα χρειαζόταν (${normal_color}${desired_interface_name}${red_color})"

case "${3}" in
"yellow")
interrupt_checkpoint "${2}" "${3}"
Expand Down

0 comments on commit f018a4d

Please sign in to comment.