本文整理汇总了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
示例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
示例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)
示例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)
示例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)
示例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')