Skip to content

Commit

Permalink
Optimization of 360Quake Subdomain Query
Browse files Browse the repository at this point in the history
The wildcard query for sub-domains is slow, and it's more efficient to directly enter the root domain name. For Quake, this kind of search is more efficient and reduces the load on our cluster.
  • Loading branch information
chushuai authored Nov 3, 2023
1 parent 8983cf8 commit 69c78ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/pkg/subscraping/sources/quake/quake.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s *Source) Run(ctx context.Context, domain string, session *subscraping.Se
}

// quake api doc https://quake.360.cn/quake/#/help
var requestBody = []byte(fmt.Sprintf(`{"query":"domain: *.%s", "include":["service.http.host"], "latest": true, "start":0, "size":500}`, domain))
var requestBody = []byte(fmt.Sprintf(`{"query":"domain: %s", "include":["service.http.host"], "latest": true, "start":0, "size":500}`, domain))
resp, err := session.Post(ctx, "https://quake.360.net/api/v3/search/quake_service", "", map[string]string{
"Content-Type": "application/json", "X-QuakeToken": randomApiKey,
}, bytes.NewReader(requestBody))
Expand Down

0 comments on commit 69c78ee

Please sign in to comment.