EnableSecurity / wafw00f

WAFW00F allows one to identify and fingerprint Web Application Firewall (WAF) products protecting a website.
https://www.enablesecurity.com/
BSD 3-Clause "New" or "Revised" License
5.17k stars 924 forks source link

Added an option to disable colors from output. #163

Closed ldcvanderpoel closed 1 year ago

ldcvanderpoel commented 2 years ago

ANSI colors in the output interfere with the automatic processing of results. I've added a CLI option to disable colors (--no-colors).

This required me to also make changes to how the ANSI colors are stored. They were originally directly imported from asciiarts.py, but this makes controlling these values more difficult. I've therefore added a Color dataclass and added a disable() classmethod. In order to preserve the rest of the functionality, and maintain the brevity of using single letters for colors, I've added an unpack() function that can be used to declare colors where needed locally.

Which category is this pull request?

Where has this been tested?

Does this close any currently open issues?

No.

Does this add any new dependency?

No.

Does this add any new command line switch/argument?

Yes, this PR includes the --no-colors or -C CLI argument.

Any other comments you would like to make?

Thank you for developing wafw00f. I use it frequently during security assessments.

0xInfection commented 1 year ago

Tested this and this looks good! Thanks for the PR @ldcvanderpoel.