Example #1
0
class TaskPlugins(BaseModel):
    """扫描插件表,自动更新"""
    vulid       = orm.ForeignKeyField(Vulnerable, related_name = 'TaskPlugins_vulid', null = True) #每个插件对应一个漏洞
    plug_name   = orm.CharField(unique = True)                      #插件名称
    plug_desc   = orm.CharField(null=True, default = '')            #插件描述
    plug_type   = orm.CharField(null=True, default = '')            #插件类型 1-host,2-web,3-http
    plug_file   = orm.CharField(null=True, default = '')            #插件文件名、路径
    plug_stat   = orm.BooleanField(default = True)                  #是否启用
    updatedate  = orm.CharField(default = datetime.datetime.now)
Example #2
0
class BugFlow(BaseModel):
    '''漏洞跟踪表'''
    fid         = orm.PrimaryKeyField()                                        #跟踪自身id
    flowid      = orm.ForeignKeyField(BugResult, related_name='flowvulresult') #跟踪识别id
    flowname    = orm.ForeignKeyField(User, related_name='flowcontact')        #审批人员
    backstep    = orm.IntegerField(default = 0)                                #前一步流程ID
    nextstep    = orm.CharField(null = True, default = '')                     #后一步流程ID
    flowstate   = orm.BooleanField(default = True)                             #是否通过
    flownote    = orm.CharField(null = True)                                   #处理意见
    createdate  = orm.DateTimeField(default = datetime.datetime.now)
Example #3
0
class PortResult(BaseModel):
    '''端口扫描结果'''
    hostid      = orm.ForeignKeyField(HostResult, related_name = 'PortResult_hostid',null = True,)
    host        = orm.CharField()                                #主机ip
    port        = orm.CharField()                                #主机端口
    port_type   = orm.CharField(null = True, default = '')       #端口类型 tcp/udp
    port_state  = orm.CharField(null = True, default = '')       #端口状态 open/close/filter
    service_name= orm.CharField(null = True, default = '')       #服务名称 http/mssql/ssh 。。
    soft_name   = orm.CharField(null = True, default = '')       #中间件名称
    soft_type   = orm.CharField(null = True, default = '')       #中间件类型
    soft_ver    = orm.CharField(null = True, default = '')       #中间件版本
    response    = orm.TextField(null = True, default = '')       #原始返回包
    isconfirm   = orm.BooleanField(default = False)              #人工审核
    updatedate  = orm.DateTimeField(default = datetime.datetime.now)
Example #4
0
class ScanHostPortTemp(BaseModel):
    '''扫描任务结果临时表'''
    taskid      = orm.ForeignKeyField(ScanTask, related_name = 'HostResult_taskid',null = True,)
    host_id     = orm.CharField(unique = True, max_length = 32, default = generateid)
    host        = orm.CharField()                                #主机ip地址
    port        = orm.CharField()                                #主机端口
    host_name   = orm.CharField(null = True, default = '')       #主机名
    os_type     = orm.CharField(null = True, default = '')       #系统类型
    os_version  = orm.CharField(null = True, default = '')       #系统版本
    mac_addr    = orm.CharField(null = True, default = '')       #mac地址
    phy_addr    = orm.CharField(null = True, default = '')       #物理地址
    port_type   = orm.CharField(null = True, default = '')       #端口类型 tcp/udp
    port_state  = orm.CharField(null = True, default = '')       #端口状态 open/close/filter
    service_name= orm.CharField(null = True, default = '')       #服务名称 http/mssql/ssh 。。
    soft_name   = orm.CharField(null = True, default = '')       #中间件名称
    soft_type   = orm.CharField(null = True, default = '')       #中间件类型
    soft_ver    = orm.CharField(null = True, default = '')       #中间件版本
    response    = orm.TextField(null = True, default = '')       #原始返回包
    isconfirm   = orm.BooleanField(default = False)              #人工审核
    updatedate  = orm.DateTimeField(default = datetime.datetime.now)