Exemplo n.º 1
0
 def __LoadScript(self, filename):
     scriptLoader = ScriptLoader(filename)
     Info.Verbose("Local script `{}` loading...".format(filename))
     if not scriptLoader.Load():
         Info.Verbose(
             "Local script `{}` loading completed!".format(filename))
     return scriptLoader.GetScript()
Exemplo n.º 2
0
    def main(self, tk):
        '''
        Executes bot code and handles bot polling/lifecycle
        '''
        my_persistence = PicklePersistence(filename='persistence')
        updater = Updater(tk, persistence=my_persistence, use_context=True)
        # for security purposes, everytime main will be called, the token
        # attribute will be erased from object memory
        del tk

        dp = updater.dispatcher
        jobQueue = updater.job_queue

        # commands
        start = Start(self, dp)
        start.registerToDispatcher()

        help = Help(self, dp)
        help.registerToDispatcher()

        info = Info(self, dp)
        info.registerToDispatcher()

        self.enableLogging()

        # start the bot
        updater.start_polling()
        updater.idle()
Exemplo n.º 3
0
    def __init__(self):
        """
            initialise all sub classes
        """
        # initialise Variables class
        Variables.__init__(self)
        self._ = Variables()

        # initialise Info class
        Info.__init__(self)

        # initialise Passwd class
        Passwd.__init__(self)

        # initialise Wire class
        Wire.__init__(self)

        # initialise Exp class
        Exp.__init__(self)

        # initialise Snif class
        Snif.__init__(self)

        # initialise Webhack class
        Webhack.__init__(self)

        # initialise PostExploit class
        PostExploit.__init__(self)
Exemplo n.º 4
0
    def __Parse(self):
        profile = self.__LoadProfile(self.__args.profile)
        if self.__args.display:
            print(profile)

        terminalSettings = profile.GetTerminalSettings()
        plotSettings = profile.GetPlotSettings()
        script = self.__LoadScript(self.__args.filename)

        scriptGlue = ScriptGlue(terminalSettings, plotSettings, script,
                                self.__args)
        Info.Verbose("Glueing...")
        glued = scriptGlue.GetGlue()
        Info.Verbose("Glueing completed!")
        self.__SaveScript(glued)
Exemplo n.º 5
0
def main():

    # setting path
    plotexPath = os.path.realpath(__file__)
    pathSetter = PathSetter(plotexPath)
    pathSetter.SetPath()

    plotex = Plotex()
    if not plotex.Run():
        Info.Finish()
Exemplo n.º 6
0
    def __init__(self, args):

        self.outputfile = NameResolver.GetTmpfilePdf()
        filename = NameResolver.GetLocalScript(args.filename)
        self.filename = NameResolver.ReplaceWithPdf(filename)

        self.__CMD = 'cp {outfile} {localfile}'
        self.__CMD = self.__CMD.format(outfile=self.outputfile,
                                       localfile=self.filename)

        Info.Verbose("Pdfcopier initialization")
Exemplo n.º 7
0
    def __init__(self):
        self.latexCompiler = Settings.latexCompiler
        self.latexFlags = Settings.latexFlags
        self.outputFlag = '--output-dir '
        self.outputFlag += NameResolver.GetOutput()
        self.filename = NameResolver.GetTmpfileTex()
        self.__CMD = ' '.join([
            self.latexCompiler,
            self.latexFlags,
            self.outputFlag,
            self.filename])

        Info.Verbose("Latex Runner initialization")
Exemplo n.º 8
0
    def Load(self,args):
        try:
            settings = importlib.import_module('profiles.'+self.__profileName, package=None)
            Info.Verbose("Profile `{profile}` loaded".format(profile=self.__profileName))
        except ImportError:
            profileList = self.GetProfileList()
            Exiter.Exit("Profile `{profile}` not found! Check for the typos! \nProfiles avaliable:\n * {list}".format(profile=self.__profileName,list=profileList))
        
        terminalSettings = settings.terminalSettings
        plotSettings = settings.plotSettings
        if args.terminal:
            terminalSettings['terminal'] = args.terminal

        if args.append:
            terminalSettings['header'] += ReplaceSlash(args.append)

        if args.replace:
            terminalSettings['header'] = ReplaceSlash(args.replace)

        profile = Profile(terminalSettings, plotSettings)
        return profile
Exemplo n.º 9
0
    def PostProcess(self, append):
        try:
            Info.Verbose("TeX loading...")
            self.__Load()
            Info.Verbose("TeX loading completed!")

            Info.Verbose("TeX post-processing...")
            beginDoc = '\\begin{document}\n'
            if beginDoc in self.__tex:
                indexBegin = self.__tex.index(beginDoc)
                self.__tex.insert(indexBegin + 1, '\n'.join(append) + '\n')
                self.__tex = ''.join(self.__tex)
            Info.Verbose("TeX post-processing completed!")

            Info.Verbose("TeX saving...")
            self.__Save()
            Info.Verbose("TeX saving completed!")

            return 0
        except:
            return 1
Exemplo n.º 10
0
    def Run(self):

        Info.Info()
        args = self.__args

        # generating script -> .plt
        ScriptParser(args)
        Info.Verbose("Exiting Script Parser")

        # .plt -> .tex
        gnuplotRunner = GnuplotRunner()
        if gnuplotRunner.Run():
            Exiter.Exit("gnuplot does not exit successfully!")
        Info.Verbose("Exiting Gnuplot Runner")

        if not args.ignore:
            # .tex post-processing
            if args.postprocess:
                texPostProcessor = TexPostProcessor()
                if texPostProcessor.PostProcess(args.postprocess):
                    Exiter.Exit(
                        "TeX Post-Processor does not exit successfully!")
                Info.Verbose("Exiting Tex Post-Processor")

            # .tex -> .pdf
            latexRunner = LatexRunner()
            if latexRunner.Run():
                Exiter.Exit("LaTeX does not exit successfully!")
            Info.Verbose("Exiting LaTeX Runner")

            # .pdf -> local path
            pdfcopier = Pdfcopier(args)
            if pdfcopier.Copy():
                Exiter.Exit("copying does not finished successfully!")
            Info.Verbose("Exiting Pdfcopier")

        Exiter.Clean()
        return 0
Exemplo n.º 11
0
 def __SaveScript(self, glued):
     scriptSaver = ScriptSaver()
     Info.Verbose("Parsed script saving...")
     if not scriptSaver.Save(glued):
         Info.Verbose("Parsed script saving completed")
Exemplo n.º 12
0
 def __init__(self, args):
     self.__args = args
     Info.Verbose("Script Parser initialization")
     self.__Parse()
Exemplo n.º 13
0
    def main(self):
        """
            The core of the script
        """
        self._.logo()
        input("Press any key to continue ...")

        print("""
        Select from the menu:
        1 : Information Gathering
        2 : Password Attacks
        3 : Wireless Testing
        4 : Exploitation Tools
        5 : Sniffing & Spoofing
        6 : Web Hacking
        7 : Private Tools
        8 : Post Exploitation
        9 : Recon
        99: Exit\n""")

        user_input = input("Please enter a number: ")

        while True:
            if user_input == '1':
                Info.__init__(self)
                print("""
        1- Nmap
        2- Setoolkit
        3- Port Scanning
        4- Host to IP
        5- Wordpress user enumeration
        6- CMS Scanner
        7- XSStracer - checks remote web servers for Clickjacking, Cross-Frame Scripting, \
Cross-Site Tracing and Host Header Injection
        8- Doork - Google Dorks Passive Vulnerability Auditor
        9- Scan A server's Users
        99- Back To Main Menu
                """)
                user_input2 = input("Enter a number: ")
                while True:
                    if user_input2 == '1':
                        Info.nmap(self)
                        break
                    elif user_input2 == '2':
                        Info.setoolkit(self)
                        break
                    elif user_input2 == '3':
                        Info.ports(self)
                        break
                    elif user_input2 == '4':
                        Info.h2ip(self)
                        break
                    elif user_input2 == '5':
                        Info.wpue(self)
                        break
                    elif user_input2 == '6':
                        Info.cmsscan(self)
                        break
                    elif user_input2 == '7':
                        Info.xsstracer(self)
                        break
                    elif user_input2 == '8':
                        Info.doork(self)
                        break
                    elif user_input2 == '9':
                        Info.scanusers(self)
                        break
                    elif user_input2 == '99':
                        self.main()
                    else:
                        user_input2 = input(
                            "Please enter a valid number between [1..9] or 99 to back to the main menu: "
                        )
            elif user_input == '2':
                print("""
        1- Cupp
        2- Ncrack
        99- Back to main menu
                """)
                user_input3 = input("Enter a number: ")
                while True:
                    if user_input3 == '1':
                        Passwd.cupp(self)
                        break
                    if user_input3 == '2':
                        Passwd.ncrack(self)
                        break
                    if user_input3 == '99':
                        self.main()
                    else:
                        user_input3 = input(
                            "Please enter a valid number between [1,2] or 99 to back to main menu: "
                        )
            elif user_input == '3':
                print("""
        1- Reaver
        2- Pixiewps
        3- Bluetooth Honeypot Gui Framework
        99- Back to main menu
                """)
                user_input4 = input("Enter a number: ")
                while True:
                    if user_input4 == '1':
                        Wire.reaver(self)
                        break
                    elif user_input4 == '2':
                        Wire.pixiewps(self)
                        break
                    elif user_input4 == '3':
                        Wire.bluepot(self)
                        break
                    elif user_input4 == '99':
                        self.main()
                    else:
                        user_input4 = input(
                            "Please enter a valid number between [1..3] or 99 to back to the main menu: "
                        )
            elif user_input == '4':
                print("""
        1- Venom
        2- SQLmap
        3- Shellnoob
        4- Commix
        5- FTP Auto Bypass
        6- Jboss-autopwn
        7- Blind SQL Automatic Injection and Exploit
        8- Brutefoce Android Passcode (AndroidPINCrack)
        9- Joomla, Mambo, PHP-Nuke, and XOOPS CMS SQL injection Scanner
        99- Back to the main menu
                """)
                user_input5 = input("Enter a number: ")
                while True:
                    if user_input5 == '1':
                        Exp.venom(self)
                        break
                    elif user_input5 == '2':
                        Exp.sqlmap(self)
                        break
                    elif user_input5 == '3':
                        Exp.shellnoob(self)
                        break
                    elif user_input5 == '4':
                        Exp.commix(self)
                        break
                    elif user_input5 == '5':
                        Exp.gabriel(self)
                        break
                    elif user_input5 == '6':
                        Exp.jboss(self)
                        break
                    elif user_input5 == '7':
                        Exp.bsqlbf(self)
                        break
                    elif user_input5 == '8':
                        Exp.androidhash(self)
                        break
                    elif user_input5 == '9':
                        Exp.cmsfew(self)
                        break
                    elif user_input5 == '99':
                        self.main()
                    else:
                        user_input5 = input(
                            "Please enter a number between [1..9] or 99 to back to the main meun: "
                        )
            elif user_input == '5':
                print("""
        1- Setoolkit
        2- SSLTrip
        3- pyPisher
        4- SMTP Mailer
        99- Back to main menu
                """)
                user_input6 = input("Enter a number: ")
                while True:
                    if user_input6 == '1':
                        Snif.setoolkit(self)
                        break
                    elif user_input6 == '2':
                        Snif.ssls(self)
                        break
                    elif user_input6 == '3':
                        Snif.pisher(self)
                        break
                    elif user_input6 == '4':
                        Snif.smtpsend(self)
                        break
                    elif user_input6 == '99':
                        self.main()
                    else:
                        user_input6 = input(
                            "Please enter a number between [1..4] of 99 to back to the main menu: "
                        )
            elif user_input == '6':
                print("""
        1- Drupal
        2- Inurlbr
        3- Wordpress & Joomla Scanner
        4- Gravity Form Scanner
        5- File Upload Checker
        6- Wordpress Exploit Scanner
        7- Wordpress Plugins Scanner
        8- Shell and Directory Finder
        9- Joomla! 1.5 - 3.4.5 remote code execution
        10- Vbulletin 5.X remote code execution
        11- BruteX - Automatically brute force all services running on a target
        12- Arachni - Web Application Security Scanner Framework
        13- Sub-domain Scanning
        14- Wordpress Scanning
        15- Wordpress Username Enumeration
        16- Wordpress Backup Grabbing
        17- Sensitive File Detection
        18- Same-Site Scripting Scanning
        19- Click Jacking Detection
        20- Powerful XSS vulnerability scanning
        21- SQL Injection vulnerability scanning
        99- Back to the main menu
                """)
                user_input7 = input("Enter a number: ")
                while True:
                    if user_input7 == '1':
                        Webhack.drupal_main(self)
                        break
                    elif user_input7 == '2':
                        Webhack.inurlbr(self)
                        break
                    elif user_input7 == '3':
                        Webhack.wppjmla(self)
                        break
                    elif user_input7 == '4':
                        Webhack.gravity(self)
                        break
                    elif user_input7 == '5':
                        Webhack.sqlscan(self)
                        break
                    elif user_input7 == '6':
                        print("@FIXME")
                        break
                    elif user_input7 == '7':
                        print("@FIXME")
                        break
                    elif user_input7 == '8':
                        print("@FIXME")
                        break
                    elif user_input7 == '9':
                        print("@FIXME")
                        break
                    elif user_input7 == '10':
                        print("@FIXME")
                        break
                    elif user_input7 == '11':
                        print("@FIXME")
                        break
                    elif user_input7 == '12':
                        print("@FIXME")
                        break
                    elif user_input7 == '13':
                        print("@FIXME")
                        break
                    elif user_input7 == '14':
                        print("@FIXME")
                        break
                    elif user_input7 == '15':
                        print("@FIXME")
                        break
                    elif user_input7 == '16':
                        print("@FIXME")
                        break
                    elif user_input7 == '17':
                        pass
                    elif user_input7 == '18':
                        print("@FIXME")
                        break
                    elif user_input7 == '19':
                        print("@FIXME")
                        break
                    elif user_input7 == '20':
                        print("@FIXME")
                        break
                    elif user_input7 == '21':
                        print("@FIXME")
                        break
                    elif user_input7 == '99':
                        self.main()
                    else:
                        user_input7 == input(
                            "Please enter a number between [1..21] or 99 to back to the main menu: "
                        )
            elif user_input == '7':
                print("\t@FIXEME")
                break
            elif user_input == '8':
                print("""
        1- Shell Checker
        2- POET - Post-Exploitation Tool
        3- Weeman - Phishing Framework
        99- Back to the main menu
                """)
                user_input8 = input("Enter a number: ")
                while True:
                    if user_input8 == '1':
                        PostExploit.sitechecker(self)
                        break
                    elif user_input8 == '2':
                        PostExploit.poet(self)
                        break
                    elif user_input8 == '3':
                        PostExploit.weeman(self)
                        break
                    elif user_input8 == '99':
                        self.main()
                    else:
                        user_input8 = input(
                            "Enter a valid number between [1..3] or 99 to back to the main menu: "
                        )
            elif user_input == '9':
                # initialise Sn1per class
                Sn1per.__init__(self)
                break
            elif user_input == '99':
                print("Exit...")
                exit()
            else:
                user_input = input(
                    "Please enter a valid number between [1..9] or 99 to exit this script: "
                )
Exemplo n.º 14
0
 def __init__(self):
     self.__argv = Argv()
     self.__args = self.__argv.GetArgs()
     if self.__args.verbose:
         Info.SetVerbose()
Exemplo n.º 15
0
 def __init__(self):
     self.gnuplotCMD = 'gnuplot'
     self.filename = NameResolver.GetTmpfilePlt()
     self.__CMD = ' '.join([self.gnuplotCMD, self.filename])
     Info.Verbose("Gnuplot Runner initialization")
Exemplo n.º 16
0
 def __init__(self):
     self.__filename = NameResolver.GetTmpfileTex()
     self.__tex = ''
     Info.Verbose("TeX Post-processor initialization")