Results 1 to 4 of 4

Thread: Update/Upgrade all the things with a shortcut key.

Hybrid View

  1. #1
    Just burned their ISO
    Join Date
    Mar 2013
    Location
    USA
    Posts
    2

    Default Update/Upgrade all the things with a shortcut key.

    If you are like me, you wake up every morning, power up your
    machine and run the same commands.
    Something along the lines of....

    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
    msfupdate
    cd /opt/metasploit/msf3/set
    ./set-update

    ...so I wrote a nice neat BASH script to do it for me.
    I just thought that it was about time to start sharing some of the simple things I found to make life easier.

    I am running BackTrack 5 r3 gnome
    Here is the script....


    Code:
    #!/bin/bash 
    #IJNNJI
    clear
    echo
    echo -e "\033[36m[*]\033[36m" "\033[32mChecking for updates....................\033[0m"
    echo
    sleep 1
    apt-get update
    sleep 2
    clear
    echo
    echo -e "\033[36m[*]\033[36m" "\033[32mUpgrading packages......................\033[0m"
    echo
    sleep 1
    apt-get upgrade
    sleep 2
    clear
    echo
    echo -e "\033[36m[*]\033[36m" "\033[32mUpgrading distro........................\033[0m"
    echo
    sleep 1
    apt-get dist-upgrade
    sleep 2
    clear
    echo
    echo -e "\033[36m[*]\033[36m" "\033[32mUpdating Metasploit....................\033[0m"
    echo
    sleep 1
    msfupdate
    sleep 2
    clear
    echo
    echo -e "\033[36m[*]\033[36m" "\033[32mUpdating The Social Engineering Toolkit\033[0m"
    echo
    cd /opt/metasploit/msf3/set
    ./set-update
    Simply copy the code and paste it into a file with the name of your choosing.
    I've named it apt.sh

    Next chmod the file

    Code:
    chmod +x apt.sh
    And now you can execute the script.

    Code:
    ./apt.sh
    Then I thought this it a great script to use with a shortcut key.
    So follow along if you'd like.

    Click the System menu on your panel.
    Hover over Preferences and select Keyboard Shortcuts.
    Screenshot.jpg

    In the Keyboard Shortcuts window click Add
    Screenshot-1.jpg

    Name the shortcut whatever you would like.

    In the Command text box enter the following command with the path and
    name that you have given your script. I am using the path /root/shortcuts/apt.sh

    The follow command will open a new terminal and start the bash script.

    Code:
    gnome-terminal -x /root/shortcuts/apt.sh start
    click Apply

    Finally it is time to pick a shortcut key to start the script.
    I use the modifier key + u or "windows key" + u

    Click on the left-hand side of the custom script you have just added, under the
    Shortcuts column. Now just press the key combo you would like to use to
    start the script. When you are done click Close.
    Screenshot-2.jpg

    Now Updating is as easy as pressing a button.
    I hope this makes some lives easier!

  2. #2
    Just burned his ISO
    Join Date
    Nov 2008
    Location
    Oak Harbor WA
    Posts
    2

    Default Re: Update/Upgrade all the things with a shortcut key.

    Awesome post man. Been a while since I have used BT and I just put it on my VM and was thinking "hmm I see no option for update..hmm I think I might have to apt it to death" you just made my day/night a lot easier lol. Quick qustion and this is probably a dumb one but I have a migraine and am tired since it's a .sh exacutable could you also put a shortcut on say the desktop for simple click update as well?

  3. #3
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Update/Upgrade all the things with a shortcut key.

    Go even further, implement apt-fast

    http://www.webupd8.org/2012/10/speed...-with-apt.html
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  4. #4
    Just burned their ISO
    Join Date
    Mar 2013
    Location
    USA
    Posts
    2

    Default Re: Update/Upgrade all the things with a shortcut key.

    Apt-fast looks pretty cool I will be checking it out today. Thanks for the link.

Similar Threads

  1. apt-get update && apt-get dist-upgrade
    By k3eper in forum Beginners Forum
    Replies: 3
    Last Post: 03-01-2011, 08:27 AM
  2. B43 not working after update & upgrade
    By rezza in forum Beginners Forum
    Replies: 0
    Last Post: 10-22-2010, 11:57 PM
  3. Need help with WIFI after update and upgrade
    By legnox in forum Beginners Forum
    Replies: 2
    Last Post: 07-21-2010, 04:54 PM
  4. Did my Update/Upgrade Work?
    By rayj00 in forum OLD BackTrack 4 Software Related Issues
    Replies: 1
    Last Post: 11-22-2009, 03:47 PM
  5. apt-get update/upgrade/kept back
    By floyd in forum OLD BackTrack 4 Software Related Issues
    Replies: 5
    Last Post: 07-07-2009, 04:11 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
  •