Advertisement
Guest User

bt5up script v1.1 modified

a guest
Jan 17th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 26.78 KB | None | 0 0
  1. #!/usr/bin/python
  2. # This is a update script for Backtrack 5.
  3. # Rewritten by: bl4ck5w4n aka MaXFX in BT Forum
  4. # Blog: http://bl4ck5w4n.tk
  5. # Original autor Sickness http://sickness.tor.hu
  6.  
  7. import  os, time, inspect,sys,fileinput
  8. import smtplib, getopt
  9. from email.MIMEText import MIMEText
  10.  
  11. global tsleep
  12. tsleep = 2
  13.  
  14. def get_version():
  15.       curversion = 1.1
  16.       return curversion
  17.  
  18.  
  19. def backtrack_update():
  20.     print("\033[1;31m [>]\033[1;m Updating and cleaning Backtrack, please wait.")
  21.     time.sleep(tsleep)
  22.  
  23.     if(os.system("apt-get update && apt-get -y dist-upgrade && apt-get autoremove -y && apt-get -y autoclean") == 0):
  24.         print("\033[1;31m [>]\033[1;m Backtrack updated and cleaned successfully!")
  25.         time.sleep(tsleep)
  26.    
  27.     else:
  28.         print("\033[1;31m [>]\033[1;m Failed to update Backtrack.")
  29.         time.sleep(tsleep)
  30.    
  31.  
  32.  
  33. def exploit_db():
  34.         print("\033[1;31m [>]\033[1;m Updating Exploit-db, please wait.")
  35.         time.sleep(tsleep)
  36.         if(os.system("cd /pentest/exploits/exploitdb/platforms/ && svn up") == 0):
  37.                 print("\033[1;31m [>]\033[1;m Exploit-db updated successfully!")
  38.         time.sleep(tsleep)
  39.    
  40.     else:
  41.         print("\033[1;31m [>]\033[1;m Failed to update Exploit-db.")
  42.         time.sleep(tsleep)
  43.    
  44.  
  45.  
  46.  
  47. def Set():
  48.         print("\033[1;31m [>]\033[1;m Updating SET, please wait.")
  49.         time.sleep(tsleep)
  50.        
  51.         if(os.system("cd /pentest/exploits/set/ && svn up") == 0):
  52.    
  53.       print("\033[1;31m [>]\033[1;m SET updated successfully!")
  54.       time.sleep(tsleep)
  55.    
  56.     else:
  57.       print("\033[1;31m [>]\033[1;m Failed to update SET.")
  58.       time.sleep(tsleep)
  59.    
  60.  
  61.  
  62. def warvox():
  63.     print("\033[1;31m [>]\033[1;m Updating Warvox, please wait.")
  64.     time.sleep(tsleep)
  65.    
  66.     if(os.system("cd /pentest/telephony/warvox/ && svn up") == 0):
  67.      
  68.           print("\033[1;31m [>]\033[1;m Warvox updated successfully!")
  69.           time.sleep(tsleep)
  70.    
  71.     else:
  72.         print("\033[1;31m [>]\033[1;m Failed to update Warvox")
  73.         time.sleep(tsleep)
  74.    
  75.  
  76.  
  77. def aircrack():
  78.     print("\033[1;31m [>]\033[1;m Updating Aircrack-NG and Airodump, please wait.")
  79.     time.sleep(tsleep)
  80.    
  81.     if(os.system("cd /pentest/wireless/aircrack-ng/ && svn up") == 0):
  82.       os.system("cd /pentest/wireless/aircrack-ng/scripts/ && chmod a+x airodump-ng-oui-update && ./airodump-ng-oui-update")
  83.      
  84.       print("\033[1;31m [>]\033[1;m Aircrack-NG and Airodump updated successfully!")
  85.       time.sleep(tsleep)
  86.    
  87.     else:
  88.         print("\033[1;31m [>]\033[1;m Failed to update Aircrack-ng.")
  89.         time.sleep(tsleep)
  90.    
  91.  
  92. def feedingbottle():
  93.   print("\033[1;31m [>]\033[1;m Checking to see if FeedingBottle is installed.")
  94.   time.sleep(tsleep)
  95.   if os.path.exists("/bin/feedingbottle"):
  96.     print("\033[1;31m [>]\033[1;m FeedingBottle installed!")
  97.     time.sleep(tsleep)
  98.   else:
  99.     print("\033[1;31m [>]\033[1;m Installing FeddingBottle, please wait.")
  100.     os.system("wget http://www.ibeini.com/beini_system/others/feedingbottle/feedingbottle3.2-backtrack5-gnome.zip")
  101.     os.system("unzip feedingbottle3.2-backtrack5-gnome.zip")
  102.     if (os.system("dpkg -i feedingbottle3.2-backtrack5-gnome.deb")==0):
  103.           print("\033[1;31m [>]\033[1;m FeddingBottle installed successfully!")
  104.       time.sleep(tsleep)
  105.    
  106.     else:
  107.       print("\033[1;31m [>]\033[1;m Failed to install FeddingBottle.")
  108.       time.sleep(tsleep)
  109.    
  110.     os.system("rm feedingbottle3.2*")
  111.    
  112.      
  113. def giskismet():
  114.     print("\033[1;31m [>]\033[1;m Updating Giskismet, please wait.")
  115.     time.sleep(tsleep)
  116.    
  117.     if(os.system("cd /pentest/wireless/giskismet/ && svn up") == 0):
  118.      
  119.       print("\033[1;31m [>]\033[1;m Giskismet updated successfully!")
  120.       time.sleep(tsleep)
  121.    
  122.     else:
  123.         print("\033[1;31m [>]\033[1;m Failed to update Giskismet.")
  124.         time.sleep(tsleep)
  125.    
  126.  
  127.  
  128. def msf():
  129.     print("\033[1;31m [>]\033[1;m Updating Metasploit, please wait.")
  130.     time.sleep(tsleep)
  131.    
  132.     if(os.system("cd /pentest/exploits/framework/ && svn up") == 0):
  133.      
  134.       print("\033[1;31m [>]\033[1;m Metasploit updated successfully!")
  135.       time.sleep(tsleep)
  136.    
  137.     else:
  138.         print("\033[1;31m [>]\033[1;m Failed to update Metasploit.")
  139.         time.sleep(tsleep)
  140.    
  141. def openvas():
  142.  
  143.     print("\033[1;31m [>]\033[1;m Updating OpenVAS, please wait.")
  144.    
  145.         if (os.system("openvas-nvt-sync")== 0):
  146.         print("\033[1;31m [>]\033[1;m OpenVAS updated successfully!")
  147.         time.sleep(tsleep)
  148.         else:
  149.             print("\033[1;31m [>]\033[1;m Failed to update OpenVAS!")
  150.             time.sleep(tsleep)
  151.  
  152. def sslstrip():
  153.     print("\033[1;31m [>]\033[1;m Updating SSLStrip, please wait.")
  154.        
  155.         if (os.system("cd /tmp && wget http://www.thoughtcrime.org/software/sslstrip/sslstrip-0.9.tar.gz") == 0):
  156.         os.system("apt-get purge sslstrip -y")
  157.         os.system("rm -Rf /pentest/web/sslstrip")
  158.         os.system("tar -C /pentest/web/ -xvf  /tmp/sslstrip-0.9.tar.gz")
  159.         os.system("mv  /pentest/web/sslstrip-0.9 /pentest/web/sslstrip")
  160.         os.system("cd /pentest/web/sslstrip && python ./setup.py install")
  161.         os.system("chmod +x /pentest/web/sslstrip/sslstrip.py")
  162.         print("\033[1;31m [>]\033[1;m SSLStrip updated successfully!")
  163.         time.sleep(tsleep)
  164.        
  165.         else:
  166.         print("\033[1;31m [>]\033[1;m Failed to update SSLStrip!")
  167.         time.sleep(tsleep)
  168.  
  169. def nessus():
  170.   if(os.system("which nessus > /dev/null") == 0):
  171.     print("\033[1;31m [>]\033[1;m Updating Nessus plugins, please wait.")
  172.     time.sleep(tsleep)
  173.    
  174.     if(os.system("cd /opt/nessus/sbin/ && ./nessus-update-plugins") == 0):
  175.      
  176.       print("\033[1;31m [>]\033[1;m Nessus plugins updated successfully!")
  177.       time.sleep(tsleep)
  178.    
  179.     else:
  180.         print("\033[1;31m [>]\033[1;m Failed to update Nessus.")
  181.         time.sleep(tsleep)
  182.   else:
  183.       print("\033[1;31m [>]\033[1;m Nessus is not installed.")
  184.       time.sleep(tsleep)
  185.  
  186. def install_nessus():
  187.     if(os.system("which nessus > /dev/null") == 0):
  188.         print("\033[1;31m [>]\033[1;m Nessus is already installed!")
  189.         time.sleep(tsleep)
  190.        
  191.     else:
  192.       print("\033[1;31m [>]\033[1;m Installing Nessus!")
  193.       os.system("apt-get install nessus")
  194.       print("\033[1;31m [>]\033[1;m You need to register nessus to get the activation code:")
  195.       browser_nessus = raw_input("\033[1;31m [>]\033[1;m Would you like me to open Firefox for you? [n/Y] : ")
  196.       if(browser_nessus.upper()=="Y"):
  197.     os.system("firefox http://tenable.com/products/nessus/nessus-homefeed&")
  198.      
  199.       auth_key=""
  200.       while(auth_key == ""):
  201.           auth_key = raw_input("\033[1;31m [>]\033[1;m Enter Activation Code that was sent to your Email: ")
  202.           os.system("/opt/nessus/bin/nessus-fetch --register " + auth_key)
  203.           print("\033[1;31m [>]\033[1;m Adding user")
  204.           os.system("/opt/nessus/sbin/nessus-adduser")
  205.           print("\033[1;31m [>]\033[1;m Staring Nessus service")
  206.           os.system("/etc/init.d/nessusd start")
  207.           print("\033[1;31m [>]\033[1;m To access Nessus Web Interface: https://127.0.0.1:8834")
  208.  
  209. def hexorbase():
  210.   if (os.path.isfile('/opt/HexorBase/execute.py')):
  211.     print("\033[1;31m [>]\033[1;m HexorBase already installed!")
  212.     time.sleep(tsleep)
  213.   else:
  214.     if (os.system("apt-get install python-mysqldb python-psycopg2 python-pymssql python-qscintilla2 python-qt4 -y")==0):
  215.       if (os.system("cd /tmp && wget http://hexorbase.googlecode.com/files/hexorbase_1.0_all.deb")==0):
  216.         os.system("cd /tmp && dpkg -i hexorbase_1.0_all.deb")
  217.         os.system("sed -i.bak 's/Categories.*/Categories = bt-web-assessment-vulnerability-scanner;bt-web-exploitation-scanners;bt-db-mysql-assessment;bt-db-mssql-assessment;bt-db-oracle-assessment;bt-db-mysql-analysis;bt-db-mssql-analysis;bt-db-oracle-analysis;bt-db-mysql-exploit;bt-db-mssql-exploit;bt-db-oracle-exploit;/g' /usr/share/applications/hexorbase.desktop")
  218.         print("\033[1;31m [>]\033[1;m To install Oracle API please read: /opt/HexorBase/Oracle-API-installation.txt")
  219.         print("\033[1;31m [>]\033[1;m HexorBase installed successfully!")
  220.         time.sleep(tsleep)
  221.     else:
  222.       print("\033[1;31m [>]\033[1;m Failed to install HexorBase!")
  223.      
  224. def w3af():
  225.         print("\033[1;31m [>]\033[1;m Updating W3AF, please wait.")
  226.         time.sleep(tsleep)
  227.        
  228.         if(os.system("cd /pentest/web/w3af/ && svn up") == 0):
  229.      
  230.       print("\033[1;31m [>]\033[1;m W3AF updated successfully!")
  231.       time.sleep(tsleep)
  232.    
  233.     else:
  234.         print("\033[1;31m [>]\033[1;m Failed to update W3AF.")
  235.         time.sleep(tsleep)
  236.    
  237.  
  238. def nikto():
  239.         print("\033[1;31m [>]\033[1;m Updating Nikto, please wait.")
  240.         time.sleep(tsleep)
  241.        
  242.         if(os.system("cd /pentest/web/nikto/ && ./nikto.pl -update") == 0):
  243.      
  244.       print("\033[1;31m [>]\033[1;m Nikto updated successfully!")
  245.       time.sleep(tsleep)
  246.    
  247.     else:
  248.         print("\033[1;31m [>]\033[1;m Failed to update Nikto.")
  249.         time.sleep(tsleep)
  250.    
  251.  
  252.  
  253. def sqlmap():
  254.         print("\033[1;31m [>]\033[1;m Updating Sqlmap, please wait.")
  255.         time.sleep(tsleep)
  256.        
  257.         if(os.system("svn checkout https://svn.sqlmap.org/sqlmap/trunk/sqlmap /pentest/database/sqlmap") == 0):
  258.       print("\033[1;31m [>]\033[1;m Sqlmap updated successfully!")
  259.       time.sleep(tsleep)
  260.    
  261.     else:
  262.         print("\033[1;31m [>]\033[1;m Failed to update SQLmap.")
  263.         time.sleep(tsleep)
  264.    
  265.  
  266.  
  267.  
  268. def pyrit():
  269.     print("\033[1;31m [>]\033[1;m Checking to see if pyrit is installed.")
  270.     time.sleep(tsleep)
  271.    
  272.     if(os.system("pyrit > /dev/null") == 0):
  273.         print("\033[1;31m [>]\033[1;m Pyrit installed!")
  274.         time.sleep(tsleep)
  275.    
  276.     else:
  277.         print("\033[1;31m [>]\033[1;m Installing Pyrit, please wait.")
  278.         time.sleep(tsleep)
  279.         os.system("apt-get -y install libssl-dev scapy python-dev")
  280.         os.system("svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn")
  281.         os.system("cd pyrit_svn/pyrit && python setup.py build && python setup.py install")
  282.         os.system("rm -Rf pyrit_svn")
  283.         print("\033[1;31m [>]\033[1;m Pyrit installed successfully!")
  284.    
  285.  
  286.  
  287. def fimap():
  288.     print("\033[1;31m [>]\033[1;m Updating Fimap and installing MSF plugin, please wait.")
  289.         time.sleep(tsleep)
  290.    
  291.         os.system("rm -Rf /pentest/web/fimap")
  292.     if(os.system("svn checkout http://fimap.googlecode.com/svn/trunk/src/ /pentest/web/fimap")==0):    
  293.        
  294.             print("\033[1;31m [>]\033[1;m Fimap updated successfully!")
  295.            
  296.             time.sleep(tsleep)
  297.        
  298.         else:
  299.             print("\033[1;31m [>]\033[1;m Failed to update Fimap!")
  300.             time.sleep(tsleep)
  301.        
  302. def wireshark():
  303.     wr=raw_input("\033[1;31m [>]\033[1;m Wireshark takes time to compile do you wish to wait [y/N]:")
  304.     if(wr=="y"):
  305.  
  306.       print("\033[1;31m [>]\033[1;m Updating Wireshark, please wait.")
  307.       time.sleep(tsleep)
  308.    
  309.       os.system("apt-get install autoconf libgtk2.0-dev libglib2.0-dev libgeoip-dev libpcre3-dev libpcap0.8-dev libtool byacc flex -y")
  310.      
  311.       if (os.system("cd /tmp && svn co http://anonsvn.wireshark.org/wireshark/trunk/ wireshark")==0):
  312.     print("\033[1;31m [>]\033[1;m Files downloaded successfully! Now the painful part... Be patient")
  313.     time.sleep(tsleep)
  314.      
  315.     os.system("cd /tmp/wireshark && ./autogen.sh")
  316.     os.system("cd /tmp/wireshark && ./configure")
  317.     os.system("cd /tmp/wireshark && make")
  318.     if (os.system("cd /tmp/wireshark && make install")==0):
  319.         os.system("ldconfig")
  320.         os.system("rm -Rf /tmp/wireshark")
  321.         if (os.path.isfile('/usr/local/share/wireshark/init.lua')):
  322.           print("\033[1;31m [>]\033[1;m Changeging init.lua file..")
  323.           time.sleep(tsleep)
  324.        
  325.           for lines in fileinput.FileInput("/usr/local/share/wireshark/init.lua", inplace=1):
  326.             lines = lines.replace("disable_lua = false","disable_lua = true")
  327.      
  328.         print("\033[1;31m [>]\033[1;m Wireshark installed successfully!")
  329.         time.sleep(tsleep)
  330.       else:
  331.         print("\033[1;31m [>]\033[1;m Wireshark failed to install!")
  332.         time.sleep(tsleep)
  333.  
  334. def update():
  335.     print("\033[1;31m [>]\033[1;m Updating bt5update script.")
  336.    
  337.     os.system("cd /tmp && wget http://bl4ck5w4n.tk/wp-content/uploads/2011/07/bt5up.tar -c -q")
  338.    
  339.     if os.path.isfile("/tmp/bt5up.tar"):
  340.         os.system("tar -xvf /tmp/bt5up.tar -C /tmp/ > /dev/null")
  341.        
  342.     curfile = inspect.getfile(inspect.currentframe())
  343.    
  344.     pwd = os.getcwd() + str(curfile)
  345.    
  346.     os.system("rm -Rf " + pwd)
  347.     os.system("mv /tmp/bt5up.py " + str(curfile))
  348.     os.system("chmod +x " + str(curfile))
  349.    
  350.    
  351.     print("\033[1;31m [>]\033[1;m Update successfully! bt5up will restart, please wait...")
  352.     time.sleep(tsleep)
  353.     python = sys.executable
  354.     os.execl(python, python, * sys.argv)
  355.  
  356.  
  357.  
  358. def bugs_fixs():  
  359.     header()
  360.     print("         Section: Fix BT5 Bugs/Customize BT5")
  361.    
  362.         print("\033[1;31m [>]\033[1;m 1. Startx after login.")
  363.         print("\033[1;31m [>]\033[1;m 2. Change Login message.")
  364.         print("\033[1;31m [>]\033[1;m 3. Install Flash Player 64Bits.")
  365.         print("\033[1;31m [>]\033[1;m 4. Back.")
  366.         bugs = raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  367.        
  368.         if(bugs=="1"):
  369.         startx()
  370.         bugs_fixs()
  371.     if(bugs=="2"):
  372.         login_msg()
  373.         bugs_fixs()
  374.     if(bugs=="3"):
  375.         flashplayer()
  376.         bugs_fixs()    
  377.     if(bugs=="4"):
  378.         main()
  379.  
  380.  
  381.  
  382. def startx():
  383.     print("\033[1;31m [>]\033[1;m Make startx as default...")
  384.     os.system('echo \'if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ];\n then \nstartx \nfi\' >> /root/.bash_profile')
  385.     print("\033[1;31m [>]\033[1;m Done. Next time you reboot startx will start...")
  386.     time.sleep(tsleep)
  387.    
  388. def login_msg():
  389.     print("\033[1;31m [>]\033[1;m Edit the login message using nano")
  390.     time.sleep(tsleep)
  391.     os.system("nano /etc/update-motd.d/10-help-text")
  392.     os.system("sh /etc/update-motd.d/10-help-text")
  393.     print("\033[1;31m [>]\033[1;m Next time you boot your message will be like that")
  394.     time.sleep(tsleep)
  395.     os.system("nano /etc/update-motd.d/10-help-text")
  396.     os.system("sh /etc/update-motd.d/10-help-text")
  397.     print("\033[1;31m [>]\033[1;m Next time you boot your message will be like that")
  398.     time.sleep(tsleep)
  399.    
  400. def flashplayer():
  401.     print("\n\033[1;31m [>]\033[1;m Installing FlashPlayer 64Bits")
  402.     print("\033[1;31m [>]\033[1;m This will close your FireFox...")
  403.     time.sleep(tsleep)
  404.     os.system("killall -9 firefox-bin")
  405.     if(os.system("cd / && wget -c http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz")==0):
  406.     os.system("cd / && tar -xvf  install_flash_player_10_linux.tar.gz")
  407.     os.system("mkdir -p ~/.mozilla/plugins")
  408.     os.system("cd / && mv libflashplayer.so ~/.mozilla/plugins/")
  409.     os.system("cd / && rm -Rf install_flash_player_10_linux.tar.gz")
  410.     print("\033[1;31m [>]\033[1;m FlashPlayer 64Bits installed successfully!")
  411.     time.sleep(tsleep)
  412.     else:  
  413.     print("\033[1;31m [>]\033[1;m Failed to install FlashPlayer 64Bits")
  414.     time.sleep(tsleep)
  415.  
  416.  
  417. def latest_version():
  418.     i=0
  419.     lversion = 0
  420.     os.system("cd /tmp && wget http://bl4ck5w4n.tk/wp-content/uploads/2011/07/version.txt -c -q")
  421.     if os.path.isfile("/tmp/version.txt"):
  422.         ofile=open("/tmp/version.txt","r")
  423.         lversion=ofile.readline()
  424.  
  425.     return lversion;
  426.  
  427. def clean_exit():
  428.       print("\033[1;31m [>]\033[1;m Cleaning temporary files and leaving...")
  429.       if os.path.isfile("/tmp/version.txt"):
  430.     os.system("rm /tmp/version.txt")
  431.       if os.path.isfile("/tmp/bt5up.tar"):
  432.     os.system("rm /tmp/bt5up.tar")
  433.       if os.path.isfile("/tmp/bt5up.py"):
  434.     os.system("rm /tmp/bt5up.py")
  435.       print("\033[1;31m [>]\033[1;m Thanks for using bt5up dont forget to visit: http://bl4ck5w4n.tk")
  436.       print("\033[1;31m [>]\033[1;m For automated updates you can use bt5up -u\n")
  437.      
  438. def header():
  439.     os.system("clear")
  440.     print('\033[1;31m                                        ,   ,')
  441.     print('                                        $,  $,     ,')
  442.     print('                                        "ss.$ss. .s')
  443.     print('                                ,     .ss$$$$$$$$$$s,')
  444.     print('                                $. s$$$$$$$$$$$$$$`$$Ss')
  445.     print('                                "$$$$$$$$$$$$$$$$$$o$$$       ,')
  446.     print('                               s$$$$$$$$$$$$$$$$$$$$$$$$s,  ,s')
  447.     print('                              s$$$$$$$$$"$$$$$$""""$$$$$$"$$$$$,')
  448.     print('                              s$$$$$$$$$$s""$$$$ssssss"$$$$$$$$"')
  449.     print('                             s$$$$$$$$$$         `"""ss"$"$s""')
  450.     print('                             s$$$$$$$$$$,              `"""""$  ')
  451.     print('                             s$$$$$$$$$$$$s,... ')
  452.  
  453.         print("------------------------------------------------------------------------------\033[1;m")
  454.     print("\033[1;37m                    [Back||Track 5 R1 Update]\033[1;m")
  455.         print("     Author: Bl4ck5w4n")
  456.         print("     Feedback/Bugs : [email protected] || http://bl4ck5w4n.tk")
  457.         if (float(get_version()) < float(latest_version())):
  458.       print("   Installed Version: \033[1;31m" + str(get_version()) + "\033[1;m Latest Version:\033[1;37m" + str(latest_version()) +"\033[1;m")
  459.     else:
  460.       print("   Installed Version: \033[1;32m" + str(get_version()) + "\033[1;m Latest Version:\033[1;37m" + str(latest_version()) +"\033[1;m")
  461.    
  462.     print("\033[1;31m------------------------------------------------------------------------------\033[1;m")
  463.    
  464. def changelog():
  465.     os.system("cd /tmp && wget http://bl4ck5w4n.tk/wp-content/uploads/2011/07/changelog.txt -o /dev/null")
  466.     os.system("less /tmp/changelog.txt")
  467.     os.remove("/tmp/changelog.txt")
  468.  
  469.    
  470. def gmail():
  471.  
  472.     print("\033[1;31m [>]\033[1;m Send me some feeback/bugs/requests (Please NO spam)...\n If you wanna go back just leave the email or pass in blank\n")
  473.     gmailLogin = raw_input('\033[1;31m [>]\033[1;m Your GMail login (eg. [email protected]): ')
  474.     gmailPass = raw_input('\033[1;31m [>]\033[1;m Your GMail Password: ')
  475.  
  476.     if (gmailLogin!="" or gmailPass != ""):
  477.       msg = raw_input('\033[1;31m [>]\033[1;m Your Message: ')
  478.       msg = MIMEText(msg)
  479.       msg['Subject'] = "BT5UP " +str(get_version()) +" FeedBack"
  480.       msg['From'] = gmailLogin
  481.       msg['To'] = "[email protected]"
  482.  
  483.       server = smtplib.SMTP('smtp.gmail.com',587)
  484.       server.ehlo()
  485.       server.starttls()
  486.       server.ehlo()
  487.       server.login(gmailLogin,gmailPass)
  488.       server.sendmail(gmailLogin, "[email protected]", msg.as_string())
  489.       server.close()
  490.       print("\033[1;31m [>]\033[1;m Thank you for your time...")
  491.       time.sleep(tsleep)
  492.  
  493.  
  494. def menu_exploit():
  495.  
  496.     header()
  497.     print("         Section: EXPLOIT TOOLS")
  498.    
  499.         print("\033[1;31m [>]\033[1;m 1. Metasploit Framework.")
  500.         print("\033[1;31m [>]\033[1;m 2. Exploit-db.")
  501.         print("\033[1;31m [>]\033[1;m 3. SET - Social Engineering Toolkit.")
  502.     print("\033[1;31m [>]\033[1;m 4. Update all.")
  503.         print("\033[1;31m [>]\033[1;m 5. Back.")
  504.        
  505.        
  506.     ex_var = raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  507.  
  508.  
  509.     if(ex_var=="1"):
  510.          msf()
  511.          
  512.          menu_exploit()
  513.     if(ex_var=="2"):
  514.          exploit_db()
  515.          
  516.          menu_exploit()
  517.     if(ex_var=="3"):
  518.          Set()
  519.          
  520.          menu_exploit()
  521.     if(ex_var=="4"):
  522.           msf()
  523.           exploit_db()
  524.           Set()
  525.          
  526.           menu_exploit()
  527.     if(ex_var=="1"):
  528.           main()
  529.    
  530.    
  531.  
  532.  
  533. def menu_wireless():
  534.  
  535.     header()
  536.  
  537.         print("                        Section: WIRELESS & TELEPHONY")
  538.        
  539.         print("\033[1;31m [>]\033[1;m 1. Aircrack-ng and Airdrop.")
  540.         print("\033[1;31m [>]\033[1;m 2. WarVox.")
  541.         print("\033[1;31m [>]\033[1;m 3. Giskismet.")
  542.         print("\033[1;31m [>]\033[1;m 4. Update all.")
  543.         print("\033[1;31m [>]\033[1;m 5. Back.")
  544.        
  545.         w_var = raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  546.    
  547.     if(w_var=="1"):
  548.          aircrack()
  549.          
  550.          menu_wireless()
  551.     if(w_var=="2"):  
  552.          warvox()
  553.          
  554.          menu_wireless()
  555.     if(w_var=="3"):
  556.         giskismet()
  557.        
  558.         menu_wireless()
  559.  
  560.     if(w_var=="4"):
  561.         aircrack()
  562.         warvox()
  563.         giskismet()
  564.        
  565.         menu_wireless()
  566.     if(w_var=="5"):
  567.         main()
  568.          
  569.    
  570.  
  571. def menu_web_db():
  572.         header()
  573.         print("                        Section: WEB & DATABASE")
  574.        
  575.         print("\033[1;31m [>]\033[1;m 1. W3AF.")
  576.         print("\033[1;31m [>]\033[1;m 2. Nikto.")
  577.         print("\033[1;31m [>]\033[1;m 3. Sqlmap.")
  578.     print("\033[1;31m [>]\033[1;m 4. Fimap.")
  579.         print("\033[1;31m [>]\033[1;m 5. Update all.")
  580.         print("\033[1;31m [>]\033[1;m 6. Back.")
  581.        
  582.        
  583.         wd_war=raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  584.        
  585.         if(wd_war=="1"):
  586.       w3af()
  587.      
  588.       menu_web_db()
  589.     if(wd_war=="2"):
  590.           nikto()
  591.          
  592.           menu_web_db()
  593.     if(wd_war=="3"):
  594.           sqlmap()
  595.                 wr=raw_input("\033[1;31m [>]\033[1;m Wireshark takes time to compile do you wish to wait [y/N]:")
  596.         if(wr=="y"):
  597.           menu_web_db()
  598.     if(wd_war=="4"):
  599.           fimap()
  600.          
  601.           menu_web_db()
  602.     if(wd_war=="5"):
  603.           w3af()
  604.           nikto()
  605.           sqlmap()
  606.           fimap()
  607.          
  608.           menu_web_db()
  609.     if(wd_war=="6"):
  610.          
  611.           main()
  612.          
  613.          
  614.  
  615. def update_aptfast():
  616.     print("\033[1;31m [>]\033[1;m Updating apt-fast, please wait.")
  617.     if (os.system("wget -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4' http://www.mattparnell.com/linux/apt-fast/apt-fast.sh -c")==0):
  618.     os.system("mv apt-fast.sh /usr/bin/apt-fast")
  619.     os.system("chmod +x /usr/bin/apt-fast")
  620.     print("\033[1;31m [>]\033[1;m Updating apt-fast successfully")
  621.     else:
  622.     print("\033[1;31m [>]\033[1;m Failed to update apt-fast")
  623.    
  624. def aptfast():
  625.     print("\033[1;31m [>]\033[1;m Checking to see if Axel is installed.")
  626.     time.sleep(tsleep)
  627.    
  628.     if(os.system("axel > /dev/null") == 0):
  629.         print("\033[1;31m [>]\033[1;m Axel is installed!")
  630.         time.sleep(tsleep)
  631.    
  632.     else:
  633.         print("\033[1;31m [>]\033[1;m Installing Axel, please wait.")
  634.         os.system("apt-get install axel")
  635.        
  636.     print("\033[1;31m [>]\033[1;m Checking to see if apt-fast is installed.")
  637.     time.sleep(tsleep)
  638.    
  639.     if(os.system("apt-fast > /dev/null") == 0):
  640.         print("\033[1;31m [>]\033[1;m apt-fast is installed!")
  641.         time.sleep(tsleep)
  642.    
  643.     else:
  644.         print("\033[1;31m [>]\033[1;m Installing apt-fast, please wait.")
  645.         os.system("wget -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4' http://www.mattparnell.com/linux/apt-fast/apt-fast.sh -c")
  646.         os.system("mv apt-fast.sh /usr/bin/apt-fast")
  647.         os.system("chmod +x /usr/bin/apt-fast")
  648.         choice=raw_input("Would you like to use apt-fast instead of apt-get?[y/n]")
  649.         if (choice =="y"):
  650.           os.system("echo  alias apt-get='apt-fast' >> /root/.bashrc")
  651.    
  652.  
  653.  
  654. def menu_other():
  655.     header()
  656.         print("                        Section: OTHER")
  657.     print("\033[1;31m [>]\033[1;m 1. Nessus.")
  658.     print("\033[1;31m [>]\033[1;m 2. Pyrit.")
  659.     print("\033[1;31m [>]\033[1;m 3. Wireshark.")
  660.     print("\033[1;31m [>]\033[1;m 4. OpenVAS.")
  661.     print("\033[1;31m [>]\033[1;m 5. SSLStrip.")
  662.     print("\033[1;31m [>]\033[1;m 6. Update all.")
  663.     print("\033[1;31m [>]\033[1;m 7. Back.")
  664.    
  665.     c_var = raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  666.  
  667.    
  668.     if(c_var=="1"):
  669.          nessus()
  670.          menu_other()
  671.  
  672.     if(c_var=="2"):
  673.         pyrit()
  674.         menu_other()
  675.    
  676.     if(c_var=="3"):
  677.         wireshark()
  678.         menu_other()
  679.     if(c_var=="4"):
  680.         openvas()
  681.         menu_other()
  682.     if(c_var=="5"):
  683.         sslstrip()
  684.         menu_other()
  685.     if(c_var=="6"):
  686.         wireshark()
  687.         nessus()
  688.         pyrit()
  689.         update_aptfast()
  690.         openvas()
  691.         sslstrip()
  692.         menu_other()
  693.     if(c_var=="7"):
  694.         main() 
  695.    
  696. def additional_tools():
  697.     header()
  698.     print("                        Section: Additional Tools")
  699.     print("\033[1;31m [>]\033[1;m 1. Axel & apt-fast.")
  700.     print("\033[1;31m [>]\033[1;m 2. Nessus.")
  701.     print("\033[1;31m [>]\033[1;m 3. FeedingBottle.")
  702.     print("\033[1;31m [>]\033[1;m 4. HexorBase.")
  703.     print("\033[1;31m [>]\033[1;m 5. Install All.")
  704.     print("\033[1;31m [>]\033[1;m 6. Back.")
  705.     choice_var=raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  706.     if(choice_var=="1"):
  707.         aptfast()
  708.         additional_tools()()
  709.     if(choice_var=="2"):
  710.         install_nessus()
  711.         additional_tools()
  712.     if(choice_var=="3"):
  713.         feedingbottle()
  714.         additional_tools()  
  715.     if(choice_var=="4"):
  716.         hexorbase()
  717.         additional_tools()
  718.     if(choice_var=="5"):
  719.         aptfast()
  720.         install_nessus()
  721.         feedingbottle()
  722.         hexorbase()
  723.         additional_tools()
  724.     if(choice_var=="6"):
  725.         main()
  726.        
  727.      
  728.    
  729. def main():
  730.     header()
  731.     print("                        Section: MAIN")
  732.     print("\033[1;31m [>]\033[1;m 1. Update and clean Backtrack.")
  733.     print("\033[1;31m [>]\033[1;m 2. Exploit tools.")
  734.     print("\033[1;31m [>]\033[1;m 3. Wireless & Telephony.")
  735.     print("\033[1;31m [>]\033[1;m 4. Web & Database.")
  736.     print("\033[1;31m [>]\033[1;m 5. Others.")
  737.     print("\033[1;31m [>]\033[1;m 6. Update all.")
  738.     print("\033[1;31m [>]\033[1;m 7. Update script.")
  739.     print("\033[1;31m [>]\033[1;m 8. Changelog.")
  740.     print("\033[1;31m [>]\033[1;m 9. Feedback (GMail).")
  741.     print("\033[1;31m [>]\033[1;m 10. Fix BT5 Bugs/Customize BT5.")
  742.     print("\033[1;31m [>]\033[1;m 11. Additional Tools")
  743.         print("\033[1;31m [>]\033[1;m 12. Exit.")
  744.    
  745.    
  746.     choice_var=raw_input("\033[1;31m [>]\033[1;m Enter your choice: ")
  747.    
  748.     if(choice_var=="1"):
  749.          backtrack_update()
  750.          
  751.          main()
  752.     if(choice_var=="2"):
  753.          menu_exploit()
  754.          
  755.          main()
  756.     if(choice_var=="3"):
  757.          menu_wireless()
  758.          
  759.          main()
  760.     if(choice_var=="4"):
  761.          menu_web_db()  
  762.          
  763.          main()
  764.     if(choice_var=="5"):
  765.          menu_other()
  766.          
  767.          main()
  768.     if(choice_var=="6"):
  769.         wireshark()
  770.         backtrack_update()
  771.         exploit_db()
  772.         Set()
  773.         warvox()
  774.         aircrack()
  775.         giskismet()
  776.         msf()
  777.         sslstrip()
  778.         nessus()
  779.         w3af()
  780.         nikto()
  781.         sqlmap()
  782.         fimap()
  783.         pyrit()
  784.         update_aptfast()
  785.         openvas()
  786.         main()
  787.     if(choice_var=="7"):   
  788.          update()
  789.     if(choice_var=="8"):
  790.          changelog()
  791.          
  792.          main()
  793.     if(choice_var=="9"):
  794.          gmail()
  795.          main()
  796.     if(choice_var=="10"):
  797.           bugs_fixs()
  798.           main()
  799.     if(choice_var=="11"):
  800.           additional_tools()
  801.           main()
  802.     if(choice_var=="12"):
  803.           clean_exit()
  804.           exit(0)
  805.          
  806.          
  807. def automated():
  808.     try:
  809.         opts, args = getopt.getopt(sys.argv[1:], "hvu", ["help", "version","update"])
  810.     except getopt.GetoptError, err:
  811.        
  812.         print str(err)
  813.         sys.exit(2)
  814.  
  815.     for o, a in opts:
  816.    
  817.         if o in("-v","--version"):
  818.         print(" \nBT5UP  Version: " +  str(get_version()) + "\n Author: Bl4ck5w4n (coded in Python)")
  819.         print(" Feedback/Bugs: [email protected] || http://bl4ck5w4n.tk\n")
  820.         elif o in ("-h", "--help"):
  821.             print("\n ================OPTIONS================")
  822.             print(" -v --version        VERSION")
  823.             print(" -u --update         Update All\n")
  824.             sys.exit()
  825.         elif o in ("-u", "--update"):
  826.         wireshark()
  827.         backtrack_update()
  828.         exploit_db()
  829.         Set()
  830.         warvox()
  831.         aircrack()
  832.         giskismet()
  833.         msf()
  834.         sslstrip()
  835.         nessus()
  836.         w3af()
  837.         nikto()
  838.         sqlmap()
  839.         fimap()
  840.         pyrit()
  841.         openvas()
  842.         update_aptfast()
  843.         os.system("clear")
  844.         print("\033[1;31m [>]\033[1;m Thanks for using bt5up dont forget to visit: http://bl4ck5w4n.tk\n")
  845.  
  846.  
  847. if __name__=="__main__":
  848.  
  849.   if (len(sys.argv) > 1):
  850.     automated()
  851.   else:
  852.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement