當前位置: 首頁>>代碼示例>>Python>>正文


Python colors.bad方法代碼示例

本文整理匯總了Python中core.colors.bad方法的典型用法代碼示例。如果您正苦於以下問題:Python colors.bad方法的具體用法?Python colors.bad怎麽用?Python colors.bad使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在core.colors的用法示例。


在下文中一共展示了colors.bad方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: quickBruter

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [as 別名]
def quickBruter(params, originalResponse, originalCode, reflections, factors, include, delay, headers, url, GET):
    joined = joiner(params, include)
    newResponse = requester(url, joined, headers, GET, delay)
    if newResponse.status_code == 429:
        if core.config.globalVariables['stable']:
            print('%s Hit rate limit, stabilizing the connection..')
            time.sleep(30)
            return params
        else:
            print('%s Target has rate limiting in place, please use --stable switch' % bad)
            raise ConnectionError
    if newResponse.status_code != originalCode:
        return params
    elif factors['sameHTML'] and len(newResponse.text) != (len(originalResponse)):
        return params
    elif factors['samePlainText'] and len(removeTags(originalResponse)) != len(removeTags(newResponse.text)):
        return params
    elif True:
        for param, value in joined.items():
            if param not in include and newResponse.text.count(value) != reflections:
                return params
    else:
        return False 
開發者ID:s0md3v,項目名稱:Arjun,代碼行數:25,代碼來源:arjun.py

示例2: stabilize

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [as 別名]
def stabilize(url):
    "picks up the best suiting protocol if not present already"
    if 'http' not in url:
        try:
            requests.get('http://%s' % url) # Makes request to the target with http schema
            url = 'http://%s' % url
        except: # if it fails, maybe the target uses https schema
            url = 'https://%s' % url

    try:
        requests.get(url) # Makes request to the target
    except Exception as e: # if it fails, the target is unreachable
        if 'ssl' in str(e).lower():
            pass
        else:
            print ('%s Unable to connect to the target.' % bad)
            return False
    return url 
開發者ID:s0md3v,項目名稱:Arjun,代碼行數:20,代碼來源:utils.py

示例3: hq

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [as 別名]
def hq(choice, target=False):
    if target:
        try:
            database[choice][0](target)
        except:
            print ('%s Skipped due to error: %s' % (bad, target))
    elif choice == '0':
        inp = getInput('all')
        for func in list(database.values()):
            try:
                func[0](inp)
                print (red + ('-' * 60) + end)
            except:
                pass
    elif not target:
        typ = database[choice][1]
        inp = getInput(typ)
        validatedInp = validate(inp, typ)
        if validatedInp:
            plugin = database[choice][0]
            plugin(validatedInp)
        else:
            print ('%s Invalid input type' % bad) 
開發者ID:s0md3v,項目名稱:ReconDog,代碼行數:25,代碼來源:hq.py

示例4: getQuark

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [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: reverseLookup

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [as 別名]
def reverseLookup(inp):
    lookup = 'https://api.hackertarget.com/reverseiplookup/?q=%s' % inp
    try:
        result = get(lookup).text
        sys.stdout.write(result)
    except:
        sys.stdout.write('%s Invalid IP address' % bad) 
開發者ID:s0md3v,項目名稱:ReconDog,代碼行數:9,代碼來源:reverseLookup.py

示例6: honeypot

# 需要導入模塊: from core import colors [as 別名]
# 或者: from core.colors import bad [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


注:本文中的core.colors.bad方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。