def test():
#	print(playerlist)
#	print(alex.displaySeasons())
#	print(cc.seasons)
	tj = players.Player('TJ','McFarland','BAL')
	tj.brkey = 'mcfartj01'
	tj.seasons = crawlplayer.get_all_seasons
	colby = players.Player('Colby','Lewis')
	colby.brkey = 'lewisco01'
	colby.seasons = crawlplayer.get_all_seasons(colby)
#	print(colby.seasons)
	ortega = players.Player('Rafael','Ortega')
	playerlist = [alex,cc,colby,ortega]
	export.export_data(playerlist,'testdata.xlsx',2015,3)
Beispiel #2
0
    def run(self):
        logger.log('INFOR', f'Start running {self.source} module')
        if self.in_china is None:
            _, self.in_china = utils.get_net_env()
        self.domains = utils.get_domains(self.target, self.targets)
        for self.domain in self.domains:
            self.results = list()  # 置空
            all_subdomains = list()
            self.init_dict_path()
            self.check_brute_params()
            if self.recursive_brute:
                logger.log(
                    'INFOR', f'Start recursively brute the 1 layer subdomain'
                    f' of {self.domain}')
            valid_subdomains = self.main(self.domain)

            all_subdomains.extend(valid_subdomains)

            # 递归爆破下一层的子域
            # fuzz模式不使用递归爆破
            if self.recursive_brute:
                for layer_num in range(1, self.recursive_depth):
                    # 之前已经做过1层子域爆破 当前实际递归层数是layer+1
                    logger.log(
                        'INFOR',
                        f'Start recursively brute the {layer_num + 1} '
                        f'layer subdomain of {self.domain}')
                    for subdomain in all_subdomains:
                        self.place = '*.' + subdomain
                        # 进行下一层子域爆破的限制条件
                        num = subdomain.count('.') - self.domain.count('.')
                        if num == layer_num:
                            valid_subdomains = self.main(subdomain)
                            all_subdomains.extend(valid_subdomains)

            logger.log(
                'INFOR',
                f'Finished {self.source} module to brute {self.domain}')
            if not self.path:
                name = f'{self.domain}_brute_result.{self.fmt}'
                self.path = settings.result_save_dir.joinpath(name)
            # 数据库导出
            if self.export:
                export.export_data(self.domain,
                                   alive=self.alive,
                                   limit='resolve',
                                   path=self.path,
                                   fmt=self.fmt)
Beispiel #3
0
    def export_data(self):
        """
        Export data from the database

        :return: exported data
        :rtype: list
        """
        return export.export_data(self.domain, alive=self.alive, fmt=self.fmt)
Beispiel #4
0
    def run(self):
        logger.log('INFOR', f'Start running {self.source} module')
        if self.in_china is None:
            _, self.in_china = utils.get_net_env()
        self.domains = utils.get_domains(self.target, self.targets)
        for self.domain in self.domains:
            self.results = list()  # 置空
            all_subdomains = list()
            self.init_dict_path()
            self.check_brute_params()
            if self.recursive_brute:
                logger.log('INFOR', f'Start recursively brute the 1 layer subdomain'
                                    f' of {self.domain}')
            valid_subdomains = self.main(self.domain)

            all_subdomains.extend(valid_subdomains)

            # Recursively
            # Fuzz mode does not use recursive blasting
            if self.recursive_brute:
                for layer_num in range(1, self.recursive_depth):
                    # I have done 1 layer of subdomain blasting before, and the actual number of recursive layers is layer+1
                    logger.log('INFOR', f'Start recursively brute the {layer_num + 1} '
                                        f'layer subdomain of {self.domain}')
                    for subdomain in all_subdomains:
                        self.place = '*.' + subdomain
                        # Restrictions for the next level of subdomain blasting
                        num = subdomain.count('.') - self.domain.count('.')
                        if num == layer_num:
                            valid_subdomains = self.main(subdomain)
                            all_subdomains.extend(valid_subdomains)

            logger.log('INFOR', f'Finished {self.source} module to brute {self.domain}')
            if not self.path:
                name = f'{self.domain}_brute_result.{self.fmt}'
                self.path = settings.result_save_dir.joinpath(name)
            # Database export
            if self.export:
                export.export_data(self.domain,
                                   alive=self.alive,
                                   limit='resolve',
                                   path=self.path,
                                   fmt=self.fmt)
Beispiel #5
0
def main(q, max_results):
    videos = c.explore_videos(q, max_results)
    e.export_data(videos)
def main(end=2015,numSeasons=3,exportplayers=False,destpath='brdata.xlsx'):
	teamlist,playerlist = rosters.create_rosters()
	crawl_players(playerlist)
	export.export_data(playerlist,destpath,end,numSeasons)
	return
 def explore_search(q, f, max_results):
         videos = c.explore_videos(q, max_results)
         e.export_data(videos, f, q)