本文整理汇总了Python中model.common.factory.generateID函数的典型用法代码示例。如果您正苦于以下问题:Python generateID函数的具体用法?Python generateID怎么用?Python generateID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generateID函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createAndAddCredToService
def createAndAddCredToService(self, host_id, service_id, username,
password):
self.__addPendingAction(modelactions.CADDCREDSRV, host_id, service_id,
username, password)
return factory.generateID(
ModelObjectCred.class_signature,
username=username, password=password, parent_id=service_id)
示例2: createAndAddServiceToInterface
def createAndAddServiceToInterface(self, host_id, interface_id, name, protocol = "tcp?",
ports = [], status = "running", version = "unknown", description = ""):
self.__addPendingAction(modelactions.CADDSERVICEINT, host_id, interface_id, name, protocol,
ports, status, version, description)
return factory.generateID(
Service.class_signature,
name=name, protocol=protocol, ports=ports,
status=status, version=version, description=description, parent_id=interface_id)
示例3: createAndAddVulnToHost
def createAndAddVulnToHost(self, host_id, name, desc="", ref=[],
severity="", resolution=""):
self.__addPendingAction(modelactions.CADDVULNHOST, host_id, name,
desc, ref, severity, resolution)
return factory.generateID(
ModelObjectVuln.class_signature,
name=name, desc=desc, ref=ref, severity=severity,
resolution=resolution, parent_id=host_id)
示例4: createAndAddVulnWebToService
def createAndAddVulnWebToService(self, host_id, service_id, name, desc="", ref=[], severity="", website="", path="", request="",
response="",method="",pname="", params="",query="",category=""):
self.__addPendingAction(modelactions.CADDVULNWEBSRV, host_id, service_id, name, desc, ref, severity, website, path, request, response,
method,pname, params,query,category)
return factory.generateID(
ModelObjectVulnWeb.class_signature,
name=name, desc=desc, ref=ref, severity=severity,
website=website, path=path, request=request, response=response,
method=method, pname=pname, params=params, query=query,
category=category, parent_id=service_id)
示例5: createAndAddInterface
def createAndAddInterface(self, host_id, name = "", mac = "00:00:00:00:00:00",
ipv4_address = "0.0.0.0", ipv4_mask = "0.0.0.0",
ipv4_gateway = "0.0.0.0", ipv4_dns = [],
ipv6_address = "0000:0000:0000:0000:0000:0000:0000:0000", ipv6_prefix = "00",
ipv6_gateway = "0000:0000:0000:0000:0000:0000:0000:0000", ipv6_dns = [],
network_segment = "", hostname_resolution = []):
self.__addPendingAction(modelactions.CADDINTERFACE, host_id, name, mac, ipv4_address,
ipv4_mask, ipv4_gateway, ipv4_dns, ipv6_address, ipv6_prefix, ipv6_gateway, ipv6_dns,
network_segment, hostname_resolution)
return factory.generateID(
Interface.class_signature, parent_id=host_id, name=name, mac=mac,
ipv4_address=ipv4_address, ipv4_mask=ipv4_mask,
ipv4_gateway=ipv4_gateway, ipv4_dns=ipv4_dns,
ipv6_address=ipv6_address, ipv6_prefix=ipv6_prefix,
ipv6_gateway=ipv6_gateway, ipv6_dns=ipv6_dns,
network_segment=network_segment,
hostname_resolution=hostname_resolution)
示例6: createAndAddNoteToNote
def createAndAddNoteToNote(self, host_id, service_id, note_id, name, text):
self.__addPendingAction(modelactions.CADDNOTENOTE, host_id, service_id, note_id, name, text)
return factory.generateID(
ModelObjectNote.class_signature,
name=name, text=text, parent_id=note_id)
示例7: createAndAddHost
def createAndAddHost(self, name, os = "unknown", category = None, update = False, old_hostname = None):
self.__addPendingAction(modelactions.CADDHOST, name, os, category, update, old_hostname)
return factory.generateID(Host.class_signature, name=name, os=os)
示例8: createAndAddVulnToService
def createAndAddVulnToService(self, host_id, service_id, name, desc="", ref=[], severity=""):
self.__addPendingAction(modelactions.CADDVULNSRV, host_id, service_id, name, desc, ref, severity)
return factory.generateID(
ModelObjectVuln.class_signature,
name=name, desc=desc, ref=ref, severity=severity,
parent_id=service_id)