Skip to content

Commit

Permalink
这是一个临时版本替换type字段
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells committed Jun 20, 2023
1 parent 0e6a262 commit bd52f81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/fofa/fofa_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (f *FoFa) fetchByFields(fields string, queryStr string) bool {

// FetchFullHostInfo 提取完整带协议的字段
func (f *FoFa) FetchFullHostInfo(queryStr string) bool {
return f.fetchByFields("protocol,ip,port,host,type", queryStr)
return f.fetchByFields("protocol,ip,port,host,city", queryStr)
}

// FetchOneField 提取指定的字段
Expand All @@ -183,12 +183,12 @@ func (f *FoFa) FetchField(field, queryStr string) bool {

// FetchTitlesOfDomain 提取 title
func (f *FoFa) FetchTitlesOfDomain(queryStr string) bool {
return f.fetchByFields("protocol,ip,port,host,type,title,country", queryStr)
return f.fetchByFields("protocol,ip,port,host,city,title,country", queryStr)
}

// FetchJarmOfDomain 提取 title
func (f *FoFa) FetchJarmOfDomain(queryStr string) bool {
return f.fetchByFields("protocol,ip,port,host,type,jarm,country", queryStr)
return f.fetchByFields("protocol,ip,port,host,city,jarm,country", queryStr)
}

func (f *FoFa) Fetch(queryStr string) bool {
Expand Down
2 changes: 1 addition & 1 deletion internal/runner/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (r *Runner) Run() *sync.Map {
r.resMap.LoadOrStore(strings.Join(fields[:len(fields)-1], r.options.FetchFieldsSplit), nil)
return true
}
fo.FetchField(r.options.FetchFields+",type", fofaQuery)
fo.FetchField(r.options.FetchFields+",city", fofaQuery)
} else {
fo.FetchFn = func(fields []string, allSize int32) bool {
fullUrl, err := utils.NewFixUrl(strings.TrimSpace(fields[0]))
Expand Down

0 comments on commit bd52f81

Please sign in to comment.