Skip to content

Commit

Permalink
refactor: Revise bevigil workings
Browse files Browse the repository at this point in the history
  • Loading branch information
enenumxela committed Jul 26, 2023
1 parent d0bcea6 commit c7c8615
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/xurlfind3r/sources/bevigil/bevigil.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,7 @@ import (
"github.com/valyala/fasthttp"
)

type response struct {
type getURLsResponse struct {
Domain string `json:"domain"`
URLs []string `json:"urls"`
}
Expand Down Expand Up @@ -46,13 46,13 @@ func (source *Source) Run(config *sources.Configuration, domain string) (URLsCha
return
}

var responseData response
var getURLsResponseData getURLsResponse

if err = json.Unmarshal(res.Body(), &responseData); err != nil {
if err = json.Unmarshal(res.Body(), &getURLsResponseData); err != nil {
return
}

for _, URL := range responseData.URLs {
for _, URL := range getURLsResponseData.URLs {
if !sources.IsInScope(URL, domain, config.IncludeSubdomains) {
return
}
Expand Down

0 comments on commit c7c8615

Please sign in to comment.