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


Python colors.end方法代码示例

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


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

示例1: heuristic

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [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: hq

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [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

示例3: arjun

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def arjun(url, GET, headers, delay, timeout):
    paraNames = {}
    response = requester(url, {}, headers, GET, delay, timeout).text
    matches = re.findall(
        r'<input.*?name=\'(.*?)\'.*?>|<input.*?name="(.*?)".*?>', response)
    for match in matches:
        try:
            foundParam = match[1]
        except UnicodeDecodeError:
            continue
        logger.good('Heuristics found a potentially valid parameter: %s%s%s. Priortizing it.' % (
            green, foundParam, end))
        if foundParam not in blindParams:
            blindParams.insert(0, foundParam)
    threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=threadCount)
    futures = (threadpool.submit(checky, param, paraNames, url,
                                 headers, GET, delay, timeout) for param in blindParams)
    for i, _ in enumerate(concurrent.futures.as_completed(futures)):
        if i + 1 == len(blindParams) or (i + 1) % threadCount == 0:
            logger.info('Progress: %i/%i\r' % (i + 1, len(blindParams)))
    return paraNames 
开发者ID:s0md3v,项目名称:XSStrike,代码行数:23,代码来源:arjun.py

示例4: retireJs

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def retireJs(url, response):
    scripts = js_extractor(response)
    for script in scripts:
        if script not in getVar('checkedScripts'):
            updateVar('checkedScripts', script, 'add')
            uri = handle_anchor(url, script)
            response = requester(uri, '', getVar('headers'), True, getVar('delay'), getVar('timeout')).text
            result = main_scanner(uri, response)
            if result:
                logger.red_line()
                logger.good('Vulnerable component: ' + result['component'] + ' v' + result['version'])
                logger.info('Component location: %s' % uri)
                details = result['vulnerabilities']
                logger.info('Total vulnerabilities: %i' % len(details))
                for detail in details:
                    logger.info('%sSummary:%s %s' % (green, end, detail['identifiers']['summary']))
                    logger.info('Severity: %s' % detail['severity'])
                    logger.info('CVE: %s' % detail['identifiers']['CVE'][0])
                logger.red_line() 
开发者ID:s0md3v,项目名称:XSStrike,代码行数:21,代码来源:retireJs.py

示例5: run

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def run():
	try:
		try:
			socket.setdefaulttimeout(float(variables['timeout'][0]))
		except ValueError:
			printError('Invalid timeout!')
			return ModuleError("Invalid timeout!")
		conn = http.client.HTTPConnection(variables['target'][0])
		conn.request("HEAD","/index.html")
		res = conn.getresponse()
		results = res.getheaders()
		print('')
		for item in results:
			print(colors.yellow+item[0], item[1]+colors.end)
		print('')
		return results
	except http.client.InvalidURL:
		printError('Invalid URL!')
		return ("Invalid URL!")
	except socket.gaierror:
		printError('Name or service not known!')
		return ModuleError("Name or service not known!")
	except socket.timeout:
		printError('Timeout!')
		return ModuleError("Timeout!") 
开发者ID:entynetproject,项目名称:arissploit,代码行数:27,代码来源:webserver_scout.py

示例6: modules

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def modules(self, args):
		t = PrettyTable([colors.bold+'Modules:', ''+colors.end])
		t.align = 'l'
		t.valing = 'm'
		t.border = False
		xml = moddbparser.parsemoddb()
		root = xml[0]
		for category in root:
			if category.tag == "category":
				t.add_row(["", ""])
				t.add_row([colors.red+colors.uline+category.attrib["name"]+colors.end, colors.red+colors.uline+"Description"+colors.end])

			for item in category:
				if item.tag == "module":
					for child in item:
						if child.tag == "shortdesc":
							t.add_row([item.attrib["name"], child.text])
							break
		print("")
		print(t)
		print("") 
开发者ID:entynetproject,项目名称:arissploit,代码行数:23,代码来源:cmethods.py

示例7: run

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def run(self, args):
		if self.mm.moduleLoaded == 1:
			try:
				return self.modadd.run()

			except KeyboardInterrupt:
				print("\033[1;31m[-]\033[0m Module terminated!"+colors.end)
			except PermissionError:
				printError("Permission denied!")
				return "[-] Permission denied!"
			except:
				print("\033[1;31m[-]\033[0m Unexpected error in module:\n")
				traceback.print_exc(file=sys.stdout)
				print(colors.end)
				if api.enabled == True:
					raise
		else:
			raise UnknownCommand("\033[1;31m[-]\033[0m Module is not loaded!") 
开发者ID:entynetproject,项目名称:arissploit,代码行数:20,代码来源:cmethods.py

示例8: set

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def set(self, args):
		try:
			self.modadd.variables[args[0]][0] = args[1]
			print(colors.bold+args[0] +" ==> "+ str(args[1]) + colors.end)

		except (NameError, KeyError):
			print("\033[1;31m[-]\033[0m Option is not found!")
			raise VariableError("\033[1;31m[-]\033[0m Option is not found!")
		except IndexError:
			print("\033[1;31m[-]\033[0m Invalid value!")
			raise VariableError("\033[1;31m[-]\033[0m Invalid value!")
		except:
			print("\033[1;31m[-]\033[0m Unexpected error in module:\n")
			traceback.print_exc(file=sys.stdout)
			print(colors.end)
			if api.enabled == True:
				raise 
开发者ID:entynetproject,项目名称:arissploit,代码行数:19,代码来源:cmethods.py

示例9: deps

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def deps(self, args):
		if self.mm.moduleLoaded == 0:
			modules = glob.glob(getpath.modules()+"*.py")
			dependencies = []
			for module in modules:
				try:
					modadd = importlib.import_module("modules."+os.path.basename(module).replace(".py", ""))
					for dep in modadd.conf["dependencies"]:
						if dep not in dependencies:
							dependencies.append(dep)
				except ImportError:
					print("\033[1;31m[-]\033[0m ImportError: "+os.path.basename(module).replace(".py", "")+colors.end)
					break
				except KeyError:
					pass
			for dep in dependencies:
				print(dep)
		else:
			try:
				for dep in self.modadd.conf["dependencies"]:
					print(dep)
			except KeyError:
				printWarning("This module does not require any dependencies.") 
开发者ID:entynetproject,项目名称:arissploit,代码行数:25,代码来源:cmethods.py

示例10: mcu

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def mcu(self, command):
		try:
			if command[0] in self.modadd.customcommands.keys():
				call = getattr(self.modadd, command[0])
				try:
					return call(command[1:])
				except Exception as e:
					print("\033[1;31m[-]\033[0m Unexpected error in module:\n")
					traceback.print_exc(file=sys.stdout)
					print(colors.end)
					if api.enabled == True:
						raise
			else:
				raise UnknownCommand("\033[1;31m[-]\033[0m Unrecognized command!")
		except AttributeError:
			raise UnknownCommand("\033[1;31m[-]\033[0m Unrecognized command!")

	# Built-in commands 
开发者ID:entynetproject,项目名称:arissploit,代码行数:20,代码来源:cmethods.py

示例11: challenge

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def challenge():
	try:
		print(colors.green+"\nstarting challenge"+colors.green)
		print(colors.green+"\ntesting modules\n"+colors.green)

		check_modules()
		compile_core()		
		compile_lib()
		check_cmethods()
		compile_api()

		print(colors.green+"test passed!"+colors.end)

		sys.exit(0)

	except SystemExit as e:
		sys.exit(e)

	except:
		print("\033[1;31m[-]\033[0m \ntest not passed!\n")
		traceback.print_exc()
		print(colors.end)
		sys.exit(1) 
开发者ID:entynetproject,项目名称:arissploit,代码行数:25,代码来源:hftest.py

示例12: printoptions

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def printoptions(modadd):
	try:
		print(" ")
		t = PrettyTable([colors.red +'Option', 'Value', 'Description'+colors.end])
		t.add_row(["------","-----","-----------"])
		t.align = 'l'
		t.valing = 'm'
		t.border = False

		for key, val in modadd.variables.items():
				t.add_row([key, val[0], val[1]])

		print (t,'\n')
		try:
			print(modadd.option_notes,'\n')
		except(AttributeError):
			pass

	except Exception as error:
		print("\033[1;31m[-]\033[0m error: module is corrupted\n")
		traceback.print_exc(file=sys.stdout)
		print(colors.end) 
开发者ID:entynetproject,项目名称:arissploit,代码行数:24,代码来源:moduleop.py

示例13: narrower

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [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

示例14: crawl

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [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

示例15: banner

# 需要导入模块: from core import colors [as 别名]
# 或者: from core.colors import end [as 别名]
def banner():
    print ('''
     %s⚡ %sBOLT%s  ⚡%s
    ''' % (yellow, white, yellow, end)) 
开发者ID:s0md3v,项目名称:Bolt,代码行数:6,代码来源:bolt.py


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