mirror of
https://github.com/zu1k/nali.git
synced 2025-03-11 19:02:03 +08:00
Fix the bug of json nested error
This commit is contained in:
parent
3819ae6808
commit
97cde2aa94
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Result struct {
|
type Result struct {
|
||||||
Source string `json:"source"`
|
Source string
|
||||||
common.Result
|
common.Result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ type Entity struct {
|
|||||||
|
|
||||||
Text string `json:"ip"`
|
Text string `json:"ip"`
|
||||||
InfoText string `json:"text"`
|
InfoText string `json:"text"`
|
||||||
|
Source string `json:"source"`
|
||||||
Info interface{} `json:"info"`
|
Info interface{} `json:"info"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,8 @@ func ParseLine(line string) Entities {
|
|||||||
res := db.Find(dbif.QueryType(e.Type), e.Text)
|
res := db.Find(dbif.QueryType(e.Type), e.Text)
|
||||||
if res != nil {
|
if res != nil {
|
||||||
e.InfoText = res.String()
|
e.InfoText = res.String()
|
||||||
e.Info = res
|
e.Info = res.Result
|
||||||
|
e.Source = res.Source
|
||||||
es = append(es, e)
|
es = append(es, e)
|
||||||
idx = e.Loc[1]
|
idx = e.Loc[1]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user