當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。