From 5ac678e469aba3a6e1b2a155d0c7d437c4aaedcf Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:30:36 +0100 Subject: [PATCH 1/7] Deleted DUMP_PATH Was not in use in script --- install/install.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/install/install.sh b/install/install.sh index 0d59014..23cb0fa 100755 --- a/install/install.sh +++ b/install/install.sh @@ -18,11 +18,6 @@ blue='\e[1;34m' yellow='\e[1;33m' transparent="\e[0m" -#DUMP_PATH -rm -rf /tmp/Installer/ -mkdir /tmp/Installer/ -DUMP_PATH="/tmp/Installer/" - function conditional_clear() { if [[ "$INSTALLER_output_device" != "/dev/stdout" ]]; then clear; fi From 6cae165c7ce2ad53958cebcd02c6ec01d200325d Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:35:18 +0100 Subject: [PATCH 2/7] Added Installer function --- install/install.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/install/install.sh b/install/install.sh index 23cb0fa..5e17741 100755 --- a/install/install.sh +++ b/install/install.sh @@ -43,7 +43,6 @@ fi clear #Check for X display - if [ -z "${DISPLAY:-}" ]; then echo -e "\e[1;31mThe script should be executed inside a X (graphical) session."$transparent"" exit 1 @@ -67,7 +66,6 @@ function mostrarheader(){ function setresolution { function resA { - TOPLEFT="-geometry 90x13+0+0" TOPRIGHT="-geometry 83x26-0+0" BOTTOMLEFT="-geometry 90x24+0-0" @@ -77,7 +75,6 @@ function setresolution { } function resB { - TOPLEFT="-geometry 92x14+0+0" TOPRIGHT="-geometry 68x25-0+0" BOTTOMLEFT="-geometry 92x36+0-0" @@ -86,7 +83,6 @@ function setresolution { TOPRIGHTBIG="-geometry 74x30-0+0" } function resC { - TOPLEFT="-geometry 100x20+0+0" TOPRIGHT="-geometry 109x20-0+0" BOTTOMLEFT="-geometry 100x30+0-0" @@ -117,7 +113,7 @@ function setresolution { BOTTOMRIGHT="-geometry 90x20-0-0" TOPLEFTBIG="-geometry 100x70+0+0" TOPRIGHTBIG="-geometry 90x27-0+0" -} + } detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3) ## A) 1024x600 @@ -137,6 +133,22 @@ case $detectedresolution in esac } + +# Installer function +function installer { + echo -ne "$1.............................." | cut -z -b1-30 + echo "[*] Installing $1" >> /tmp/fluxionlog.txt + xterm $HOLD -title "Installing $1" -e "apt-get --yes install $1 | tee -a /tmp/fluxionlog.txt; echo \${PIPESTATUS[0]} > isok" + if [ "$(cat isok)" == "0" ]; then + echo -e "\e[1;32mOK!"$transparent + else + echo -e "\e[1;31mError (Check /tmp/fluxionlog.txt)."$transparent + fi + echo >> /tmp/fluxionlog.txt + rm -f isok +} + + #Install Main conditional_clear mostrarheader From d41e5ffe91c82b3b5c4df71ccdd491cbcaa1e7cf Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:38:54 +0100 Subject: [PATCH 3/7] Added checking for internet Checks for internet in loop until we get internet --- install/install.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/install/install.sh b/install/install.sh index 5e17741..11b56b9 100755 --- a/install/install.sh +++ b/install/install.sh @@ -48,8 +48,6 @@ if [ -z "${DISPLAY:-}" ]; then exit 1 fi - - function mostrarheader(){ conditional_clear @@ -153,6 +151,21 @@ function installer { conditional_clear mostrarheader + +#Check internet connection +wget -q --spider http://google.com +internet=$? +if [ "$internet" != "0" ]; then + echo "Waiting for internet connection..." + while [ "$internet" != "0" ] + do + sleep 1 + wget -q --spider http://google.com + internet=$? + done +fi + + echo "Updating system..." #cleaning up From 8e52045892909989054fd3080f356634057c782a Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:43:56 +0100 Subject: [PATCH 4/7] Python scripts for repository Deleted python scripts and made repository adding in bash, because it wasn't working (tested in Ubuntu live 17.04) --- install/install.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install/install.sh b/install/install.sh index 11b56b9..3c58de1 100755 --- a/install/install.sh +++ b/install/install.sh @@ -168,6 +168,15 @@ fi echo "Updating system..." +# adding repository and keys +if [ "$(cat /etc/apt/sources.list | grep 'deb http://http.kali.org/kali kali-rolling main contrib non-free')" = "" ]; then + gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6 + apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6 + echo "deb http://http.kali.org/kali kali-rolling main contrib non-free # by fluxion" >> /etc/apt/sources.list +else + echo "[*] Kali repository already exist, skipping." +fi + #cleaning up sudo apt-get install -f -y sudo apt-get autoremove -y @@ -178,8 +187,6 @@ sudo apt-get install xterm --yes clear mostrarheader xterm $HOLD -title "Updating System" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get install software-properties-common --yes -xterm $HOLD -title "Updating System" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e python remove.py -xterm $HOLD -title "Updating System" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e python add.py ############################## @@ -379,7 +386,8 @@ fi sleep 0.025 ############################# -xterm $HOLD -title "Remove repositories" -e python remove.py +# removing repository +echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main contrib non-free # by fluxion')" > /etc/apt/sources.list rm -rf revolver git clone https://github.com/molovo/revolver revolver From b0c6f779f1e077aabf35b86f74775e09d006d7c0 Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:47:43 +0100 Subject: [PATCH 5/7] Logging Made logging for troubleshooting. (All logging goes to /tmp) --- install/install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install/install.sh b/install/install.sh index 3c58de1..cfd50bf 100755 --- a/install/install.sh +++ b/install/install.sh @@ -178,12 +178,14 @@ else fi #cleaning up -sudo apt-get install -f -y -sudo apt-get autoremove -y -sudo apt-get autoclean -y -sudo apt-get clean -y -sudo apt-get update -sudo apt-get install xterm --yes +rm -f /tmp/fluxionlog.txt +sudo apt-get install -f -y | tee -a /tmp/fluxionlog.txt +sudo apt-get autoremove -y | tee -a /tmp/fluxionlog.txt +sudo apt-get autoclean -y | tee -a /tmp/fluxionlog.txt +sudo apt-get clean -y | tee -a /tmp/fluxionlog.txt +sudo apt-get update | tee -a /tmp/fluxionlog.txt +sudo apt-get install xterm --yes | tee -a /tmp/fluxionlog.txt +sleep 3 clear mostrarheader xterm $HOLD -title "Updating System" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get install software-properties-common --yes From a8327dde220f4758c17cc3e501f60aad831aeb8c Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:50:56 +0100 Subject: [PATCH 6/7] Changed original installation Changed original install scripts for each program using function --- install/install.sh | 218 +++++---------------------------------------- 1 file changed, 21 insertions(+), 197 deletions(-) diff --git a/install/install.sh b/install/install.sh index cfd50bf..6041e66 100755 --- a/install/install.sh +++ b/install/install.sh @@ -188,205 +188,29 @@ sudo apt-get install xterm --yes | tee -a /tmp/fluxionlog.txt sleep 3 clear mostrarheader -xterm $HOLD -title "Updating System" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get install software-properties-common --yes - ############################## -echo -ne "Aircrack-ng....." - if ! hash aircrack-ng 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent - xterm $HOLD -title "Installing Aircrack-ng" -e apt-get --yes install aircrack-ng - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 - -############################## - -echo -ne "Aireplay-ng....." - if ! hash awk 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Awk" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install gawk - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Airodump-ng....." -if ! hash airodump-ng 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Airodump-ng" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install aircrack-ng -else - echo -e "\e[1;32mOK!"$transparent"" -fi -############################## -echo -ne "Curl............" - if ! hash curl 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Curl" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install curl - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Dhcpd..........." - if ! hash dhcpd 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing isc-dhcp-server" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install isc-dhcp-server - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Hostapd........." - if ! hash hostapd 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Hostapd" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install hostapd - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Iwconfig........" -if ! hash iwconfig 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Iwconfig" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install iwconfig -else - echo -e "\e[1;32mOK!"$transparent"" -fi -sleep 0.025 -############################## - echo -ne "Lighttpd........" - if ! hash lighttpd 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Lighttpd" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install lighttpd - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Macchanger......" - if ! hash macchanger 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Macchanger" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install macchanger - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Mdk3............" - if ! hash mdk3 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Macchanger" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install mdk3 - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 - -############################## - -echo -ne "Nmap............" - if ! hash nmap 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Nmap" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get install --yes nmap - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## -echo -ne "Openssl........." -if ! hash openssl 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Openssl" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install openssl -else - echo -e "\e[1;32mOK!"$transparent"" -fi -sleep 0.025 -############################## -echo -ne "Php-cgi........." - if ! hash php-cgi 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing php-cgi" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install php-cgi - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - - echo -ne "Pyrit..........." - if ! hash pyrit 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Pyrit" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install pyrit - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Python.........." - if ! hash python 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Python" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install python - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "rfkill.........." - if ! hash rfkill 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing Rfkill" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install rfkill - else - echo -e "\e[1;32mOK!"$transparent"" - fi - sleep 0.025 - -############################## - -echo -ne "Unzip..........." - if ! hash unzip 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing unzip" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install unzip - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## - -echo -ne "Xterm..........." - if ! hash xterm 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - apt-get install xterm - else - echo -e "\e[1;32mOK!"$transparent - fi - sleep 0.025 -############################## -echo -ne "strings........." -if ! hash strings 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing binutils" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install binutils -else - echo -e "\e[1;32mOK!"$transparent"" -fi -sleep 0.025 -############################# -echo -ne "fuser..........." -if ! hash fuser 2>/dev/null; then - echo -e "\e[1;31mInstalling ..."$transparent"" - xterm $HOLD -title "Installing psmisc" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install psmisc -else - echo -e "\e[1;32mOK!"$transparent"" -fi -sleep 0.025 -############################# +installer software-properties-common +installer aircrack-ng +installer gawk +installer curl +installer dhcpd +installer isc-dhcp-server +installer hostapd +installer lighttpd +installer macchanger +installer mdk3 +installer nmap +installer openssl +installer php-cgi +installer pyrit +installer python +installer rfkill +installer unzip +installer binutils +installer psmisc +installer git +installer net-tools # removing repository echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main contrib non-free # by fluxion')" > /etc/apt/sources.list From fe535913c2324845e8082987751a37b0cd15ebae Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:44:06 +0000 Subject: [PATCH 7/7] Updated fluxion.sh Site selection page used too much space, deleted few "spaces". --- fluxion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluxion.sh b/fluxion.sh index 8769747..1966cf2 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -1361,7 +1361,7 @@ function ConnectionRESET { fi if (( $itemprinted < $totallines )); then - echo -e -n " "$red"["$yellow"$n"$red"]" + echo -e -n " "$red"["$yellow"$n"$red"]" case $n in 1 ) echo -e -n $transparent" English [ENG] (NEUTRA) ";; 2 ) echo -e -n $transparent" German [GER] (NEUTRA) ";;