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


Python colors.info方法代码示例

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


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

示例1: heuristic

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def heuristic(response, paramList):
    done = []
    forms = re.findall(r'(?i)(?s)<form.*?</form.*?>', response)
    for form in forms:
        method = re.search(r'(?i)method=[\'"](.*?)[\'"]', form)
        inputs = re.findall(r'(?i)(?s)<input.*?>', response)
        if inputs != None and method != None:
            for inp in inputs:
                inpName = re.search(r'(?i)name=[\'"](.*?)[\'"]', inp)
                if inpName:
                    inpName = d(e(inpName.group(1)))
                    if inpName not in done:
                        if inpName in paramList:
                            paramList.remove(inpName)
                        done.append(inpName)
                        paramList.insert(0, inpName)
                        print('%s Heuristic found a potential %s parameter: %s%s%s' % (good, method.group(1), green, inpName, end))
                        print('%s Prioritizing it' % info)
    emptyJSvars = re.finditer(r'var\s+([^=]+)\s*=\s*[\'"`][\'"`]', response)
    for each in emptyJSvars:
        inpName = each.group(1)
        done.append(inpName)
        paramList.insert(0, inpName)
        print('%s Heuristic found a potential parameter: %s%s%s' % (good, green, inpName, end))
        print('%s Prioritizing it' % info) 
开发者ID:s0md3v,项目名称:Arjun,代码行数:27,代码来源:arjun.py

示例2: narrower

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def narrower(oldParamList, url, include, headers, GET, delay, originalResponse, originalCode, reflections, factors, threadCount):
    newParamList = []
    threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=threadCount)
    futures = (threadpool.submit(quickBruter, part, originalResponse, originalCode, reflections, factors, include, delay, headers, url, GET) for part in oldParamList)
    for i, result in enumerate(concurrent.futures.as_completed(futures)):
        if result.result():
            newParamList.extend(slicer(result.result()))
        print('%s Processing: %i/%-6i' % (info, i + 1, len(oldParamList)), end='\r')
    return newParamList 
开发者ID:s0md3v,项目名称:Arjun,代码行数:11,代码来源:arjun.py

示例3: crawl

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def crawl(addresses, processed, database, limit):
    threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=10)
    futures = (threadpool.submit(getTransactions, address, processed, database, limit) for address in addresses)
    for i, _ in enumerate(concurrent.futures.as_completed(futures)):
        print('%s Progress: %i/%i        ' % (info, i + 1, len(addresses)), end='\r') 
开发者ID:s0md3v,项目名称:Orbit,代码行数:7,代码来源:orbit.py

示例4: getQuark

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def getQuark():
	if 'quark.html' not in os.listdir():
		cwd = os.getcwd()
		print ('%s Quark is neccessary to view graphs generated by Orbit.' % bad)
		print ('%s Downloading Quark [2.37 MB]' % run)
		os.system('git clone https://github.com/s0md3v/Quark %s/Quark -q' % cwd)
		os.system('mv ' + cwd + '/Quark/libs ' + cwd)
		os.system('mv ' + cwd + '/Quark/quark.html ' + cwd)
		os.remove(cwd + '/Quark/README.md')
		shutil.rmtree(cwd + '/Quark')
		print ('%s Quark was installed successfully' % info) 
开发者ID:s0md3v,项目名称:Orbit,代码行数:13,代码来源:getQuark.py

示例5: detectCMS

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def detectCMS(domain):
    response = get('https://whatcms.org/?gpreq=json&jsoncallback=jQuery1124008091494457806547_1554361369057&s=%s&na=&nb=1cg805dlm7d7e5eickf67rzxrn12mju6bnch3a99hrt88v7n8rhf0lovwr8d0zm1&verified=&_=1554361369059' % domain).text
    match = search(r'uses<\\/div>[^>]+>(.*?)<\\/a>', response)
    try:
        sys.stdout.write(good + ' ' + match.group(1) + '\n')
    except:
        sys.stdout.write('%s Target doesn\'t seem to use a CMS' % info + '\n') 
开发者ID:s0md3v,项目名称:ReconDog,代码行数:9,代码来源:detectCMS.py

示例6: honeypot

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def honeypot(inp):
    honey = 'https://api.shodan.io/labs/honeyscore/%s?key=C23OXE0bVMrul2YeqcL7zxb6jZ4pj2by' % inp
    try:
        result = get(honey).text
    except:
        result = None
        sys.stdout.write('%s No information available' % bad + '\n')
    if result:
        if float(result) < 0.5:
            color = green
        else:
            color = red
        probability = str(float(result) * 10)
        sys.stdout.write('%s Honeypot Probabilty: %s%s%%%s' %
                         (info, color, probability, end) + '\n') 
开发者ID:s0md3v,项目名称:ReconDog,代码行数:17,代码来源:honeypot.py

示例7: check

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def check(results, definitions):
    for r in results:
        result = r

        if (not is_defined(definitions[result.get("component", None)])):
            continue
        vulns = definitions[
            result.get(
                "component",
                None)].get(
            "vulnerabilities",
            None)
        for i in range(len(vulns)):
            if (not _is_at_or_above(result.get("version", None),
                                vulns[i].get("below", None))):
                if (is_defined(vulns[i].get("atOrAbove", None)) and not _is_at_or_above(
                        result.get("version", None), vulns[i].get("atOrAbove", None))):
                    continue

                vulnerability = {"info": vulns[i].get("info", None)}
                if (vulns[i].get("severity", None)):
                    vulnerability["severity"] = vulns[i].get("severity", None)

                if (vulns[i].get("identifiers", None)):
                    vulnerability["identifiers"] = vulns[
                        i].get("identifiers", None)

                result["vulnerabilities"] = result.get(
                    "vulnerabilities", None) or []
                result["vulnerabilities"].append(vulnerability)

    return results 
开发者ID:s0md3v,项目名称:Striker,代码行数:34,代码来源:retirejs.py

示例8: verb

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def verb(kind, string):
    """Enable verbose output."""
    if VERBOSE:
        print('%s %s: %s' % (info, kind, string)) 
开发者ID:s0md3v,项目名称:Photon,代码行数:6,代码来源:utils.py

示例9: flash

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def flash(function, links, thread_count):
    """Process the URLs and uses a threadpool to execute a function."""
    # Convert links (set) to list
    links = list(links)
    threadpool = concurrent.futures.ThreadPoolExecutor(
            max_workers=thread_count)
    futures = (threadpool.submit(function, link) for link in links)
    for i, _ in enumerate(concurrent.futures.as_completed(futures)):
        if i + 1 == len(links) or (i + 1) % thread_count == 0:
            print('%s Progress: %i/%i' % (info, i + 1, len(links)),
                    end='\r')
    print('') 
开发者ID:s0md3v,项目名称:Photon,代码行数:14,代码来源:flash.py

示例10: updater

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import info [as 别名]
def updater():
    """Update the current installation.

    git clones the latest version and merges it with the current directory.
    """
    print('%s Checking for updates' % run)
    # Changes must be separated by ;
    changes = '''major bug fixes;removed ninja mode;dropped python < 3.2 support;fixed unicode output;proxy support;more intels'''
    latest_commit = requester('https://raw.githubusercontent.com/s0md3v/Photon/master/core/updater.py', host='raw.githubusercontent.com')
    # Just a hack to see if a new version is available
    if changes not in latest_commit:
        changelog = re.search(r"changes = '''(.*?)'''", latest_commit)
        # Splitting the changes to form a list
        changelog = changelog.group(1).split(';')
        print('%s A new version of Photon is available.' % good)
        print('%s Changes:' % info)
        for change in changelog: # print changes
            print('%s>%s %s' % (green, end, change))

        current_path = os.getcwd().split('/') # if you know it, you know it
        folder = current_path[-1] # current directory name
        path = '/'.join(current_path) # current directory path
        choice = input('%s Would you like to update? [Y/n] ' % que).lower()

        if choice != 'n':
            print('%s Updating Photon' % run)
            os.system('git clone --quiet https://github.com/s0md3v/Photon %s'
                      % (folder))
            os.system('cp -r %s/%s/* %s && rm -r %s/%s/ 2>/dev/null'
                      % (path, folder, path, path, folder))
            print('%s Update successful!' % good)
    else:
        print('%s Photon is up to date!' % good) 
开发者ID:s0md3v,项目名称:Photon,代码行数:35,代码来源:updater.py


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