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

Two new filters && Output optimization #1322

Closed
wants to merge 3 commits into from

Conversation

gorgiaxx
Copy link

@gorgiaxx gorgiaxx commented Aug 15, 2023

I previously used an inappropriate branch, and now I've resubmitted the code using the 'dev' branch.

If someone adds '\n' within the HTML title tag, it could lead to abnormal line outputs.

https://xxxxx [301] [301
Moved Permanently] [nginx/1.23.1] [111.203.158.238]

Using regular expressions for replacement wasn't convenient enough, so I added two filters.

  • Response server header
  • HTML titlez

Before

-fe '(Server: (Tengine|stgw))|(<title>(WAF|Firewall)</title>)'

After

-fsh Tengine,stgw -ftt WAF,Firewall

@ehsandeep
Copy link
Member

@gorgiaxx, thanks for creating this PR, You have raised a valid issue, but this PR doesn't seem to solve the existing problem, instead of adding a new option, we can try to improve the existing option.

Copy link
Member

@dogancanbakir dogancanbakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gorgiaxx,
Thank you for your contribution and for bringing this to our attention! As noted by @ehsandeep, we already have options that can handle filtering and matching conditions specified with the -fdc and -mdc flags, respectively. Instead of adding new options, it would be more helpful to improve the existing -mdc and -fdc options to address the issues that have been identified.

Feel free to reach out if you have any questions or need further clarification.

@ehsandeep
Copy link
Member

@gorgiaxx please feel free to create with host/example so we can work on fixing the existing issue, we are trying to add new options unless it's really needed to avoid the greater number of options this tool has.

@ehsandeep ehsandeep closed this Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants