Skip to content
New issue

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

Add ability to extract outerHTML of xpath selected element #5128

Open
TomKeyte opened this issue May 1, 2024 · 1 comment
Open

Add ability to extract outerHTML of xpath selected element #5128

TomKeyte opened this issue May 1, 2024 · 1 comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@TomKeyte
Copy link

TomKeyte commented May 1, 2024

Please describe your feature request:

Currently using an xpath extractor you have the option to select either an element or the inner text: https://github.com/projectdiscovery/nuclei/blob/dev/pkg/operators/extractors/extract.go#L87

It would be useful to have an option to extract the outerHtml. This is trivial enough using

value = htmlquery.OutputHTML(node, true)

if a template condition is met.

Describe the use case of this feature:

I would like to modify this template to be able to extract script tags that are not utilising the integrity attribute, but extract the entire elements html and not just the src or innerHTML
https://github.com/projectdiscovery/nuclei-templates/blob/main/http/misconfiguration/missing-sri.yaml

@TomKeyte TomKeyte added the Type: Enhancement Most issues will probably ask for additions or changes. label May 1, 2024
@GeorginaReeder
Copy link

Thanks for your feature request @TomKeyte ! we'll take a look into this :)

We also have a Discord server, which you’re more than welcome to join. It's a great place to connect with fellow contributors and stay updated with the latest developments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

2 participants