We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加两个结构体用于sitemap.xml内容解析
type Sitemap struct { URLs []LocUrl `xml:"url"` Sitemap []LocUrl `xml:"sitemap"` } type LocUrl struct { Loc string `xml:"loc"` }
之后在获取的返回包body后
sitemap := Sitemap{} if err := xml.NewDecoder(strings.NewReader(resp.ToText())).Decode(&sitemap); err != nil { return result, errors.Wrap(err, "could not decode xml") } for _, v := range sitemap.URLs { url, err := urllib.GetURL(regexp.MustCompile(`(/.+)`).FindString(strings.Trim(v.Loc, " \t\n")), *navRequest.URL) if err != nil { continue } request := parse.GetRequest(enums.GET, url) request.Source = enums.FromSitemap _ = callback(request) result = append(result, request) } for _, v := range sitemap.Sitemap { url, err := urllib.GetURL(regexp.MustCompile(`(/.+)`).FindString(strings.Trim(v.Loc, " \t\n")), *navRequest.URL) if err != nil { continue } request := parse.GetRequest(enums.GET, url) request.Source = enums.FromSitemap _ = callback(request) result = append(result, request) } return result, nil
The text was updated successfully, but these errors were encountered:
这个可以参考projectdiscover的katana中的https://github.com/projectdiscovery/katana/blob/main/pkg/engine/parser/files/sitemapxml.go
Sorry, something went wrong.
No branches or pull requests
增加两个结构体用于sitemap.xml内容解析
之后在获取的返回包body后
The text was updated successfully, but these errors were encountered: