Skip to content

Commit

Permalink
v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
v1s1t0r1sh3r3 committed Mar 25, 2016
1 parent d8fe775 commit 069352c
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 73 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ We say a distro is a 100% compatible Linux distro if it has installed by default
Tested on these 100% compatible Linux distros:<br>
-Kali. Tested on 2.0 and 2016.1<br>
-Wifislax. Tested on 4.11.1<br>
-Backbox. Tested on 4.5.1<br>
-Parrot. Tested on 2.2.1<br>
-Blackarch 2016.01.10<br>
<br>
Anyway, can be used with any Linux distro if you have installed the tools what script needs. The script checks for them at the beginning:<br>
iwconfig<br>
airmon-ng<br>
airodump-ng<br>
aireplay-ng<br>
mdk3<br>
rfkill<br>
awk<br>
iwconfig airmon-ng airodump-ng aireplay-ng mdk3 awk<br>
<br>
Other (non 100% compatible) distros tested successfully after installing the missing tools:<br>
Other (non 100% compatible) distros tested successfully after installing missing tools:<br>
-Debian 8 (Jessie)<br>
-Ubuntu 15.10<br>

Expand Down
136 changes: 72 additions & 64 deletions airgeddon.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

version="2.23"
version="2.3"

#Change these lines to select another default language
language="english"
Expand All @@ -9,16 +9,17 @@ language="english"
#General vars
urlgithub="https://github.com/v1s1t0r1sh3r3/airgeddon"
mail="[email protected]"
tools=(iwconfig awk rfkill airmon-ng airodump-ng aireplay-ng mdk3)
essential_tools=(iwconfig awk airmon-ng airodump-ng aireplay-ng mdk3)
#Distro vars
known_compatible_distros=(wifislax kali parrot backbox blackarch)
known_nondirectly_compatible_distros=(ubuntu debian)

#Colors
green_color="\033[1;32m"
magenta_color="\033[1;35m"
white_color="\033[1;37m"
grey_color="\033[1;37m"
red_color="\033[1;31m"
blue_color="\033[1;34m"
yellow_color="\033[1;33m"
pink_color="\033[1;35m"
normal_color="\e[1;0m"

function language_strings() {
Expand Down Expand Up @@ -48,8 +49,8 @@ function language_strings() {
arr["english",7]="This script is only for educational purposes. Be good boyz&girlz"
arr["spanish",7]="Este script se ha hecho sólo con fines educativos. Sed buen@s chic@s"

arr["english",8]="Known supported 100% compatible distros for this script: Kali and Wifislax"
arr["spanish",8]="Distros conocidas 100% soportadas para este script: Kali y Wifislax"
arr["english",8]="Known supported 100% compatible distros :"
arr["spanish",8]="Distros conocidas 100% soportadas para este script :"

arr["english",9]="Detecting distro..."
arr["spanish",9]="Detectando distro..."
Expand Down Expand Up @@ -391,6 +392,9 @@ function language_strings() {
"green")
echo_green "${arr[$1,$2]}"
;;
"pink")
echo_pink "${arr[$1,$2]}"
;;
"titlered")
generate_title "${arr[$1,$2]}" "red"
;;
Expand Down Expand Up @@ -499,10 +503,12 @@ function check_monitor_enabled() {

function disable_rfkill() {

rfkill unblock 0
for i in {0..5}; do
rfkill unblock $i
done
if hash rfkill 2> /dev/null; then
rfkill unblock 0
for i in {0..5}; do
rfkill unblock $i > /dev/null
done
fi
}

function managed_option() {
Expand Down Expand Up @@ -535,6 +541,7 @@ function managed_option() {
function monitor_option() {

check_to_set_monitor

if [ "$?" != "0" ]; then
return
fi
Expand Down Expand Up @@ -572,18 +579,12 @@ function monitor_option() {

function check_interface_mode() {

if [ "$distro" = "Wifislax" ]; then
nowifi=`iwconfig $interface 2> /dev/null | grep Mode:`
if [[ "$?" != "0" ]]; then
ifacemode="(Non wifi card)"
return 0
fi
else
nowifi=`iwconfig $interface 2> /dev/null`
if [[ "$?" != "0" ]]; then
ifacemode="(Non wifi card)"
return 0
fi
iwconfig_fix
iwcmd="iwconfig $interface $iwcmdfix > /dev/null 2> /dev/null"
eval $iwcmd
if [[ "$?" != "0" ]]; then
ifacemode="(Non wifi card)"
return 0
fi

modemanaged=`iwconfig $interface 2> /dev/null | grep Mode: | cut -d ':' -f 2 | cut -d ' ' -f 1`
Expand Down Expand Up @@ -1140,7 +1141,7 @@ function select_target() {

clear
language_strings $language 104 "titlered"
language_strings $language 69
language_strings $language 69 "green"
echo_blue "-------------------------------------------------------"
i=0
while IFS=, read MAC CHANNEL POWER ESSID; do
Expand Down Expand Up @@ -1291,49 +1292,51 @@ function exit_script_option() {
exit
}

function detect_distro() {
function airmon_fix() {

compatible=0
distro="Standard Linux"
airmon="airmon-ng"

uname -a | grep kali -i > /dev/null
if [[ "$?" = "0" ]] && [[ $compatible -eq 0 ]]; then
language_strings $language 2 "yellow"
distro="Kali"
distro_language="english"
compatible=1
if hash airmon-zc 2> /dev/null; then
airmon="airmon-zc"
fi
}

uname -a | grep wifislax -i > /dev/null
if [[ "$?" = "0" ]] && [[ $compatible -eq 0 ]]; then
language_strings $language 4 "yellow"
distro="Wifislax"
distro_language="spanish"
compatible=1
function iwconfig_fix() {

if hash airmon-zc 2> /dev/null; then
airmon="airmon-zc"
fi
iwversion=`iwconfig --version | grep version | awk '{print $4}'`
iwcmdfix=""
if [ $iwversion -lt 30 ]; then
iwcmdfix=" 2> /dev/null | grep Mode: "
fi
}

uname -a | grep ubuntu -i > /dev/null
if [[ "$?" = "0" ]] && [[ $compatible -eq 0 ]]; then
language_strings $language 112 "yellow"
distro="Ubuntu"
distro_language="english"
compatible=0
fi
function detect_distro() {

uname -a | grep debian -i > /dev/null
if [[ "$?" = "0" ]] && [[ $compatible -eq 0 ]]; then
language_strings $language 113 "yellow"
distro="Debian"
distro_language="english"
compatible=0
compatible=0
distro="Unknown Linux"
airmon_fix

for i in "${known_compatible_distros[@]}"; do
uname -a | grep $i -i > /dev/null
if [ "$?" = "0" ]; then
distro="${i^}"
compatible=1
break
fi
done

if [ $compatible -eq 0 ]; then
for i in "${known_nondirectly_compatible_distros[@]}"; do
uname -a | grep $i -i > /dev/null
if [ "$?" = "0" ]; then
distro="${i^}"
compatible=0
break
fi
done
fi

check_autochange_language
echo -e $yellow_color"$distro Linux"$normal_color
echo

if [ $compatible -eq 1 ]; then
Expand All @@ -1349,13 +1352,12 @@ function detect_distro() {
exit_script_option
}

function check_autochange_language() {
function print_known_distros() {

if [ "$distro_language" != "$language" ]; then
echo
language=$distro_language
language_strings $language 3 "yellow"
fi
for i in "${known_compatible_distros[@]}"; do
echo -ne $pink_color"${i^} "$normal_color
done
echo
}

function check_compatibility() {
Expand All @@ -1368,7 +1370,7 @@ function check_compatibility() {
toolsok=1
toolstext=""

for i in "${tools[@]}"; do
for i in "${essential_tools[@]}"; do
echo -ne "$i "
for j in {0..4}; do
echo -ne "."
Expand Down Expand Up @@ -1405,8 +1407,9 @@ function welcome() {
language_strings $language 114 "green"
echo
language_strings $language 8 "blue"
language_strings $language 9 "blue"
print_known_distros
echo
language_strings $language 9 "blue"
detect_distro
language_strings $language 115 "read"

Expand Down Expand Up @@ -1434,5 +1437,10 @@ function echo_red() {
echo -e $red_color"$*"$normal_color
}

function echo_pink() {

echo -e $pink_color"$*"$normal_color
}

trap killing_script INT
welcome
9 changes: 8 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.3
Compatibility extended for Parrot, Blackarch and Backbox Linux
Essential tools check improved
Distro compatibility check improved
Iwconfig use fix based on version
Pink color added

2.23
Read "pause" functions now integrated with language strings
Title generator extracted to function
Expand All @@ -12,7 +19,7 @@ Changes on compatibility check structure
Ubuntu and Debian Linux compatibility check added

2.21
Compatibility Wifislax 64bits bug fixed
Wifislax 64bits compatibility bug fixed
Removed version from Readme file

2.2
Expand Down

0 comments on commit 069352c

Please sign in to comment.