Advertisement
Lulz-Tigre

python framework

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