r00t-3xp10it

[ netool toolkit ] installer (ubuntu/kali)

Dec 4th, 2014
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 21.18 KB | None | 0 0
  1. #!/bin/sh
  2. #########################################################################
  3. #            .::[ NETOOL TOOLKIT V4.4 -> Installer ]::.                 #
  4. #                By r00t-3xp10it and rawstring enox                     #
  5. #-----------------------------------------------------------------------#
  6. #                                                                       #
  7. #                            * WARNING *                                #
  8. #   this 'installer' as build to work on linux Ubuntu or Kali distros   #
  9. #   if you wish to install the toolkit in another (linux) distro,       #
  10. #   download 'opensouce[kali].tar.gz' and follow the instructions       #
  11. #   on my 'WIKI' webpage hosted on sourceforge here:                    #
  12. #  http://sourceforge.net/p/netoolsh/wiki/netool.sh%20script%20project/ #
  13. #-----------------------------------------------------------------------#
  14. #   Special Thanks to rawstring_enox for the support provided in the    #
  15. #   develop of this 'installer' and for the debug that cames later :/   #
  16. #########################################################################
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. # ----------------------------------------
  24. # Variable declarations
  25. ####################################################################################
  26. ver=V4.4                               # netool.sh version                         #
  27. IdU=`id -u`                            # check user ID (0=root 1000=gest)          #
  28. H0m3=`echo ~`                          # local user Home path                      #          
  29. OS=`awk '{print $1}' /etc/issue`       # grab Operative System distro              #
  30. spath=`pwd`                            # toolkit current installed directory       #
  31. rpath="$H0m3/opensource"               # toolkit correct directory (default)       #
  32. CuRl=`which curl`                      # curl install path                         #
  33. Z3n=`which zenity`                     # zenity install path                       #
  34. usera=`who | cut -d' ' -f1 | sort | uniq` # grab account username                  #
  35. # ---------------------------------------------------------------------------------#
  36. D1sTr0=`cat netool.sh | egrep -m 1 "D1str0" | cut -d ':' -f2`                      #
  37. PhP=`cat toolkit_config | egrep -m 1 "PHP5_INSTALL_PATH" | cut -d ':' -f2`         #
  38. find=`cat toolkit_config | egrep -m 1 "ZENMAP_INSTALL_PATH" | cut -d ':' -f2`      #
  39. find2=`cat toolkit_config | egrep -m 1 "ETTERCAP_INSTALL_PATH" | cut -d ':' -f2`   #
  40. find3=`cat toolkit_config | egrep -m 1 "MACCHANGER_INSTALL_PATH" | cut -d ':' -f2` #
  41. find4=`cat toolkit_config | egrep -m 1 "METASPLOIT_INSTALL_PATH" | cut -d ':' -f2` #
  42. apache=`cat toolkit_config | egrep -m 1 "APACHE_INSTALL_PATH" | cut -d ':' -f2`    #
  43. confW=`cat toolkit_config | egrep -m 1 "DRIFTNET_INSTALL_PATH" | cut -d ':' -f2`   #
  44. ####################################################################################
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. # ----------------------------------------
  52. # Colorise shell Script output leters
  53. # ----------------------------------------
  54. Colors() {
  55. Escape="\033";
  56. white="${Escape}[0m";
  57. RedF="${Escape}[31m";
  58. GreenF="${Escape}[32m";
  59. YellowF="${Escape}[33m";
  60. BlueF="${Escape}[34m";
  61. CyanF="${Escape}[36m";
  62. Reset="${Escape}[0m";
  63. }
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. # ----------------------------------------
  71. # start script functions
  72. # ----------------------------------------
  73. Colors;
  74.  
  75.        dtr=`date`
  76.        # build logfile to store install bugs (dtr.log)
  77.        echo "" > /tmp/dtr.log && echo "_::NETOOL::T00LKIT::=>::$ver::INSTALLER::BUG::REPORT::" >> /tmp/dtr.log
  78.        echo "_::OS::=>::$OS::HOME::=>::$H0m3::PWD::=>::$spath::" >> /tmp/dtr.log
  79.        echo "_::T00LKIT::DISTRO=>::$D1sTr0::USERNAME::=>::$usera::ID::=>::$IdU::" >> /tmp/dtr.log
  80.        echo "_::" >> /tmp/dtr.log
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. # ----------------------------
  88. # installer banner display
  89. # ----------------------------
  90. cat << !
  91.  
  92.          ┌┐┌┌─┐┌┬┐  ┌┬┐┌─┐┌─┐┬  ┌─┐
  93.          │││├┤  │    │ │ ││ ││  └─┐
  94.          ┘└┘└─┘ ┴    ┴ └─┘└─┘┴─┘└─┘$ver
  95.  +---------------------------------------------+
  96.  | Installer by: r00t-3xp10it & rawstring_enox |
  97.  +---------------------------------------------+
  98.  |   Script to quickly 'install' the toolkit   |
  99.  |   in is rigth path, set permitions to all   |
  100.  |   files, install dependencies, and start    |
  101.  |   toolkit as root user (ubuntu distros)     |
  102.  +---------------------------------------------+
  103.  
  104. !
  105. Colors;
  106. echo ${RedF}_${Reset};
  107. echo ${RedF}::${BlueF}[press ENTER TO INSTALL TOOLKIT]${RedF}::${Reset};
  108. read op
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  # ----------------------------
  116.  # check if compatible OS distro (node name)
  117.  # ----------------------------
  118.  if [ "$OS" "=" "Kali" ] || [ "$OS" "=" "Ubuntu" ]; then
  119.    echo ${BlueF}[*]${RedF}::${BlueF}[Verify OS Compatibility]${RedF}::${GreenF}[ OK ]${Reset};
  120.  
  121.  else
  122.  
  123.    # fail comparing toolkit version to current installed Operative System
  124.    echo ${RedF}[x]::[Verify OS Compatibility]::[ FAIL ]${Reset};
  125.    sleep 2
  126. cat << !
  127.  
  128.   OPERATIVE SYSTEM  : $OS
  129.   INSTALLER SET TO  : UBUNTU OR KALI
  130.  +-----------------------------------------------------+
  131.  | This installer only works in Ubuntu or Kali distros |
  132.  +-----------------------------------------------------+
  133.  |    IF YOU WISH TO INSTALL THE T00LKIT IN ANOTHER    |
  134.  |    DISTRO, DOWNLOAD 'opensource[kali].tar.gz' AND   |
  135.  |    FOLLOW THE INSTRUCTIONS ON MY 'WIKI' WEBPAGE     |
  136.  +-----------------------------------------------------+
  137.  
  138. !
  139.      dtr=`date`
  140.      echo ${BlueF}[*]${RedF}::${BlueF}[WIKI]${RedF}::${white}http://sourceforge.net/p/netoolsh/wiki/netool.sh%20script%20project/ ${Reset};
  141.      echo ${RedF}[x]::[Exit Installer]::${YellowF}[ PLEASE CHECK YOUR LOGFILE '->' $spath/logs/dtr.log ]${Reset};
  142.      echo "_::$dtr::=>::COMPARING::OPERATIVE-SYSTEM::$OS::NOT-SUPPORTED::" >> /tmp/dtr.log
  143.      echo "_::" >> /tmp/dtr.log && echo "_::EOF" >> /tmp/dtr.log
  144.      mv /tmp/dtr.log $spath/logs/dtr.log > /dev/null 2>&1
  145.    exit
  146.  fi
  147. sleep 2
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.    # ----------------------------
  155.    # check if toolkit release matches OS node name
  156.    # ----------------------------
  157.    if [ "$OS" "=" "$D1sTr0" ]; then
  158.      echo ${BlueF}[*]${RedF}::${BlueF}[Check Toolkit Release]${RedF}::${GreenF}[ OK ] ${Reset};
  159.  
  160.    else
  161.  
  162.      # fail comparing toolkit release with current installed Operative System
  163.      echo ${RedF}[x]::[Check Toolkit Release]::[ FAIL ]${Reset};
  164.     sleep 2
  165. cat << !
  166.  
  167.   T00LKIT RELEASE  : $D1sTr0
  168.   OPERATIVE SYSTEM : $OS
  169.  +-------------------------------------------------+
  170.  | Our operative system does not match the toolkit |
  171.  | release, Please download the correct version.   |
  172.  +-------------------------------------------------+
  173.  |  opensource.tar.gz       => linux - Ubuntu      |
  174.  |  opensource[kali].tar.gz => most linux distros  |
  175.  +-------------------------------------------------+
  176.  
  177. !
  178.      dtr=`date`
  179.      # exit installer and write logfile in opensource/logs
  180.      echo "_::$dtr::=>::T00LKIT-RELEASE::=>::$D1sTr0::OS::=>::$OS::NOT-SUPPORTED::" >> /tmp/dtr.log
  181.      echo ${RedF}[x]::[Exit Installer]::${YellowF}[ PLEASE CHECK YOUR LOGFILE '->' $spath/logs/dtr.log ]${Reset};
  182.      echo "_::" >> /tmp/dtr.log && echo "_::EOF" >> /tmp/dtr.log
  183.      mv /tmp/dtr.log $spath/logs/dtr.log > /dev/null 2>&1
  184.      exit
  185.    fi
  186. sleep 2
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.    # ----------------------------
  194.    # check if script its in correct directory (path)
  195.    # ----------------------------
  196.    if [ "$rpath" "=" "$spath" ]; then
  197.      echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit Install Path]${RedF}::${GreenF}[ OK ] ${Reset};
  198.      default=yes
  199.  
  200.    else
  201.  
  202.      dtr=`date`
  203.      M1ss=yes
  204.      # move toolkit to the rigth path depending of user input
  205.      echo ${RedF}[x]::[Toolkit Install Path]::[ FAIL ] ${Reset};
  206.      sleep 2
  207. cat << !
  208.  
  209.   T00LKIT INSTALL PATH : $spath
  210.   T00LKIT DEFAULT PATH : $H0m3/opensource
  211.  +-------------------------------------------------+
  212.  |      THIS MAY CAUSE A SCRIPT MALFUNCTION        |
  213.  +-------------------------------------------------+
  214.  |   Move toolkit directory to the right path?     |
  215.  +-------------------------------------------------+
  216.  
  217. !
  218.  
  219.  
  220.      echo "_::$dtr::=>::INSTALL-PATH::WRONG::DIRECTORY::=>::$spath::" >> /tmp/dtr.log
  221.      read -p "[?]::[Move toolkit directory to the right path (y|n)]::" pass
  222.      if test "$pass" = "y"
  223.         then
  224.  
  225.           # FINALLY WE ARE IN THE RIGTH DIRECTION :D CONGRATZ FOR HAVING INSTALLED THIS SHIT IN THE RIGTH PATH :P
  226.           echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit 'install' path]${RedF}::${GreenF}[ MOVING TO '->' "$rpath" ] ${Reset};
  227.           dtr=`date` # log file just for me to know whats happening during the install
  228.           sleep 2 && echo "_::$dtr::=>::T00LKIT::MOVED::TO::=>::$rpath::" >> /tmp/dtr.log
  229.           cp -r "$spath" "$rpath" > /dev/null 2>&1 # copy toolkit to default path
  230.           rm -r "$spath" > /dev/null 2>&1 # remove old path
  231.           default=yes # set a variable for me to know that we are in the rigth track
  232.           cd $rpath # change to default directory
  233.  
  234.      else
  235.  
  236.           dtr=`date`
  237.           M1ss=yes
  238.           echo ""
  239.           # abort moving toolkit path to rigth location (path)
  240.           echo ${RedF}[x]::[Toolkit 'install' path]::[ ABORTED ] ${Reset};
  241.           echo ${RedF}[x]::[warning]::${white}TOOLKIT::MAY::DISPLAY::BUGS::WORKING::IN::ANOTHER::PATH ${Reset};
  242.           echo "_::$dtr::=>::INSTALL-PATH::MOVE::ABORTED::DEFINED::BY::USER::SETTINGS" >> /tmp/dtr.log
  243.           echo ""
  244.  
  245.        fi
  246.    fi
  247. sleep 2
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.    # ----------------------------
  255.    # execute privs on all files
  256.    # ----------------------------
  257.    chmod +x *.sh && cd INURLBR && chmod +x *.php && cd ..
  258.    cd modules && chmod +x *.sh *.py *.rb && cd ..
  259.    cd sslstrip-0.9 && chmod +x *.py && cd ..
  260.    echo ${BlueF}[*]${RedF}::${BlueF}[Setting 'File' Permitions]${RedF}::${GreenF}[ OK ]${Reset};
  261.    sleep 2
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.    # ----------------------------
  269.    # config frameworks install path's (toolkit_config)
  270.    # ----------------------------
  271.    read -p "[?]::[Config Dependencies Path's (y|n)]::" pass
  272.      if test "$pass" = "y"
  273.        then
  274.          xterm -T "toolkit_config" -geometry 75x38 -e "nano toolkit_config"
  275.          # -----------------------------------------------------------------------
  276.          # variable declarations (again to capture nano changes made)
  277.          # ------------------------------------------------------------------------
  278.          PhP=`cat toolkit_config | egrep -m 1 "PHP5_INSTALL_PATH" | cut -d ':' -f2`
  279.          find=`cat toolkit_config | egrep -m 1 "ZENMAP_INSTALL_PATH" | cut -d ':' -f2`
  280.          find2=`cat toolkit_config | egrep -m 1 "ETTERCAP_INSTALL_PATH" | cut -d ':' -f2`
  281.          find3=`cat toolkit_config | egrep -m 1 "MACCHANGER_INSTALL_PATH" | cut -d ':' -f2`
  282.          find4=`cat toolkit_config | egrep -m 1 "METASPLOIT_INSTALL_PATH" | cut -d ':' -f2`
  283.          apache=`cat toolkit_config | egrep -m 1 "APACHE_INSTALL_PATH" | cut -d ':' -f2`
  284.          confW=`cat toolkit_config | egrep -m 1 "DRIFTNET_INSTALL_PATH" | cut -d ':' -f2`
  285.          echo ${BlueF}[*]${RedF}::${BlueF}[Config dependencies path]${RedF}::${GreenF}[ OK ]${Reset};
  286.  
  287.      else
  288.  
  289.          dtr=`date`
  290.          # aborted toolkit_config file set to ubuntu paths
  291.          echo ${RedF}[x]::[Config Dependencies Path]::[ ABORTED ]${Reset};
  292.          echo "_::$dtr::=>::T00LKIT_CONFIG-PATHS::ABORTED::DEFINED::BY::USER::SETTINGS" >> /tmp/dtr.log
  293.  
  294.  fi
  295. sleep 2
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. # ----------------------------------------
  303. # INSTALL ALL DEPENDENCIES
  304. # ----------------------------------------
  305. echo ${BlueF}[*]${RedF}::${BlueF}['Install' Dependencies]${RedF}::${GreenF}[ RUNING ]${Reset};
  306. sleep 2
  307.  
  308.  
  309.  
  310.  
  311.    # check if macchanger installation exists
  312.    if [ -e $find3 ]; then
  313.    echo ${BlueF}[*]${RedF}::${BlueF}[Macchanger]${RedF}::${GreenF}[ Installation found ]${Reset};
  314.  
  315. else
  316.  
  317.    echo ""
  318.    dtr=`date`
  319.    M1ss=yes
  320.    # missing dependencie OR wrong path config
  321.    echo ${RedF}[x]::[warning]::[Macchanger]::${YellowF}[ Not Found In '->' $find3 ]${Reset};
  322.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Macchanger ]${white}::INSTALLED::TO::WORK.${Reset};
  323.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  324.    echo "_::$dtr::=>::Macchanger::bug::not::found::in::=>::$find3::" >> /tmp/dtr.log
  325.  
  326.      sleep 2
  327.      # missing dependencie - install
  328.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  329.      echo ""
  330.      sudo apt-get install macchanger macchanger-gtk
  331.      echo ""
  332. fi
  333. sleep 2
  334.  
  335.  
  336.    #check if metasploit exists
  337.    if [ -d $find4 ]; then
  338.    echo ${BlueF}[*]${RedF}::${BlueF}[Metasploit]${RedF}::${GreenF}[ Installation found ]${Reset};
  339.  
  340. else
  341.  
  342.    echo ""
  343.    dtr=`date`
  344.    M1ss=yes
  345.    # missing dependencie - redirect to darkoperator webpage
  346.    echo ${RedF}[x]::[warning]::[Metasploit]::${YellowF}[ Not Found In '->' $find4 ]${Reset};
  347.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Metasploit ]${white}::INSTALLED::TO::WORK...${Reset};
  348.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  349.    echo ${RedF}[x]::${YellowF}'more info' here: http://www.darkoperator.com/installing-metasploit-in-ubunt/ ${Reset};
  350.    echo "_::$dtr::=>::Metasploit::bug::not::found::in::=>::$find4::" >> /tmp/dtr.log
  351.    echo ""
  352.  
  353. fi
  354. sleep 2
  355.  
  356.  
  357.    # check if driftnet installation existes
  358.    if [ -d $confW ]; then
  359.    echo ${BlueF}[*]${RedF}::${BlueF}[Driftnet]${RedF}::${GreenF}[ Installation found ]${Reset};
  360.  
  361. else
  362.  
  363.    echo ""
  364.    dtr=`date`
  365.    M1ss=yes
  366.    # missing dependencie OR wrong path config
  367.    echo ${RedF}[x]::[warning]::[Driftnet]::${YellowF}[ Not Found In '->' $confW ]${Reset};
  368.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Driftnet ]${white}::INSTALLED::TO::WORK. ${Reset};
  369.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  370.    echo "_::$dtr::=>::Driftnet::bug::not::found::in::=>::$confW::" >> /tmp/dtr.log
  371.  
  372.      sleep 2
  373.      # missing dependencie - install
  374.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  375.      echo ""
  376.      sudo apt-get install driftnet
  377.      echo ""
  378. fi
  379. sleep 2
  380.  
  381.  
  382.    # check if ettercap installation exists
  383.    if [ -d $find2 ]; then
  384.    echo ${BlueF}[*]${RedF}::${BlueF}[Ettercap]${RedF}::${GreenF}[ Installation found ]${Reset};
  385.  
  386. else
  387.  
  388.    echo ""
  389.    dtr=`date`
  390.    M1ss=yes
  391.    # missing dependencie OR wrong path config
  392.    echo ${RedF}[x]::[warning]::[Ettercap]::${YellowF}[ Not Found In '->' $find2 ]${Reset};
  393.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Ettercap ]${white}::INSTALLED::TO::WORK. ${Reset};
  394.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  395.    echo "_::$dtr::=>::Ettercap::bug::not::found::in::=>::$find2::" >> /tmp/dtr.log
  396.  
  397.      sleep 2
  398.      # missing dependencie - install
  399.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  400.      echo ""
  401.      sudo apt-get install apache2
  402.      echo ""
  403. fi
  404. sleep 2
  405.  
  406.  
  407.    #check if apache exists
  408.    if [ -d $apache ]; then
  409.    echo ${BlueF}[*]${RedF}::${BlueF}[Apache]${RedF}::${GreenF}[ Installation found ]${Reset};
  410.  
  411. else
  412.  
  413.    echo ""
  414.    dtr=`date`
  415.    M1ss=yes
  416.    # missing dependencie OR wrong path config
  417.    echo ${RedF}[x]::[warning]::[Apache2]::${YellowF}[ Not Found In '->' $apache ]${Reset};
  418.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Apache2 ]${white}::INSTALLED::TO::WORK. ${Reset};
  419.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  420.    echo "_::$dtr::=>::Apache2::bug::not::found::in::=>::$apache::" >> /tmp/dtr.log
  421.  
  422.      sleep 2
  423.      # missing dependencie - install
  424.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  425.      echo ""
  426.      sudo apt-get install apache2
  427.      echo ""
  428. fi
  429. sleep 2
  430.  
  431.  
  432.    #check if zenity exists
  433.    if [ -e $Z3n ]; then
  434.    echo ${BlueF}[*]${RedF}::${BlueF}[Zenity]${RedF}::${GreenF}[ Installation found ]${Reset};
  435.  
  436. else
  437.  
  438.    echo ""
  439.    dtr=`date`
  440.    M1ss=yes
  441.    # missing dependencie - install
  442.    echo ${RedF}[x]::[warning]::[Zenity]::${YellowF}[ Not Found In '->' $Z3n ]${Reset};
  443.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Zenity ]${white}::INSTALLED::TO::WORK. ${Reset};
  444.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SEE::IF::PROPER::INSTALLED ${Reset};
  445.    echo "_::$dtr::=>::zenity::bug::dependencie::not::found::in::=>$Z3n::" >> /tmp/dtr.log
  446.  
  447.      sleep 2
  448.      # missing dependencie - install
  449.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  450.      echo ""
  451.      sudo apt-get install zenity
  452.      echo ""
  453. fi
  454. sleep 2
  455.  
  456.  
  457.    # check if nmap installation exists
  458.    if [ -d $find ]; then
  459.    echo ${BlueF}[*]${RedF}::${BlueF}[Nmap]${RedF}::${GreenF}[ Installation found ]${Reset};
  460.  
  461. else
  462.  
  463.    echo ""
  464.    dtr=`date`
  465.    M1ss=yes
  466.    # missing dependencie OR wrong path config
  467.    echo ${RedF}[x]::[warning]::[Nmap]::${YellowF}[ Not Found In '->' $find ]${Reset};
  468.    echo ${RedF}[x]::[warning]::${white}THIS::TOOLKIT::REQUIRE::${RedF}[ Nmap ]${white}::INSTALLED::TO::WORK. ${Reset};
  469.    echo ${RedF}[x]::[warning]::${white}REMMENBER::TO::CHECK::${RedF}[ toolkit_config ]${white}::TO::SET::FRAMEWORK::PATH ${Reset};
  470.    echo "_::$dtr::=>::Nmap::bug::not::found::in::=>::$find::" >> /tmp/dtr.log
  471.  
  472.      sleep 2
  473.      # missing dependencie - install
  474.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  475.      echo ""
  476.      sudo apt-get install nmap zenmap
  477.      echo ""
  478. fi
  479. sleep 2
  480.  
  481.  
  482.    # check for INURLBR dependencies (php5 and curl)
  483.    if [ -e $CuRl ]; then
  484.    echo ${BlueF}[*]${RedF}::${BlueF}[Curl]${RedF}::${GreenF}[ Installation found ]${Reset};
  485.    sleep 2
  486.    if [ -e $PhP ]; then
  487.    echo ${BlueF}[*]${RedF}::${BlueF}[php5]${RedF}::${GreenF}[ Installation found ]${Reset};
  488.  
  489. else
  490.  
  491.    echo ""
  492.    dtr=`date`
  493.    M1ss=yes
  494.    # not found dependencies = install
  495.    echo ${RedF}[x]::[INURLBR dependencies]::[ FAIL ]${Reset};
  496.    echo "_::$dtr::=>::inurlbr::bug::dependencies::not::found::" >> /tmp/dtr.log
  497.  
  498.      sleep 2
  499.      # missing dependencie - install
  500.      echo ${BlueF}[*]${RedF}::${BlueF}[Please wait]${RedF}::${white}DOWNLOADING::FROM::NETWORK... ${Reset};
  501.      echo ${BlueF}[*]${RedF}::${BlueF}[Installing]${RedF}::${YellowF}curl'::'libcurl3'::'libcurl3-dev'::'php5'::'php5-curl'::'php5-cli'::' ${Reset};
  502.      echo ""
  503.      sudo apt-get install curl libcurl3 libcurl3-dev php5 php5-cli php5-curl
  504.      /etc/init.d/apache2 restart > /dev/null 2>&1
  505.      echo ""
  506.   fi
  507. fi
  508. sleep 2
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  # ----------------------------------------------------
  516.  # display dependencies current state and build logfile
  517.  # ----------------------------------------------------
  518.    echo "_::" >> /tmp/dtr.log
  519.    echo "_::EOF" >> /tmp/dtr.log
  520.    if [ "$M1ss" "=" "yes" ]; then
  521.      # warn user that dependencies are partially installed
  522.      echo ${BlueF}[*]${RedF}::${BlueF}[FINISHING INSTALLER]${RedF}::[ WITH SOME ERRORS ]${Reset};
  523.      echo ${BlueF}[*]${RedF}::${YellowF}[ PLEASE CHECK YOUR LOGFILE '->' $H0m3/dtr.log ]${Reset};
  524.      sleep 2
  525.      mv /tmp/dtr.log $H0m3/dtr.log > /dev/null 2>&1
  526.  
  527. else
  528.  
  529.   # everything ok :D
  530.   echo ${BlueF}[*]${RedF}::${BlueF}[FINISHING INSTALLER]${RedF}::${GreenF}[ OK. ]${Reset};
  531.   rm /tmp/dtr.log > /dev/null 2>&1
  532. fi
  533. sleep 2
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540. # ----------------------------------------
  541. # END INSTALL DEPENDENCIES
  542. # ----------------------------------------
  543.  
  544.  
  545.  
  546.  
  547.    # display toolkit current install path clean old files and run the tool
  548.    if [ "$default" "=" "yes" ]; then
  549.      echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit 'Install' Path]${RedF}::${GreenF}[ $rpath/netool.sh ] ${Reset};
  550.      sleep 2
  551.      cp $H0m3/dtr.log $rpath/logs/dtr.log > /dev/null 2>&1
  552.      echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit Installed]${RedF}::${GreenF}[ OK ]${Reset};
  553.      sleep 2
  554.      echo ${BlueF}[*]${RedF}::${BlueF}[Clean Everything Up]${RedF}::${GreenF}[ OK ]${Reset};
  555.      sleep 2
  556.      echo ${RedF}_${Reset};
  557.      echo ${RedF}::${BlueF}[press ENTER TO START T00LKIT]${RedF}::${Reset};
  558.      read op && clear
  559.      sudo $rpath/netool.sh
  560.  
  561.    else
  562.  
  563.      # display toolkit current install path clean old files and run the tool
  564.      echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit 'Install' Path]${RedF}::[${GreenF} $spath/netool.sh ${RedF}] ${Reset};
  565.      sleep 2
  566.      cp $H0m3/dtr.log $spath/logs/dtr.log > /dev/null 2>&1
  567.      echo ${BlueF}[*]${RedF}::${BlueF}[Toolkit Installed]${RedF}::${GreenF}[ OK ]${Reset};
  568.      sleep 2
  569.      echo ${BlueF}[*]${RedF}::${BlueF}[Clean Everything Up]${RedF}::${GreenF}[ OK ]${Reset};
  570.      sleep 2
  571.      echo ${RedF}_${Reset};
  572.      echo ${RedF}::${BlueF}[press ENTER TO START T00LKIT]${RedF}::${Reset};
  573.      read op && clear
  574.      sudo $spath/netool.sh
  575.  
  576. fi
  577.  
  578.  
  579. # EOF
Advertisement
Add Comment
Please, Sign In to add comment