Results 1 to 1 of 1

Thread: After-Install Script for BT5 KDE-64bit

Threaded View

  1. #1
    Just burned his ISO Bindi's Avatar
    Join Date
    Aug 2010
    Posts
    10

    Default After-Install Script for BT5 KDE-64bit

    Wrote a script that mostly automates some of the fixes and other stuff you do after a fresh install. This script is written with the KDE 64-Bit in mind, but can easily adapted (I think)

    Stuff it does:

    1 Install NVIDA drivers (need some input from the user)
    2 Install Fasttrack (also need some input from the user
    --From here on all is done without the need for input-----
    3 Adding additional reposetories
    4 Update and Upgrade
    5 Installing additional software
    6 Preparing Kernel Sources
    7 Installing Flashplugin and Player
    8 Quick Fix armitage
    9 Quick Fix SET
    10 Cleaning up (No not your basement)

    Code:
    #!/bin/bash
    
    # Check for admin rights. If user is not an admin user, exit the script
    if [ $UID != 0 ]
    then
       echo "No Root = No Action"
       echo "Be Root Fast"
       exit
    else
       echo "Ok running as root"
    fi
    
    if [ "$(pidof -x startx )" ]
    then
       echo "Close session and run script again"
       exit
    else
      echo "Ok We'r good to go"
    fi
    
    # Install NVIDIA drivers
    echo "Enter the Matrix"
    cd ~/.kde/ rm -r cache-root/icon-cache.kcache cache-root/plasma_theme_Volatile.kcache
    cd ~/.kde/ rm -r cache-bticon-cache.kcache cache-bt/plasma_theme_Volatile.kcache
    cd /tmp/
    wget http://developer.download.nvidia.com/compute/cuda/4_0/drivers/devdriver_4.0_linux_64_270.41.19.run
    wget http://developer.download.nvidia.com//compute/cuda/4_0/toolkit/cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
    chmod 777 devdriver_4.0_linux_64_270.41.19.run
    chmod 777 cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
    apt-get --force-yes install libssl-dev linux-headers-2.6.38
    ./devdriver_4.0_linux_64_270.41.19.run --kernel-source-path /usr/src/linux-headers-2.6.38
    echo "Now CUDA"
    sleep 1
    ./cudatoolkit_4.0.17_linux_64_ubuntu10.10.run
    python-switcher --python27
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit
    cd pyrit/cpyrit_cuda/ && ./setup.py build && ./setup.py install
    python-switcher --python26
    cd ~/.kde/ rm -r cache-root/icon-cache.kcache cache-root/plasma_theme_Volatile.kcache
    cd ~/.kde/ rm -r cache-bticon-cache.kcache cache-bt/plasma_theme_Volatile.kcache
    echo "CUDA is ready"
    sleep 2
    
    # Fast-track install on 64-bit
    echo "Install Fast-track"
    cd /pentest/exploits/
    svn co http://svn.secmaniac.com/fasttrack fasttrack/
    cd fasttrack
    ./setup.py install
    echo "Fast-track is ready"
    sleep 2
    
    # Add system sources
    echo "Adding extra reposetories"
    echo deb http://archive.ubuntu.com/ubuntu lucid universe >> /etc/apt/sources.list
    echo deb-src http://archive.ubuntu.com/ubuntu lucid universe >> /etc/apt/sources.list
    echo deb http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ lucid main >> /etc/apt/sources.list
    echo deb-src http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ lucid main >> /etc/apt/sources.list
    echo deb http://ppa.launchpad.net/villemvainio/ppa/ubuntu natty main >> /etc/apt/sources.list
    echo deb-src http://ppa.launchpad.net/villemvainio/ppa/ubuntu natty main >> /etc/apt/sources.list
    echo "Sources Added"
    #sleep 2
    
    # Update the system sources and software
    echo "Update and Upgrade"
    apt-get update
    apt-get --force-yes --allow-unauthenticated dist-upgrade
    echo "Update and Upgrade are done"
    sleep 2
    
    # Install some desired software
    # Any number of apps can be listed for install here, but
    # they must be seperated by a space and the whole thing
    # needs to be one single line
    echo "Adding software"
    apt-get --force-yes --allow-unauthenticated install grub-customizer leo libssl-dev linux-headers-2.6.38 rungetty python-dev kate kcalc cadaver pure-ftpd openoffice.org ksnapshot okular synaptic amarok amarok-common gstreamer0.10-ffmpeg gstreamer0.10-packagekit gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-x libgstreamer-plugins-base0.10-0 karbon krita keepassx ark
    echo "Added software"
    sleep 2
    
    # Prepare-kernel-sources
    echo "Preparing Kernel Sources"
    prepare-kernel-sources --force-yes
    cd /usr/src/linux && cp -rf include/generated/* include/linux/
    echo "Kernel Sources prepared"
    sleep 2
    
    # Flash player install
    echo "Installing Flashplugin and Player"
    apt-get purge flashplugin-nonfree flashplugin-installer gnash gnash-common mozilla-plugin-gnash swfdec-mozilla
    rm -f /usr/lib/firefox/plugins/libflashplayer.so && rm -f /usr/lib/mozilla/plugins/libflashplayer.so && rm -f /usr/lib/mozilla/plugins/flashplugin-alternative.so && rm -f /usr/lib/mozilla/plugins/npwrapper*flash*so && rm -f ~/.mozilla/plugins/*flash*so
    cd /tmp
    wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz
    tar xvfz flashplayer10_2_p3_64bit_linux_111710.tar.gz
    chown root:root libflashplayer.so
    chmod 0644 libflashplayer.so
    cp -f libflashplayer.so /usr/lib/mozilla/plugins/
    rm -rf libflashplayer.so
    ln -s /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox/plugins/
    wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
    tar xvfz install_flash_player_10_linux.tar.gz
    mkdir ~/.mozilla/plugins
    mv -f libflashplayer.so ~/.mozilla/plugins/
    echo "Flash player is ready"
    sleep 2
    
    # Quick fix for scan modules not working in Armitage
    echo "Quick Fix armitage"
    cd /pentest/exploits/framework3/external/pcaprub/
    ruby extconf.rb && make
    make install
    echo "Quick fix Armitage done"
    sleep 2
    
    # Quick fix for SET Configuration Bug
    echo "Quick fix SET"
    cd /pentest/exploits/set
    svn up
    echo "Quick fix SET done"
    sleep 2
    
    # Final clean up
    echo "Final Clean-up"
    fix-splash
    cd ~/.kde/ rm -r cache-root/icon-cache.kcache cache-root/plasma_theme_Volatile.kcache
    cd ~/.kde/ rm -r cache-bticon-cache.kcache cache-bt/plasma_theme_Volatile.kcache
    apt-get -y autoclean
    echo "All is cleaned"
    echo
    echo "Now it's Playtime!!!!!"
    sleep 2
    
    exit
    The script has not undergone extensive testing so if you'r not running it after a clean install back-up the stuff you love.
    Last edited by Bindi; 06-19-2011 at 05:10 PM. Reason: Fixed a few errors, still ain't doing everything fully automated, some parts need some input.

Similar Threads

  1. Unicornscan (with PostgreSQL and web front end) Install Script
    By dash1b in forum BackTrack 5 Experts Section
    Replies: 1
    Last Post: 05-20-2011, 01:51 AM
  2. Replies: 1
    Last Post: 05-11-2011, 05:03 AM
  3. Can't install bt r1 on my 64bit system any ideas?
    By niel66 in forum Beginners Forum
    Replies: 1
    Last Post: 11-04-2010, 08:34 PM
  4. install.sh script in BackTrak4
    By svittal in forum OLD BackTrack 4 General Support
    Replies: 1
    Last Post: 02-14-2010, 04:36 AM
  5. Semi Auto Dual install script
    By Baxter in forum OLD Specialist Topics
    Replies: 3
    Last Post: 06-05-2007, 04:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •