From 69c78ee864c6c0bcf54a17303ffa5ee2aa39fa09 Mon Sep 17 00:00:00 2001 From: shaochuyu <1040641785@qq.com> Date: Fri, 3 Nov 2023 15:39:40 +0800 Subject: [PATCH] Optimization of 360Quake Subdomain Query 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. --- v2/pkg/subscraping/sources/quake/quake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/pkg/subscraping/sources/quake/quake.go b/v2/pkg/subscraping/sources/quake/quake.go index 7aaa74895..075d35e13 100644 --- a/v2/pkg/subscraping/sources/quake/quake.go +++ b/v2/pkg/subscraping/sources/quake/quake.go @@ -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))