Results 1 to 2 of 2

Thread: Automated script for updating Adobe Flash on BT4 or BT5

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2011
    Location
    Paradise
    Posts
    28

    Default Automated script for updating Adobe Flash on BT4 or BT5

    Hey guys, I had some issues with flash in BT4r2 and found this page on the backtrack wiki which worked perfectly for fixing the problem. Since it was multi-stepped I decided to write it up in a quick script for future use. Well, i kept adding and tweaking things and ended up with a relatively decent and pretty functional script that would work for anyone on BT4 and BT5 32bit or 64bit (i hope.. I actually would love it if someone with a 64bit install of BT5 would give the 64bit section a run and let me know how it goes!). Anyway, it sort of reinvents the wheel but it makes the process point and shoot and it takes all of 2 minutes from start to finish. It purges old flash files and data, asks what your architecture is, downloads the files from adobe if you wish, and does the appropriate steps to install flash for you. Then you can launch firefox to the adobe test page to confirm it all works well..

    I have tested and retested this script and it works great for 32bit machines with no known critical issues! Let me know asap if you find otherwise!

    BE ADVISED: I have not tested the 64bit installation method outlined in the backtrack wiki personally as both my backtrack machines are 32bit. The code in this script comes directly from the bt wiki linked above though. If you run into any errors please advise me asap and I will work to correct them and make this script 100% functional if it isn't already. thanks!

    I hope this helps a few people and makes someones life easier.. enjoy!

    Edit:

    Updates completely fixed and easier to use.. enjoy

    mods: please merge this with the post from this morning.. after doing some research i realized that the original script was messed up.. thanks!

    Copy and past the code into a new file named flashcleaner or whatever you like.. then execute

    Code:
    chmod +x flashcleaner
    then run it form within the directory it's located by typing

    Code:
    ./flashcleaner
    enjoy!


    Code:
    #!/bin/bash
    
    #Backtrack flash cleanup script
    #by J0hnnyB14z3
    #100% based on the backtrack how-to in the wiki found here http://www.backtrack-linux.org/wiki/index.php/Install_Flash_Player .. I take no credit for anything more than assembling the script and automating the process. Thanks to the folks who put the wiki together!
    
    ###################################################
    #Start of Functions
    prep(){
    echo "Purging old flash data..."
    echo "Note: If it says certain files are not installed or you get non critical error messages, it SHOULD be safe to ignor them.."
    echo
    apt-get purge flashplugin-nonfree flashplugin-installer gnash gnash-common mozilla-plugin-gnash swfdec-mozilla
    echo
    #remove old flash files
    echo "Deleting old files..."
    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
    echo
    }
    testflash(){
    echo "That's it! Visit http://www.adobe.com/software/flash/about/ and look for an animation that shows everything worked! If you have errors consult Adobe or Mozilla's support sections for more information."
    echo
    while [ true ]
    do 
    read -p "Would you like to launch firefox and visit the flash test page now? (y or n): " flashtest
    if [[ $flashtest == [yY] || $flashtest == "yes" ]]
    then
    firefox http://www.adobe.com/software/flash/about/
    break
    elif [[ $flashtest == [nN] || $flashtest == "no" ]]
    then
    break
    else
    echo "Error! Please enter yes or no (or y or n)"
    fi
    done
    }
    cleanup(){
    if [[ -f install_flash_player_10_linux.tar.gz ]]
    then 
    rm install_flash_player_10_linux.tar.gz
    #an extra folder left after extraction that we'll delete to clean things up.. this is NOT the same as /usr.. note the . in front of the path..
    rm -rf ./usr
    fi 
    if [[ -f flashplayer10_2_p3_64bit_linux_111710.tar.gz ]]
    then
    rm flashplayer10_2_p3_64bit_linux_111710.tar.gz
    fi
    }
    #End of Functions
    ########################################################
    echo
    echo "+++++++++++++++++++++++++++++++++++++++++++"
    echo "+ Welcome to Flashcleaner for Back|Track! +"
    echo "+++++++++++++++++++++++++++++++++++++++++++"
    
    echo
    while [ true ]
    do
    echo "1.) I have a 32bit system"
    echo "2.) I have a 64bit system"
    echo "3.) Exit"
    echo
    read -p "Please select from an option above: " bit
    if [[ $bit == [123] ]]
    then
    case $bit in
    
    1) #Installing 32 Adobe Flash Player
    prep
    echo "The latest version of Adobe Flash Player will be downloaded and installed now..."
    #downloading tarball from Adobe
    wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz
    echo
    echo "Download complete! Preparing to install..."
    echo 
    #unpacking and moving the file to the plugin dir
    tar zxvf install_flash_player_10_linux.tar.gz
    if [[ -d ~/.mozilla/plugins ]]
    then
    echo "Plugins directory already exists..."
    else
    mkdir ~/.mozilla/plugins
    fi
    mv -f libflashplayer.so ~/.mozilla/plugins/
    echo
    testflash
    cleanup
    break ;;
    
    2) #installing 64bit Adobe Flash Square
    while [ true ]
    do
    echo
    read -p "Are you SURE you have a 64 bit version of Backtrack installed? (yes or no): " doublecheck
    if [[ $doublecheck == "yes" || $doublecheck == "Yes" || $doublecheck == "YES" ]]
    then
    prep 
    echo
    echo "The latest version of Adobe Flash 'Square' will be downloaded and installed now..."
    #downloading tarball from Adobe
    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/
    echo
    echo "Adobe Flash Square for 64bit systems has been installed..."
    echo
    testflash 
    cleanup
    break 
    
    elif [[ $doublecheck == "no" || $doublecheck == "No" || $doublecheck == "NO" ]] 
    then
    echo
    echo "Better safe than sorry! Double check your system architechture and try again!"
    echo
    break
     
    else
    echo
    echo "Error!! Please type yes or no to confirm your system is 64bit..."
    echo
    fi
    done;;
    
    3) break ;;
    esac
    
    else
    echo
    echo "Error!! Invalid input! Please enter 1-3"
    echo
    fi
    done
    echo "Enjoy Flash!"
    exit 0
    Last edited by sickness; 07-07-2011 at 08:53 AM.

Similar Threads

  1. Exploit for the new Adobe Flash 0-Day should added to Metasploit
    By rafaeltorresrj in forum Tutoriais e Howtos
    Replies: 0
    Last Post: 06-08-2010, 04:36 PM
  2. how can i install adobe flash player on backtrack 4
    By crackerteam in forum OLD Newbie Area
    Replies: 4
    Last Post: 10-06-2009, 02:48 AM
  3. Flash & AIR Adobe Install Guide
    By blackwaltz in forum OLD BT4beta HowTo's
    Replies: 9
    Last Post: 05-19-2009, 10:03 AM
  4. Adobe flash player for BT 3
    By True_DyNaSTy27 in forum OLD Newbie Area
    Replies: 2
    Last Post: 07-21-2008, 02:52 AM

Tags for this Thread

Posting Permissions

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