Advertisement
opexxx

penbox.py

Jan 4th, 2016
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.55 KB | None | 0 0
  1. #!/usr/bin/env python2.7
  2. #
  3. #          All In One Tool For Penetration Testing
  4. #           Authors : Fedy Wesleti , Mohamed Nour
  5. #
  6. import sys
  7. import os
  8. import subprocess
  9. from commands import *
  10. ##########################
  11. #Variables
  12. yes = set(['yes','y', 'ye', ''])
  13. no = set(['no','n'])
  14.  
  15.  
  16.  
  17. ##########################
  18.  
  19. #this is the big menu funtion
  20. def menu():
  21.     print """
  22.  ########  ######## ##    ## ########   #######  ##     ##
  23.  ##     ## ##       ###   ## ##     ## ##     ##  ##   ##  
  24.  ##     ## ##       ####  ## ##     ## ##     ##   ## ##  
  25.  ########  ######   ## ## ## ########  ##     ##    ###    
  26.  ##        ##       ##  #### ##     ## ##     ##   ## ##  
  27.  ##        ##       ##   ### ##     ## ##     ##  ##   ##  
  28.  ##        ######## ##    ## ########   #######  ##     ##  v1.0  
  29.                                  Pentesting Tools Auto-Downloader
  30.  
  31.  [+]       Coded BY Mohamed Nour & Fedy Weslety        [+]
  32.  [+]          FB/CEH.TN    ~~   FB/mohamed.zeus.0      [+]
  33.  [+]             Greetz To All Pentesters              [+]
  34.  
  35. Select from the menu:
  36.  
  37. 1 : Information Gathering
  38. 2 : Password Attacks
  39. 3 : Wireless Testing
  40. 4 : Exploitation Tools
  41. 5 : Sniffing & Spoofing
  42. 99 : Exit
  43.  
  44. """
  45.     choice = input("selet a number :")
  46.     choice = int(choice)
  47.     if choice == 1:
  48.         info()
  49.     elif choice == 2:
  50.         passwd()
  51.     elif choice == 3:
  52.         wire()
  53.     elif choice == 4:
  54.         exp()
  55.     elif choice == 5:
  56.         snif()
  57.     elif choice == 99:
  58.         os.system('clear'),sys.exit();
  59. #end of function
  60. ##########################
  61. #nmap function
  62. def nmap():
  63.     print("this step will download and install nmap ")
  64.     print("yes or no ")
  65.     choice7 = raw_input()
  66.     if choice7 in yes :
  67.         os.system("wget https://nmap.org/dist/nmap-7.01.tar.bz2")
  68.         os.system("bzip2 -cd nmap-7.01.tar.bz2 | tar xvf -")
  69.         os.system("cd nmap-7.01")
  70.         os.system("./configure")
  71.         os.system("make")
  72.         os.system("su root")
  73.         os.system("make install")
  74.     elif choice7 in no :
  75.         info()
  76. ####################################
  77. #jboss-autopwn
  78. def jboss():
  79.     os.system('clear')
  80.     print ("This JBoss script deploys a JSP shell on the target JBoss AS server. Once")
  81.     print ("deployed, the script uses its upload and command execution capability to")
  82.     print ("provide an interactive session.")
  83.     print ("")
  84.     print (" this will install jboss-autopwn")
  85.     print ("usage : ./e.sh target_ip tcp_port ")
  86.     choice9 = raw_input("yes / no :")
  87.     if choice9 in yes:
  88.         os.system("git clone https://github.com/SpiderLabs/jboss-autopwn.git"),sys.exit();
  89.     elif choice9 in no:
  90.         os.system('clear'); exp()
  91. #sqlmap
  92. def sqlmap():
  93.     print (" this will install sqlmap ")
  94.     print ("usage : python sqlmap.py -h")
  95.     choice8 = input("yes or no :")
  96.     if choice8 in yes:
  97.         os.system("git clone https://github.com/sqlmapproject/sqlmap.git sqlmap-dev")
  98.     elif choice8 in no:
  99.         os.system('clear'); info()
  100.  
  101. #setoolkit
  102. def setoolkit():
  103.     print ("The Social-Engineer Toolkit is an open-source penetration testing framework")
  104.     print(") designed for social engineering. SET has a number of custom attack vectors that ")
  105.     print(" allow you to make a believable attack quickly. SET is a product of TrustedSec, LLC  ")
  106.     print("an information security consulting firm located in Cleveland, Ohio.")
  107.     print("")
  108.     choiceset = raw_input("y / n :")
  109.     if choiceset in yes:
  110.         os.system("git clone https://github.com/trustedsec/social-engineer-toolkit.git");os.system("cd social-engineer-toolkit");os.system("python setup.py")
  111.     if choiceset in no:
  112.         os.system("clear"); info()
  113. #cupp
  114. def cupp():
  115.     print("cupp is a password list generator ")
  116.     print("Usage: python cupp.py -h")
  117.     print("yes or now")
  118.     choicecupp = raw_input("y / n :")
  119.    
  120.     if choicecupp in yes:
  121.         os.system("git clone https://github.com/Mebus/cupp.git");os.system("cd cupp")
  122.     elif choicecupp in no:
  123.         os.system("clear"); passwd()
  124. #ncrack
  125. def ncrack():
  126.     print("A Ruby interface to Ncrack, Network authentication cracking tool.")
  127.     print("requires : nmap >= 0.3ALPHA / rprogram ~> 0.3")
  128.     print("1 to accept / 0 to decline")
  129.     choicencrack = raw_input("y / n :")
  130.     if choicencrack in yes:
  131.         os.system("git clone https://github.com/sophsec/ruby-ncrack.git");os.system("cd ruby-ncrack");os.systemgem("install ruby-ncrack")
  132.     elif choicencrack in no:
  133.         os.system("clear"); passwd()
  134. #reaver
  135. def reaver():
  136.     print("Reaver has been designed to be a robust and practical attack against Wi-Fi Protected Setup")
  137.     print(" WPS registrar PINs in order to recover WPA/WPA2 passphrases. It has been tested against a")
  138.     print(") wide variety of access points and WPS implementations")
  139.     print("1 to accept / 0 to decline")
  140.     creaver = input("y / n :")
  141.     if creaver in yes:
  142.         os.system("apt-get -y install build-essential libpcap-dev sqlite3 libsqlite3-dev aircrack-ng pixiewps");os.system("git clone https://github.com/t6x/reaver-wps-fork-t6x.git");os.system("cd reaver-wps-fork-t6x");os.system("cd src/");os.system("./configure");os.system("make")
  143.     elif creaver in no:
  144.         os.system("clear"); wire()
  145.  
  146. #####################################
  147. #information gathering function
  148. def info():
  149.     print("1 : nmap ")
  150.     print("3 : SET tool kit")
  151.     print("99 :Go Back To Main Menu")
  152.     choice2 = input("selet a number :")
  153.     choice2 = int(choice2)
  154.     if choice2 ==1:
  155.         os.system('clear'); nmap()
  156.     if choice2 ==3:
  157.         os.system("clear"); setoolkit()
  158.  
  159.     elif choice2 ==99:
  160.         os.system("clear"); menu()
  161. #end of menu
  162. ##########################
  163. #password attacks menu
  164. def passwd():
  165.     print("1 : cupp ")
  166.     print("2 : Ncrack")
  167.     print("99:Back To Main Menu")
  168.     choice3 = input("selet a number :")
  169.     choice3 = int(choice3)
  170.     if choice3 ==1:
  171.      os.system("clear"); cupp()
  172.     elif choice3 ==2:
  173.         os.system("clear"); ncrack()
  174.     elif choice3 ==99:
  175.         os.system("clear"); menu()
  176. #end of menu
  177. ##########################
  178. #wireless attacks
  179. def wire():
  180.     print("1 : reaver ")
  181.     print("99: Go Back To The Main Menu")
  182.     choice4 = input("selet a number :")
  183.     choice4 = int(choice4)
  184.     if choice4 ==1:
  185.      os.system("clear");reaver()
  186.     elif choice4 ==99:
  187.         menu()
  188. ##########################
  189. #exploitation tools
  190. def exp():
  191.     print("1 : jboss-autopwn ")
  192.     print("2 : sqlmap")
  193.     print("99 : Go Back To Main Menu")
  194.     choice5 = input("selet a number :")
  195.     choice5 = int(choice5)
  196.     if choice5 ==2:
  197.         os.system("clear"); sqlmap()
  198.     if choice5 ==1:
  199.      os.system('clear'); jboss()
  200.     elif choice5 ==99:
  201.         menu()
  202. ###########################
  203. #sniffing tools
  204. def snif():
  205.     print("1 : Set Tool kit ")
  206.     print("99: Back To Main Menu")
  207.     choice6 = input("selet a number :")
  208.     choice6 = int(choice6)
  209.     if choice6 ==1:
  210.      os.system("clear"); setoolkit()
  211.     if choice6 ==99:
  212.        os.system("clear"); menu()
  213. #end of menu
  214. ##########################
  215.   #Check use OS
  216. def OS():
  217.     print(
  218.     """
  219.    Choose Operating System :
  220.    1) Max OSX
  221.    2) Linux
  222.    3) Windows
  223.    """)
  224.     system = input(":")
  225.     system = str(system)
  226.     if system ==2:
  227.         root()
  228.     else :
  229.         menu()
  230.  
  231. ############################
  232. #check root if linux
  233. def root():
  234.     if os.getuid() != 0:
  235.         print("Are you root? Please execute as root")
  236.         exit()
  237. #############################
  238. #begin :D
  239. OS()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement