Exemplo n.º 1
0
    def quick_gobuster(self):
        utils.print_good('Starting gobuster for short wordlist')
        if self.is_direct:
            domains = utils.just_read(self.is_direct).splitlines()
        else:
            #matching IP with subdomain
            main_json = utils.reading_json(
                utils.replace_argument(self.options,
                                       '$WORKSPACE/$COMPANY.json'))
            domains = [x.get('Domain') for x in main_json['Subdomains']]

        if self.options['DEBUG'] == 'True':
            domains = domains[:5]

        custom_logs = {"module": self.module_name, "content": []}

        for part in utils.chunks(domains, 3):
            for domain in part:

                #just strip everything to save local, it won't affect the result
                strip_domain = domain.replace('http://', '').replace(
                    'https://', '').replace('/', '-')

                cmd = '$GO_PATH/gobuster -k -q -e -x php,jsp,aspx,html,json -w $PLUGINS_PATH/wordlists/quick-content-discovery.txt -t 100 -o $WORKSPACE/directory/{1}-gobuster.txt -s 200,301,307  -u "{0}" '.format(
                    domain.strip(), strip_domain)

                cmd = utils.replace_argument(self.options, cmd)

                output_path = utils.replace_argument(
                    self.options,
                    '$WORKSPACE/directory/quick/{0}-gobuster.txt'.format(
                        strip_domain))

                std_path = utils.replace_argument(
                    self.options,
                    '$WORKSPACE/directory/quick/std-{0}-gobuster.std'.format(
                        strip_domain))

                execute.send_cmd(self.options, cmd, output_path, std_path,
                                 self.module_name)

                # time.sleep(0.5)
                #set status to done because this gonna will be submit when all command was done
                custom_logs['content'].append({
                    "cmd": cmd,
                    "std_path": std_path,
                    "output_path": output_path,
                    "status": "Done"
                })

            #just wait couple seconds and continue but not completely stop the routine
            time.sleep(20)

        #submit a log
        utils.print_info('Update activities log')
        utils.force_done(self.options, self.module_name)
        # utils.update_activities(self.options, str(custom_logs))
        #just save commands
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(self.options, logfile)
Exemplo n.º 2
0
    def dirsearch(self):
        utils.print_good('Starting dirsearch')
        if self.is_direct:
            domains = utils.just_read(self.is_direct).splitlines()
        else:
            #matching IP with subdomain
            main_json = utils.reading_json(
                utils.replace_argument(self.options,
                                       '$WORKSPACE/$COMPANY.json'))
            domains = [x.get('Domain') for x in main_json['Subdomains']]

        if self.options['DEBUG'] == 'True':
            domains = domains[:5]

        custom_logs = {"module": self.module_name, "content": []}

        for part in utils.chunks(domains, 3):
            for domain in part:
                #just strip everything to save local, it won't affect the result
                strip_domain = domain.replace('http://', '').replace(
                    'https://', '').replace('/', '-')

                cmd = "python3 $PLUGINS_PATH/dirsearch/dirsearch.py -b -e php,zip,aspx,js --wordlist=$PLUGINS_PATH/wordlists/really-quick.txt --simple-report=$WORKSPACE/directory/quick/{1}-dirsearch.txt -t 50 -u {0}".format(
                    domain, strip_domain)

                cmd = utils.replace_argument(self.options, cmd)

                output_path = utils.replace_argument(
                    self.options,
                    '$WORKSPACE/directory/quick/{0}-dirsearch.txt'.format(
                        strip_domain))

                std_path = utils.replace_argument(
                    self.options,
                    '$WORKSPACE/directory/quick/std-{0}-dirsearch.std'.format(
                        strip_domain))

                execute.send_cmd(self.options, cmd, output_path, std_path,
                                 self.module_name)

                # time.sleep(0.5)
                #set status to done because this gonna will be submit when all command was done
                custom_logs['content'].append({
                    "cmd": cmd,
                    "std_path": std_path,
                    "output_path": output_path,
                    "status": "Done"
                })

            #just wait couple seconds and continue but not completely stop the routine
            time.sleep(20)

        #submit a log
        utils.print_info('Update activities log')
        # utils.update_activities(self.options, str(custom_logs))
        utils.force_done(self.options, self.module_name)
        #just save commands
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(self.options, logfile)
Exemplo n.º 3
0
    def dirsearch(self):
        utils.print_good('Starting dirsearch')
        if self.is_direct:
            domains = utils.just_read(self.is_direct).splitlines()
        else:
            #matching IP with subdomain
            main_json = utils.reading_json(utils.replace_argument(
                self.options, '$WORKSPACE/$COMPANY.json'))
            domains = [x.get('Domain') for x in main_json['Subdomains']]

        if self.options['DEBUG'] == 'True':
            domains = domains[:5]

        custom_logs = {"module": self.module_name, "content": []}

        for part in utils.chunks(domains, 3):
            for domain in part:
                #just strip everything to save local, it won't affect the result
                strip_domain = domain.replace(
                    'http://', '').replace('https://', '').replace('/', '-')

                cmd = "python3 $PLUGINS_PATH/dirsearch/dirsearch.py -b -e php,zip,aspx,js --wordlist=$PLUGINS_PATH/wordlists/really-quick.txt --simple-report=$WORKSPACE/directory/quick/{1}-dirsearch.txt -t 50 -u {0}".format(
                    domain, strip_domain)

 
                cmd = utils.replace_argument(self.options, cmd)

                output_path = utils.replace_argument(
                    self.options, '$WORKSPACE/directory/quick/{0}-dirsearch.txt'.format(strip_domain))

                std_path = utils.replace_argument(
                    self.options, '$WORKSPACE/directory/quick/std-{0}-dirsearch.std'.format(strip_domain))

                execute.send_cmd(self.options, cmd, output_path,
                                 std_path, self.module_name)

                # time.sleep(0.5)
                #set status to done because this gonna will be submit when all command was done
                custom_logs['content'].append(
                    {"cmd": cmd, "std_path": std_path, "output_path": output_path, "status": "Done"})

            #just wait couple seconds and continue but not completely stop the routine
            time.sleep(20)

        #submit a log
        utils.print_info('Update activities log')
        # utils.update_activities(self.options, str(custom_logs))
        utils.force_done(self.options, self.module_name)
        #just save commands
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(self.options, logfile)
Exemplo n.º 4
0
    def quick_gobuster(self):
        utils.print_good('Starting gobuster for short wordlist')
        if self.is_direct:
            domains = utils.just_read(self.is_direct).splitlines()
        else:
            #matching IP with subdomain
            main_json = utils.reading_json(utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))
            domains = [x.get('Domain') for x in main_json['Subdomains']]

        if self.options['DEBUG'] == 'True':
            domains = domains[:5]

        custom_logs = {"module": self.module_name, "content": []}

        for part in utils.chunks(domains, 3):
            for domain in part:

                #just strip everything to save local, it won't affect the result
                strip_domain = domain.replace(
                    'http://', '').replace('https://', '').replace('/', '-')

                cmd = '$GO_PATH/gobuster -k -q -e -x php,jsp,aspx,html,json -w $PLUGINS_PATH/wordlists/quick-content-discovery.txt -t 100 -o $WORKSPACE/directory/{1}-gobuster.txt -s 200,301,307  -u "{0}" '.format(
                    domain.strip(), strip_domain)


                cmd = utils.replace_argument(self.options, cmd)

                output_path = utils.replace_argument(
                    self.options, '$WORKSPACE/directory/quick/{0}-gobuster.txt'.format(strip_domain))

                std_path = utils.replace_argument(
                    self.options, '$WORKSPACE/directory/quick/std-{0}-gobuster.std'.format(strip_domain))

                execute.send_cmd(self.options, cmd, output_path, std_path, self.module_name)

                # time.sleep(0.5)
                #set status to done because this gonna will be submit when all command was done
                custom_logs['content'].append({"cmd": cmd, "std_path": std_path, "output_path": output_path, "status": "Done"})
            
            #just wait couple seconds and continue but not completely stop the routine
            time.sleep(20)
        
        #submit a log
        utils.print_info('Update activities log')
        utils.force_done(self.options, self.module_name)
        # utils.update_activities(self.options, str(custom_logs))
        #just save commands
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(self.options, logfile)
Exemplo n.º 5
0
    def dirb_all(self, domains):
        for domain in domains:
            # passing domain to content directory tools
            self.dirsearch(domain.strip())
            self.wfuzz(domain.strip())
            self.gobuster(domain.strip())

            # just wait couple seconds and continue but not completely stop the routine
            time.sleep(60)

        # brute with 3 tools
        utils.force_done(self.options, self.module_name)
        # just save commands
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(self.options, logfile)