SVN Updates, IP checking, and better Metasploit searching.
Just some personal junk i have laying around, but i figured with the new BT being out, new forums and schmoo almost here i might as well contribute a little something to the community that has given me so much.
No error checking in any of these because after all i wrote them for myself ;)
Protip: Just copy and paste to your shell it will echo it in for you.
Protip2: You MUST do the msf update and accept the cert beforehand!
########## UPDATES ##########
Code:
mkdir /var/log/updates
echo '#!/bin/sh
SLEEPY=$(sleep 2)
DATE=$(date)
/usr/bin/svn update /pentest/exploits/framework3 >> /var/log/updates/msfupdate 2>&1
echo $DATE >> /var/log/updates/msfupdate 2>&1
$SLEEPY
/pentest/exploits/framework3/msfcli > /pentest/exploits/framework3/list 2>&1
$SLEEPY
/usr/bin/svn update /pentest/exploits/exploitdb >> /var/log/updates/exploitdb 2>&1
echo $DATE >> /var/log/updates/exploitdb 2>&1
$SLEEPY
/usr/bin/svn update /pentest/scanners/nikto >> /var/log/updates/nikto 2>&1
echo $DATE >> /var/log/updates/nikto 2>&1
$SLEEPY
/usr/bin/svn update /pentest/exploits/SET >> /var/log/updates/SET 2>&1
echo $DATE >> /var/log/updates/SET 2>&1
$SLEEPY
/usr/bin/svn update /pentest/exploits/fasttrack >> /var/log/updates/fasttrack 2>&1
echo $DATE >> /var/log/updates/fasttrack 2>&1
$SLEEPY
/usr/bin/svn update /pentest/web/w3af >> /var/log/updates/w3af 2>&1
echo $DATE >> /var/log/updates/w3af 2>&1
$SLEEPY
/usr/bin/svn update /pentest/web/ProxyStrike >> /var/log/updates/proxystrike 2>&1
evho $DATE >> /var/log/updates/proxystrike 2>&1
$SLEEPY
/usr/bin/svn update /pentest/web/waffit >> /var/log/updates/waffit 2>&1
echo $DATE >> /var/log/updates/waffit 2>&1
$SLEEPY
/usr/local/sbin/openvas-nvt-sync >> /var/log/updates/openvas 2>&1
echo $DATE >> /var/log/updates/openvas 2>&1' > /usr/bin/update-bt
chmod 755 /usr/bin/update-bt
Just do update-bt in your shell whenever you feel the urge to pwn .. if you want to see what was updated check the /var/log/updates folder obviously!
Protip3: You dont want to be bothered with running this thing every few days just load it as a cronjob "btw thanks swc"
########## CLOCK ##########
Code:
echo '#!/bin/sh' > /usr/bin/update-time
echo "ntpdate navobs1.gatech.edu" >> /usr/bin/update-time
chmod 755 /usr/bin/update-time
########## IP-CHECK ##########
Code:
echo '#!/bin/sh' > /usr/bin/my-ip
echo 'wget www.whatismyip.org -O /tmp/ip > /dev/null 2>&1' >> /usr/bin/my-ip
echo 'cat /tmp/ip && echo " "' >> /usr/bin/my-ip
echo 'rm /tmp/ip > /dev/null 2>&1' >> /usr/bin/my-ip
chmod 755 /usr/bin/my-ip
########## MSFSEARCH ##########
Code:
echo '#!/bin/sh' > /usr/bin/msfsearch
echo 'grep -i $1 /pentest/exploits/framework3/list' >> /usr/bin/msfsearch
chmod 755 /usr/bin/msfsearch
So .. 3 new commands
update-time "it updates the clock fyi lol"
my-ip "it tells you your external ip" and..
msfsearch"it makes finding that module faster than you can say muts just r00ted me :( " ... for instance try "msfsearch openview" and you'll see what i mean ;)
protip4: Its should be clear but msfsearch relies on the update script .. you dont want to use it just do "/pentest/exploits/framework3/msfcli > /pentest/exploits/framework3/list" and your good.
Cheers
Oh one last thing .. you want to comment about how scripts should go here, its better to grep this way etc, etc i welcome it "always willing to learn" .. but this works for me and in the end of the day ... thats all that really matters ;)
Re: SVN Updates, IP checking, and better Metasploit searching.
Thanks seems too be a and very handy script to have around.
Re: SVN Updates, IP checking, and better Metasploit searching.
Nice. Made my life a bit easier.
Line 26 (Proxystrike) evho > echo
Re: SVN Updates, IP checking, and better Metasploit searching.
Quote:
Originally Posted by
vvpalin
/usr/bin/svn update /pentest/web/ProxyStrike >> /var/log/updates/proxystrike 2>&1
evho $DATE >> /var/log/updates/proxystrike 2>&1
should probably read:
Code:
/usr/bin/svn update /pentest/web/ProxyStrike >> /var/log/updates/proxystrike 2>&1
echo $DATE >> /var/log/updates/proxystrike 2>&1
Note the change of 'evho' to 'echo'.
I'm using it, and it's pretty sweet. Thanks!
Re: SVN Updates, IP checking, and better Metasploit searching.
I was looking for something similar to this, but I wanted one that was a little more updated: So, I was looking to make maybe a bash or perl script that would run fast-track.py and execute it's "update everything" function. Problem is; I'm a noob and thought maybe a bash script with sleep and do while loops would execute the interactive mode of fast-track.py and it didn't work. Please let me know if you have any suggestions...