Example #1
0
    def conclude(self):
        self.unique_result()
        utils.print_banner("Conclusion for {0}".format(self.module_name))
        main_json = utils.reading_json(
            utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))

        all_subdomain = utils.replace_argument(
            self.options, '$WORKSPACE/subdomain/final-$OUTPUT.txt')
        with open(all_subdomain, 'r+') as s:
            subdomains = s.read().splitlines()

        for subdomain in subdomains:
            main_json['Subdomains'].append({
                "Domain": subdomain,
                "IP": "N/A",
                "Technology": [],
                "Ports": [],
            })

        utils.just_write(utils.replace_argument(self.options,
                                                '$WORKSPACE/$COMPANY.json'),
                         main_json,
                         is_json=True)

        utils.print_banner("Done for {0}".format(self.module_name))
Example #2
0
    def __init__(self, options):
        utils.print_banner("Scanning Subdomain")
        utils.make_directory(options['WORKSPACE'] + '/subdomain')
        self.module_name = self.__class__.__name__
        self.options = options
        self.options['CURRENT_MODULE'] = self.module_name
        self.options['SPEED'] = utils.custom_speed(self.options)
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module")
            return
        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Scanning Subdomain for {0}'.format(self.options['TARGET'])
        })
        self.initial()
        utils.just_waiting(self.options, self.module_name, seconds=60)
        self.conclude()

        # this gonna run after module is done to update the main json
        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1} ".format(self.options['TARGET'], self.module_name),
            'content': 'Done Scanning Subdomain for {0}'.format(self.options['TARGET'])
        })
        utils.print_line()
Example #3
0
    def __init__(self, options):
        utils.print_banner("Scanning Subdomain")
        utils.make_directory(options['WORKSPACE'] + '/subdomain')
        self.module_name = self.__class__.__name__
        self.options = options

        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning Subdomain for {0}'.format(
                                 self.options['TARGET'])
                         })

        self.initial()

        utils.just_waiting(self.module_name, seconds=10)
        self.conclude()

        #this gonna run after module is done to update the main json
        slack.slack_noti('good',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1} ".format(self.options['TARGET'],
                                                 self.module_name),
                             'content':
                             'Done Scanning Subdomain for {0}'.format(
                                 self.options['TARGET'])
                         })
Example #4
0
    def __init__(self, options):
        utils.print_banner("Scanning Directory")
        utils.make_directory(options['WORKSPACE'] + '/directory')
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "Detect is already done. use '-f' options to force rerun the module"
            )
            return

        self.is_direct = utils.is_direct_mode(options, require_input=True)

        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning Directory for {0}'.format(
                                 self.options['TARGET'])
                         })
        self.initial()
        slack.slack_noti('good',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning Directory for {0}'.format(
                                 self.options['TARGET'])
                         })
Example #5
0
    def __init__(self, options):
        utils.print_banner("Port Scanning")
        utils.make_directory(options['WORKSPACE'] + '/portscan')
        utils.make_directory(options['WORKSPACE'] + '/subdomain')
        self.module_name = self.__class__.__name__
        self.options = options

        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module")
            return
        self.is_direct = utils.is_direct_mode(options, require_input=True)

        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Port Scanning for {0}'.format(self.options['TARGET'])
        })
        self.initial()

        utils.just_waiting(self.options, self.module_name, seconds=60)
        # self.create_ip_result()
        self.conclude()
        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Port Scanning for {0}'.format(self.options['TARGET'])
        })
Example #6
0
    def __init__(self, options):
        utils.print_banner("Github Repo Scanning")
        utils.make_directory(options['WORKSPACE'] + '/gitscan/')
        self.module_name = self.__class__.__name__
        self.options = options
        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Github Repo Scanning for {0}'.format(
                                 self.options['TARGET'])
                         })
        self.initial()

        slack.slack_noti('good',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Github Repo Scanning for {0}'.format(
                                 self.options['TARGET'])
                         })
Example #7
0
    def __init__(self, options):
        utils.print_banner("Port Scanning")
        utils.make_directory(options['WORKSPACE'] + '/portscan')
        self.module_name = self.__class__.__name__
        self.options = options
        slack.slack_noti(
            'status',
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start Port Scanning for {0}'.format(self.options['TARGET'])
            })
        # self.initial()

        utils.just_waiting(self.module_name, seconds=60)
        # self.create_ip_result()
        self.conclude()
        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start Port Scanning for {0}'.format(self.options['TARGET'])
            })
Example #8
0
    def conclude(self):
        utils.print_banner("Conclusion for {0}".format(self.module_name))
        main_json = utils.reading_json(
            utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))
        main_json['Modules'][self.module_name] = utils.checking_done(
            module=self.module_name, get_json=True)

        ips_file = utils.replace_argument(
            self.options, '$WORKSPACE/ipspace/$OUTPUT-ipspace.txt')
        with open(ips_file, 'r') as s:
            ips = s.read().splitlines()
        main_json['IP Space'] = ips
        # print(main_json['IP Space'])

        #write that json again
        utils.just_write(utils.replace_argument(self.options,
                                                '$WORKSPACE/$COMPANY.json'),
                         main_json,
                         is_json=True)

        #logging
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(logfile)

        utils.print_banner("{0} Done".format(self.module_name))
Example #9
0
    def __init__(self, options):
        utils.print_banner("Scanning for Subdomain TakeOver")
        self.module_name = self.__class__.__name__
        self.options = options
        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning TakeOver for {0}'.format(
                                 self.options['TARGET'])
                         })
        self.initial()

        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done Scanning TakeOver for {0}'.format(self.options['TARGET'])
            })

        utils.print_banner("{0} Done".format(self.module_name))
Example #10
0
 def __init__(self, options):
     utils.print_banner("CORS Scanning")
     utils.make_directory(options['WORKSPACE'] + '/cors')
     self.module_name = self.__class__.__name__
     self.options = options
     if utils.resume(self.options, self.module_name):
         utils.print_info(
             "It's already done. use '-f' options to force rerun the module"
         )
         return
     slack.slack_noti(
         'status',
         self.options,
         mess={
             'title':
             "{0} | {1}".format(self.options['TARGET'], self.module_name),
             'content':
             'Start Scanning CORS for {0}'.format(self.options['TARGET'])
         })
     self.initial()
     utils.just_waiting(self.options, self.module_name)
     slack.slack_noti(
         'good',
         self.options,
         mess={
             'title':
             "{0} | {1} ".format(self.options['TARGET'], self.module_name),
             'content':
             'Done Scanning CORS for {0}'.format(self.options['TARGET'])
         })
Example #11
0
    def __init__(self, options):
        utils.print_banner("ScreenShot the target")
        utils.make_directory(options['WORKSPACE'] + '/screenshot')
        self.module_name = self.__class__.__name__
        self.options = options
        self.options['CURRENT_MODULE'] = self.module_name
        self.options['SPEED'] = utils.custom_speed(self.options)
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module"
            )
            return
        slack.slack_noti(
            'status',
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start ScreenShot for {0}'.format(self.options['TARGET'])
            })

        self.initial()

        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done ScreenShot for {0}'.format(self.options['TARGET'])
            })
        utils.print_line()
Example #12
0
    def __init__(self, options):
        utils.print_banner("Reconnaisance")
        utils.make_directory(options['WORKSPACE'] + '/recon')
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module"
            )
            return
        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning Subdomain for {0}'.format(
                                 self.options['TARGET'])
                         })

        self.initial()
        self.conclude()

        # this gonna run after module is done to update the main json
        slack.slack_noti('good',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1} ".format(self.options['TARGET'],
                                                 self.module_name),
                             'content':
                             'Done Scanning Subdomain for {0}'.format(
                                 self.options['TARGET'])
                         })
Example #13
0
 def __init__(self, options):
     utils.print_banner("Scanning through BurpState")
     utils.make_directory(options['WORKSPACE'] + '/burpstate/')
     self.module_name = self.__class__.__name__
     self.options = options
     if utils.resume(self.options, self.module_name):
         utils.print_info(
             "It's already done. use '-f' options to force rerun the module"
         )
         return
     slack.slack_noti('status',
                      self.options,
                      mess={
                          'title':
                          "{0} | {1}".format(self.options['TARGET'],
                                             self.module_name),
                          'content':
                          'Start Scanning BurpState for {0}'.format(
                              self.options['TARGET'])
                      })
     self.initial()
     slack.slack_noti('good',
                      self.options,
                      mess={
                          'title':
                          "{0} | {1}".format(self.options['TARGET'],
                                             self.module_name),
                          'content':
                          'Start Scanning BurpState for {0}'.format(
                              self.options['TARGET'])
                      })
     self.conclude()
Example #14
0
 def __init__(self, options):
     utils.print_banner("ScreenShot the target")
     utils.make_directory(options['WORKSPACE'] + '/screenshot')
     self.module_name = self.__class__.__name__
     self.options = options
     slack.slack_info(
         self.options,
         mess={
             'title':
             "{0} | {1}".format(self.options['TARGET'], self.module_name),
             'content':
             'Start ScreenShot for {0}'.format(self.options['TARGET'])
         })
     self.initial()
     #check if the screenshot success or not, if not run it again
     # while True:
     #     if not os.listdir(utils.replace_argument(self.options, '$WORKSPACE/screenshot/')):
     #         utils.print_bad('Something wrong with these module ... run it again')
     #         self.initial()
     #         utils.just_waiting(self.module_name)
     #     else:
     #         break
     slack.slack_good(
         self.options,
         mess={
             'title':
             "{0} | {1} ".format(self.options['TARGET'], self.module_name),
             'content':
             'Done ScreenShot for {0}'.format(self.options['TARGET'])
         })
Example #15
0
def full_report(options):
    global headers
    try:
        workspace = utils.get_workspace(options=options)
        url = options['REMOTE_API'] + "/api/{0}/activities".format(workspace)
        r = sender(url, headers=headers, data={}, method='GET')
        if r:
            raw_reports = r.json()
    except Exception:
        log_path = Path(options.get('WORKSPACE')).joinpath('log.json')
        raw_reports = utils.reading_json(log_path)

    if not raw_reports:
        utils.print_bad("Can't get log file for {0} workspace".format(
            options.get('TARGET')))
        return None

    modules = list(raw_reports.keys())
    for module in modules:
        if check_module(options, module):
            reports = raw_reports.get(module)
            utils.print_banner(module)
            for report in reports:
                cmd = report.get('cmd')
                utils.print_info("Command Executed: {0}\n".format(cmd))
                output_path = report.get('output_path')
                std_path = report.get('std_path')

                if 'raw' in options.get('REPORT').lower():
                    read_report(std_path)
                elif 'full' in options.get('REPORT').lower():
                    read_report(output_path)
                utils.print_line()
Example #16
0
    def __init__(self, options):
        utils.print_banner("Scanning for Subdomain TakeOver")
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "Detect is already done. use '-f' options to force rerun the module"
            )
            return
        slack.slack_noti('status',
                         self.options,
                         mess={
                             'title':
                             "{0} | {1}".format(self.options['TARGET'],
                                                self.module_name),
                             'content':
                             'Start Scanning TakeOver for {0}'.format(
                                 self.options['TARGET'])
                         })
        self.initial()

        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done Scanning TakeOver for {0}'.format(self.options['TARGET'])
            })

        utils.print_banner("{0} Done".format(self.module_name))
Example #17
0
 def __init__(self, options):
     utils.print_banner("Scanning through BurpState")
     utils.make_directory(options['WORKSPACE'] + '/burpstate/')
     self.module_name = self.__class__.__name__
     self.options = options
     slack.slack_noti('status',
                      self.options,
                      mess={
                          'title':
                          "{0} | {1}".format(self.options['TARGET'],
                                             self.module_name),
                          'content':
                          'Start Scanning BurpState for {0}'.format(
                              self.options['TARGET'])
                      })
     self.initial()
     slack.slack_noti('good',
                      self.options,
                      mess={
                          'title':
                          "{0} | {1}".format(self.options['TARGET'],
                                             self.module_name),
                          'content':
                          'Start Scanning BurpState for {0}'.format(
                              self.options['TARGET'])
                      })
     self.conclude()
Example #18
0
    def __init__(self, options):
        utils.print_banner("IP Discovery")
        utils.make_directory(options['WORKSPACE'] + '/ipspace')
        self.module_name = self.__class__.__name__
        self.options = options
        slack.slack_info(
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start IP Discovery for {0}'.format(self.options['TARGET'])
            })
        self.initial()
        utils.just_waiting(self.module_name)
        self.conclude()

        slack.slack_good(
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done IP Discovery for {0}'.format(self.options['TARGET'])
            })
Example #19
0
    def __init__(self, options):
        utils.print_banner("Port Scanning")
        utils.make_directory(options['WORKSPACE'] + '/portscan')
        utils.make_directory(options['WORKSPACE'] + '/subdomain')
        self.module_name = self.__class__.__name__
        self.options = options

        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module")
            return
        
        self.is_direct = utils.is_direct_mode(options, require_input=True)

        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Port Scanning for {0}'.format(self.options['TARGET'])
        })

        self.initial()

        utils.just_waiting(self.options, self.module_name, seconds=60)
        self.conclude()

        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Port Scanning for {0}'.format(self.options['TARGET'])
        })
Example #20
0
    def conclude(self):
        self.unique_result()

        utils.print_banner("Conclusion for {0}".format(self.module_name))

        main_json = utils.reading_json(
            utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))

        all_subdomain = utils.replace_argument(
            self.options, '$WORKSPACE/subdomain/final-$OUTPUT.txt')
        with open(all_subdomain, 'r') as s:
            subdomains = s.read().splitlines()

        for subdomain in subdomains:
            main_json['Subdomains'].append({"Domain": subdomain})

        main_json['Modules'][self.module_name] = utils.checking_done(
            module=self.module_name, get_json=True)

        utils.just_write(utils.replace_argument(self.options,
                                                '$WORKSPACE/$COMPANY.json'),
                         main_json,
                         is_json=True)
        #write that json again
        # utils.just_write(utils.reading_json(), main_json, is_json=True)

        #logging
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(logfile)

        utils.print_banner("{0}".format(self.module_name))
Example #21
0
    def __init__(self, options):
        self.options = options
        # setting stuff depend on search engine
        self.base_url = "https://www.zoomeye.org/"

        self.options['zoomeye_query'] = options['query']
        self.output = self.options['outdir'] + \
            "/{0}-zoomeye.txt".format(self.options['output'])

        # get jwt from config file
        self.jwt = {"Cube-Authorization": options.get('Cookies_zoomeye')}
        self.headers = {
            "User-Agent":
            "Mozilla/5.0 (X11; FreeBSD amd64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36",
            "Accept": "application/json",
            "Accept-Language": "en-US,en;q=0.5",
            "Accept-Encoding": "gzip, deflate",
            "Content-Type": "application/json"
        }

        # really do something
        utils.print_banner("Starting scraping from zoomeye")

        self.logged_in = self.check_session()
        self.initial()
        self.conclude()
Example #22
0
    def __init__(self, options):
        utils.print_banner("IP Discovery")
        utils.make_directory(options['WORKSPACE'] + '/ipspace')
        self.module_name = self.__class__.__name__
        self.options = options

        if utils.resume(self.options, self.module_name):
            utils.print_info("It's already done. use '-f' options to force rerun the module")
            return

        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start IP Discovery for {0}'.format(self.options['TARGET'])
        })
        self.initial()
        utils.just_waiting(self.options, self.module_name)
        try:
            self.conclude()
        except:
            utils.print_bad("Something wrong with conclude for {0}".format(self.module_name))

        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1} ".format(self.options['TARGET'], self.module_name),
            'content': 'Done IP Discovery for {0}'.format(self.options['TARGET'])
        })
Example #23
0
    def __init__(self, options):
        utils.print_banner("IP Discovery")
        utils.make_directory(options['WORKSPACE'] + '/ipspace')
        self.module_name = self.__class__.__name__
        self.options = options
        slack.slack_noti(
            'status',
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start IP Discovery for {0}'.format(self.options['TARGET'])
            })
        self.initial()
        utils.just_waiting(self.module_name)
        try:
            self.conclude()
        except:
            utils.print_bad("Something wrong with conclude for {0}".format(
                self.module_name))

        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done IP Discovery for {0}'.format(self.options['TARGET'])
            })
Example #24
0
 def __init__(self, options):
     utils.print_banner("CORS Scanning")
     utils.make_directory(options['WORKSPACE'] + '/cors')
     self.module_name = self.__class__.__name__
     self.options = options
     slack.slack_noti(
         'status',
         self.options,
         mess={
             'title':
             "{0} | {1}".format(self.options['TARGET'], self.module_name),
             'content':
             'Start Scanning CORS for {0}'.format(self.options['TARGET'])
         })
     self.initial()
     utils.just_waiting(self.options, self.module_name)
     slack.slack_noti(
         'good',
         self.options,
         mess={
             'title':
             "{0} | {1} ".format(self.options['TARGET'], self.module_name),
             'content':
             'Done Scanning CORS for {0}'.format(self.options['TARGET'])
         })
Example #25
0
    def __init__(self, options):
        utils.print_banner("AssetFinding")
        utils.make_directory(options['WORKSPACE'] + '/assets')
        self.module_name = self.__class__.__name__
        self.options = options
        self.options['CURRENT_MODULE'] = self.module_name
        self.options['SPEED'] = utils.custom_speed(self.options)
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module"
            )
            return

        self.is_direct = utils.is_direct_mode(options, require_input=True)
        slack.slack_noti(
            'status',
            self.options,
            mess={
                'title':
                "{0} | {1}".format(self.options['TARGET'], self.module_name),
                'content':
                'Start AssetFinding for {0}'.format(self.options['TARGET'])
            })
        self.initial()
        utils.just_waiting(self.options, self.module_name)
        slack.slack_noti(
            'good',
            self.options,
            mess={
                'title':
                "{0} | {1} ".format(self.options['TARGET'], self.module_name),
                'content':
                'Done AssetFinding for {0}'.format(self.options['TARGET'])
            })
        utils.print_line()
Example #26
0
 def __init__(self, options):
     self.options = options
     self.query = self.options['product'].strip()
     self.output = self.options['outdir'] + \
         "/{0}-write-ups.csv".format(self.options['output'])
     utils.print_banner("Starting scraping from Write-ups resources")
     utils.print_info("Query for: " + self.query)
     self.initial()
Example #27
0
 def __init__(self, options):
     self.options = options
     self.query = self.options['product'].strip()
     self.baseURL = "https://www.cvedetails.com"
     self.output = self.options['outdir'] + \
         "/{0}-cvedetails.csv".format(self.options['output'])
     utils.print_banner("Starting scraping from Cvedetails resources")
     utils.print_info("Query for: " + self.query)
     self.initial()
Example #28
0
 def __init__(self, options):
     utils.print_line()
     utils.print_banner("Create Skeleton JSON file")
     utils.make_directory(options['WORKSPACE'] + '/info')
     self.module_name = self.__class__.__name__
     self.options = options
     self.initial()
     # #this gonna run after module is done to update the main json
     # self.conclude()
     utils.print_line()
Example #29
0
    def __init__(self, options):
        self.options = options
        self.base_url = 'https://sploitus.com/search'

        self.query = (self.options['product'] + " " + self.options['version']).strip()
        self.output = self.options['outdir'] + \
            "/{0}-sploitus.csv".format(self.options['output'])
        utils.print_banner("Starting scraping from Sploitus")
        utils.print_info("Query for: " + self.query)
        self.initial()
Example #30
0
 def __init__(self, options):
     self.options = options
     # setting stuff depend on search engine
     # asn:123
     self.query = options.get('query', None)
     # target should be example.com
     self.target = options.get('target', None)
     self.output = self.options['output']
     utils.print_banner("Starting IPOsint module")
     # really do something
     self.initial()
Example #31
0
    def __init__(self, options):
        self.options = options
        self.base_url = 'https://vulners.com/api/v3/burp/software/'

        self.query = (self.options['product'] + " " +
                      self.options['version']).strip()
        self.output = self.options['outdir'] + \
            "/{0}-vulners.csv".format(self.options['output'])
        utils.print_banner("Starting scraping from Vulners")
        utils.print_info("Query for: " + self.query)
        self.initial()
Example #32
0
    def conclude(self):
        main_json = utils.reading_json(utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))
        main_json['Modules'][self.module_name] = utils.checking_done(module=self.module_name, get_json=True)

        #write that json again
        utils.just_write(utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'), main_json, is_json=True)
            
        #logging
        logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
        utils.save_all_cmd(logfile)
        utils.print_banner("{0} Done".format(self.module_name))
Example #33
0
    def conclude(self):
        utils.print_banner("Conclusion for {0}".format(self.module_name))
        main_json = utils.reading_json(utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'))

        ips_file = utils.replace_argument(self.options, '$WORKSPACE/ipspace/$OUTPUT-ipspace.txt')
        with open(ips_file, 'r') as s:
            ips = s.read().splitlines()
        main_json['IP Space'] = ips

        #write that json again
        utils.just_write(utils.replace_argument(self.options, '$WORKSPACE/$COMPANY.json'), main_json, is_json=True)
        
        utils.print_banner("{0} Done".format(self.module_name))
Example #34
0
 def __init__(self, options):
     utils.print_banner("SSL Scanning")
     utils.make_directory(options['WORKSPACE'] + '/ssl/')
     self.module_name = self.__class__.__name__
     self.options = options
     if utils.resume(self.options, self.module_name):
         utils.print_info("It's already done. use '-f' options to force rerun the module")
         return
     slack.slack_noti('status', self.options, mess={
         'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
         'content': 'Start SSL Scanning for {0}'.format(self.options['TARGET'])
     })
     self.initial()
     utils.just_waiting(self.options, self.module_name)
Example #35
0
 def __init__(self, options):
     utils.print_banner("ScreenShot the target")
     utils.make_directory(options['WORKSPACE'] + '/screenshot')
     self.module_name = self.__class__.__name__
     self.options = options
     if utils.resume(self.options, self.module_name):
         utils.print_info("It's already done. use '-f' options to force rerun the module")
         return
     slack.slack_noti('status', self.options, mess={
         'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
         'content': 'Start ScreenShot for {0}'.format(self.options['TARGET'])
     })
     self.initial()
     slack.slack_noti('good', self.options, mess={
         'title':  "{0} | {1} ".format(self.options['TARGET'], self.module_name),
         'content': 'Done ScreenShot for {0}'.format(self.options['TARGET'])
     })
Example #36
0
    def __init__(self, options):
        utils.print_banner("Scanning for Subdomain TakeOver")
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info("It's already done. use '-f' options to force rerun the module")
            return
        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Scanning TakeOver for {0}'.format(self.options['TARGET'])
        })
        self.initial()

        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1} ".format(self.options['TARGET'], self.module_name),
            'content': 'Done Scanning TakeOver for {0}'.format(self.options['TARGET'])
        })

        utils.print_banner("{0} Done".format(self.module_name))
Example #37
0
    def __init__(self, options):
        utils.print_banner("Headers Scanning")
        utils.make_directory(options['WORKSPACE'] + '/headers')
        utils.make_directory(options['WORKSPACE'] + '/headers/details')
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info("It's already done. use '-f' options to force rerun the module")
            return
        
        self.is_direct = utils.is_direct_mode(options, require_input=True)

        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Headers Scanning for {0}'.format(self.options['TARGET'])
        })
        self.initial()
        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Headers Scanning for {0}'.format(self.options['TARGET'])
        })
Example #38
0
    def __init__(self, options):
        utils.print_banner("Reconnaisance")
        utils.make_directory(options['WORKSPACE'] + '/recon')
        self.module_name = self.__class__.__name__
        self.options = options
        if utils.resume(self.options, self.module_name):
            utils.print_info(
                "It's already done. use '-f' options to force rerun the module")
            return
        slack.slack_noti('status', self.options, mess={
            'title':  "{0} | {1}".format(self.options['TARGET'], self.module_name),
            'content': 'Start Scanning Subdomain for {0}'.format(self.options['TARGET'])
        })

        self.initial()

        self.conclude()

        #this gonna run after module is done to update the main json
        slack.slack_noti('good', self.options, mess={
            'title':  "{0} | {1} ".format(self.options['TARGET'], self.module_name),
            'content': 'Done Scanning Subdomain for {0}'.format(self.options['TARGET'])
        })
Example #39
0
def flask_run():
    utils.print_banner("Starting Flask API")
    os.system('python3 core/app.py')
Example #40
0
 def __init__(self, options):
     utils.print_banner("Create Skeleton JSON file")
     utils.make_directory(options['WORKSPACE'] + '/info')
     self.module_name = self.__class__.__name__
     self.options = options
     self.initial()
Example #41
0
                        table_data.append([menu.name, menu.description])

                table = AsciiTable(table_data)
                print(table.table)
                continue

            self.parse_result(result)


if __name__ == "__main__":
    codename = "尻目"
    version = "0.1.0dev"

    args = docopt(__doc__, version=f"{codename} - {version}")
    state.args = args

    log_format = "%(asctime)s %(process)d %(threadName)s - [%(levelname)s] %(filename)s: %(funcName)s - %(message)s"
    logging.basicConfig(
        format=log_format,
        level=logging.DEBUG if args['--debug'] else logging.INFO
        #filename='st.log',
        #filemode='a+'
    )
    logging.debug(args)

    os.system('cls' if os.name == 'nt' else 'clear')
    print_banner(codename, version)

    loop = CmdLoop()
    loop()
Example #42
0
 def conclude(self):
     #just save commands
     logfile = utils.replace_argument(self.options, '$WORKSPACE/log.json')
     utils.save_all_cmd(self.options, logfile)
     utils.print_banner("Conclusion for {0}".format(self.module_name))