-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
34 lines (31 loc) · 1.41 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"context"
"fmt"
"github.com/jinycoo/go-quake/quake"
)
func main() {
var ctx = context.Background()
client := quake.NewQuakeClient(nil)
//res, err := client.HostSearch(ctx, `service:"http/ssl"`, 1, 10, false, false)
//res, err := client.ServiceIPListDepthSearch(ctx, `2.233.127.6,2.229.167.121`, "611f5974c35468ee50bac1c3" , 10, false)
//res, err := client.ServiceIPRuleDepthSearch(ctx, `scan`, "" , 10, false)
//res, err := client.ServiceDepthSearch(ctx, `service:"http/ssl"`, "" , 10, false)
//res, err := client.ServiceIPRuleSearchAgg(ctx, `scan`, 10, []string{"service", "asn"}, false)
//res, err := client.ServiceIPListSearchAgg(ctx, `2.233.127.6,2.229.167.121`, 10, []string{"service", "asn"}, false)
//res, err := client.ServiceSearchAgg(ctx, `service:"http/ssl"`, 10, []string{"service", "asn"}, false)
//res, err := client.GetServiceAggFields(ctx)
//res, err := client.ServiceIPListSearch(ctx, `2.233.127.6,2.229.167.121`, 1, 10, false, false)
//res, err := client.ServiceIPRuleSearch(ctx, `scan`, 1, 10, false, false)
//res, err := client.ServiceSearch(ctx, `service:"http/ssl"`, 1, 10, false, false)
res, err := client.GetVulnInfo(ctx, `CNNVD-199612-001`)
//res, err := client.GetUserInfo(ctx)
//res, err := client.GetVendors(ctx, "Huawei华为技术有限公司")
if res != nil {
for _, asset := range res.VulCpe {
fmt.Println(asset)
}
}
fmt.Println(err)
//fmt.Println(res, err)
}