当前位置: 首页>>代码示例>>Python>>正文


Python target.Target方法代码示例

本文整理汇总了Python中target.Target方法的典型用法代码示例。如果您正苦于以下问题:Python target.Target方法的具体用法?Python target.Target怎么用?Python target.Target使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在target的用法示例。


在下文中一共展示了target.Target方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: scan_dnsdumpster

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def scan_dnsdumpster(self):
        try:
            results = DNSDumpsterAPI().search(self.domain)
            records = results['dns_records']
        except IndexError:
            results = None
            records = []

        if 'host' in records:
            ips = []
            domains = []

            for host in records['host']:
                if not host['provider'].startswith('Cloudflare'):
                    ips.append(host['ip'])
                    """For some reason Dumpster API return <br in domains"""
                    domains.append(re.sub('<br', '', host['domain']))

            targets = [
                Target(host, 'dnsdumpster', timeout=5)
                for host in set(domains + ips)
            ]
            return self.scan(targets) 
开发者ID:SageHack,项目名称:cloud-buster,代码行数:25,代码来源:buster.py

示例2: scan_crimeflare

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def scan_crimeflare(self):
        global cfdb
        targets = []

        """load cfdb in memory for __main__.scan_list()"""
        if 'cfdb' not in globals():
            cfdb = [
                i for i
                in open('crimeflare/db').readlines()
            ]

        for line in cfdb:
            if self.domain in line:
                ip = line.partition(' ')[2].rstrip()
                targets.append(Target(ip, 'crimeflare'))

        return self.scan(targets) 
开发者ID:SageHack,项目名称:cloud-buster,代码行数:19,代码来源:buster.py

示例3: create_target

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def create_target(self):
        """ Create new target """
        self.target = Target(self.GAME_CONFIG, scale_ratio=1.2)
        self.target_list.append(self.target) 
开发者ID:akmalhakimi1991,项目名称:python-knife-hit,代码行数:6,代码来源:gamemanager.py

示例4: create_target_collider

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def create_target_collider(self):
        """ Create new target collider """
        self.target_collider = Target(self.GAME_CONFIG, scale_ratio=1.5, rotation_mode="STATIC")
        self.target_collider_list.append(self.target_collider) 
开发者ID:akmalhakimi1991,项目名称:python-knife-hit,代码行数:6,代码来源:gamemanager.py

示例5: addtarget

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def addtarget(self, hostname, uname, pword):
        t = target.Target(hostname, uname, pword, self.target_num)
        self.targets[self.target_num] = t
        self.target_num += 1
        self.curtarget = t 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:7,代码来源:master.py

示例6: get_target_info

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def get_target_info(self):
        hostname = raw_input('Target Hostname: ') #victim host
        try:
            socket.inet_aton(hostname)
        except socket.error:
            print BAD + "Invalid IP Address."
            return 
        uname = raw_input('Username: ') #username for the box to be attacked
        pword = getpass.getpass() #password for the box to be attacked
        return hostname, uname, pword 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:12,代码来源:master.py

示例7: do_addtarget

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def do_addtarget(self, args):
        hostname, uname, pword = self.get_target_info() 
        print GOOD + "Target %d Set!" % self.target_num
        self.addtarget(hostname, uname, pword); 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:6,代码来源:master.py

示例8: do_edittarget

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def do_edittarget(self, args):
        t = self.get_target(args, connect=False)
        if t == None:
            return
        hostname, uname, pword = self.get_target_info() 
        t.hostname = hostname
        t.uname = uname
        t.pword = pword
        print(GOOD + "Target edited") 
开发者ID:krintoxi,项目名称:NoobSec-Toolkit,代码行数:11,代码来源:master.py

示例9: scan_main

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def scan_main(self):
        target = Target(self.domain, 'target')
        target.print_infos()
        self.target['main'] = target 
开发者ID:SageHack,项目名称:cloud-buster,代码行数:6,代码来源:buster.py

示例10: protected

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def protected(self):
        if not self.target['main'] or type(self.target['main']) != Target:
            return False

        return self.target['main'].protected 
开发者ID:SageHack,项目名称:cloud-buster,代码行数:7,代码来源:buster.py

示例11: scan_subdomain

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def scan_subdomain(self, subdomains=None, dept=None):
        if subdomains:
            toscan = subdomains
        else:
            toscan = open('lists/subdomains').read().splitlines()
            if dept:
                del toscan[dept:]

        targets = [
            Target(sub+'.'+self.domain, 'subdomain', timeout=5)
            for sub in toscan
        ]

        return self.scan(targets) 
开发者ID:SageHack,项目名称:cloud-buster,代码行数:16,代码来源:buster.py

示例12: get_target_info

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def get_target_info(self):
        hostname = input('Target Hostname: ') #victim host
        try:
            socket.inet_aton(hostname)
        except socket.error:
            print(BAD + "Invalid IP Address.")
            return None, None, None
        uname = input('Username: ')  # username for the box to be attacked
        pword = getpass.getpass()  # password for the box to be attacked
        return hostname, uname, pword 
开发者ID:Kkevsterrr,项目名称:backdoorme,代码行数:12,代码来源:master.py

示例13: do_addtarget

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def do_addtarget(self, args):
        hostname, uname, pword = self.get_target_info()
        if hostname is None:
            return
        print(GOOD + "Target %d Set!" % self.target_num)
        self.addtarget(hostname, uname, pword) 
开发者ID:Kkevsterrr,项目名称:backdoorme,代码行数:8,代码来源:master.py

示例14: do_edittarget

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def do_edittarget(self, args):
        t = self.get_target(args, connect=False)
        if t is None:
            return
        hostname, uname, pword = self.get_target_info() 
        t.hostname = hostname
        t.uname = uname
        t.pword = pword
        print(GOOD + "Target edited") 
开发者ID:Kkevsterrr,项目名称:backdoorme,代码行数:11,代码来源:master.py

示例15: worker_thread

# 需要导入模块: import target [as 别名]
# 或者: from target import Target [as 别名]
def worker_thread(p, organizations, auto_create_repositories, deployment_map, parameter_store):
    LOGGER.debug("Worker Thread started for %s", p.get('name'))
    pipeline = Pipeline(p)
    if auto_create_repositories == 'enabled':
        code_account_id = p.get('default_providers', {}).get('source', {}).get('properties', {}).get('account_id', {})
        has_custom_repo = p.get('default_providers', {}).get('source', {}).get('properties', {}).get('repository', {})
        if auto_create_repositories and code_account_id and str(code_account_id).isdigit() and not has_custom_repo:
            repo = Repo(code_account_id, p.get('name'), p.get('description'))
            repo.create_update()

    regions = []
    for target in p.get('targets', []):
        target_structure = TargetStructure(target)
        for step in target_structure.target:
            regions = step.get(
                'regions', p.get(
                    'regions', DEPLOYMENT_ACCOUNT_REGION))
            paths_tags = []
            for path in step.get('path', []):
                paths_tags.append(path)
            if step.get('tags') is not None:
                paths_tags.append(step.get('tags', {}))
            for path_or_tag in paths_tags:
                pipeline.stage_regions.append(regions)
                pipeline_target = Target(path_or_tag, target_structure, organizations, step, regions)
                pipeline_target.fetch_accounts_for_target()
        pipeline.template_dictionary["targets"].append(
            target_structure.account_list)

    if DEPLOYMENT_ACCOUNT_REGION not in regions:
        pipeline.stage_regions.append(DEPLOYMENT_ACCOUNT_REGION)
    pipeline.generate_input()
    ssm_params = fetch_required_ssm_params(
        pipeline.input["regions"] or [DEPLOYMENT_ACCOUNT_REGION]
    )
    deployment_map.update_deployment_parameters(pipeline)
    store_regional_parameter_config(pipeline, parameter_store)
    with open('cdk_inputs/{0}.json'.format(pipeline.input['name']), 'w') as outfile:
        data = {}
        data['input'] = pipeline.input
        data['ssm_params'] = ssm_params
        json.dump(data, outfile) 
开发者ID:awslabs,项目名称:aws-deployment-framework,代码行数:44,代码来源:generate_pipeline_inputs.py


注:本文中的target.Target方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。