1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 13:19:02 +08:00

Fix the bug of json nested error

This commit is contained in:
M09Ic 2023-05-20 18:12:31 +08:00
parent 3819ae6808
commit 97cde2aa94
3 changed files with 4 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import (
)
type Result struct {
Source string `json:"source"`
Source string
common.Result
}

View File

@ -24,6 +24,7 @@ type Entity struct {
Text string `json:"ip"`
InfoText string `json:"text"`
Source string `json:"source"`
Info interface{} `json:"info"`
}

View File

@ -58,7 +58,8 @@ func ParseLine(line string) Entities {
res := db.Find(dbif.QueryType(e.Type), e.Text)
if res != nil {
e.InfoText = res.String()
e.Info = res
e.Info = res.Result
e.Source = res.Source
es = append(es, e)
idx = e.Loc[1]
}