diff --git a/pkg/sdk/index.go b/pkg/sdk/index.go index f0961cc..3e27b7c 100644 --- a/pkg/sdk/index.go +++ b/pkg/sdk/index.go @@ -20,6 +20,7 @@ type IndexQueryParameters struct { LastModEndDate string `json:"lastModEndDate"` PubStartDate string `json:"pubStartDate"` PubEndDate string `json:"pubEndDate"` + Date string `json:"date"` ThreatActor string `json:"threat_actor"` MitreId string `json:"mitre_id"` MispId string `json:"misp_id"` @@ -36,6 +37,8 @@ type IndexQueryParameters struct { Jvndb string `json:"jvndb"` SrcCountry string `json:"src_country"` DstCountry string `json:"dst_country"` + SourceIP string `json:"src_ip"` + SourceASN string `json:"src_asn"` // PAGINATION RELATED Limit int `json:"limit"` @@ -104,6 +107,9 @@ func setIndexQueryParameters(query url.Values, queryParameters ...IndexQueryPara if queryParameter.PubEndDate != "" { query.Add("pubEndDate", queryParameter.PubEndDate) } + if queryParameter.Date != "" { + query.Add("date", queryParameter.Date) + } if queryParameter.ThreatActor != "" { query.Add("threat_actor", queryParameter.ThreatActor) } @@ -152,6 +158,12 @@ func setIndexQueryParameters(query url.Values, queryParameters ...IndexQueryPara if queryParameter.DstCountry != "" { query.Add("dst_country", queryParameter.DstCountry) } + if queryParameter.SourceIP != "" { + query.Add("src_ip", queryParameter.SourceIP) + } + if queryParameter.SourceASN != "" { + query.Add("src_asn", queryParameter.SourceASN) + } // PAGINATION RELATED if queryParameter.Limit != 0 { query.Add("limit", fmt.Sprintf("%d", queryParameter.Limit)) diff --git a/readme.md b/readme.md index eaae7d7..563a7c4 100644 --- a/readme.md +++ b/readme.md @@ -134,12 +134,14 @@ vulncheck index browse|list [flags] | --threat_actor | string | ThreatActor | | --updatedAtEndDate | string | UpdatedAtEndDate | | --updatedAtStartDate | string | UpdatedAtStartDate | +| --date | string | Date | | --src_country | string | SrcCountry | | --dst_country | string | DstCountry | +| --src_ip | string | SrcIp | +| --src_asn | string | SrcASN | | --help | | Show help for command | - ### Download a backup Download a backup of a specified index either interactively or retrieve a signed temporary URL