If you are like me, you wake up every morning, power up your
machine and run the same commands.
Something along the lines of....
...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....
Simply copy the code and paste it into a file with the name of your choosing.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
I've named it apt.sh
Next chmod the file
And now you can execute the script.Code:chmod +x apt.sh
Then I thought this it a great script to use with a shortcut key.Code:./apt.sh
So follow along if you'd like.
Click the System menu on your panel.
Hover over Preferences and select Keyboard Shortcuts.
In the Keyboard Shortcuts window click Add
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.
click ApplyCode:gnome-terminal -x /root/shortcuts/apt.sh start
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.
Now Updating is as easy as pressing a button.
I hope this makes some lives easier!