13m0n4de / scanner-demo

scanner demo, FastAPI + Dramatiq
0 stars 0 forks source link

更加丰富的 ScanResult #4

Closed 13m0n4de closed 1 year ago

13m0n4de commented 1 year ago

目前模型结构:

https://github.com/13m0n4de/fastapi-dramatiq-demo/blob/44161b7bd2f862bc1326928829f64607431af443/app/models/results.py#L6-L15

JSON 是这样:

    {
      "ip": "172.22.0.4",
      "ports": [
        {
          "port": 5000,
          "protocol": "tcp",
          "service": "uvicorn",
          "vulnerabilities": []
        }
      ]
    }

service 计划设置为更丰富的类型,而不是一个简单的字符串。 整体为一个列表,列表中为 ServiceResult,可能包含以下字段:

可能不同服务种类要有不同的字段来显示更多特征,比如 web 服务要显示 title 或者 headers,但是目前还没有想好怎么组织字段,也许要针对几个大类创建 WebServiceDetail 或者 WebServiceResult 等等了。

vulnerabilities 也是一样。

13m0n4de commented 1 year ago

ScanResult 被重新设计为 PortScanResultServiceScanResult 等分类结果形式。见 #10