offensive-security / exploitdb

The legacy Exploit Database repository - New repo located at https://gitlab.com/exploit-database/exploitdb
https://gitlab.com/exploit-database/exploitdb
GNU General Public License v2.0
7.74k stars 1.88k forks source link

Please rework the --colour option #203

Closed saladpanda closed 2 years ago

saladpanda commented 3 years ago

I find the --colour option to be very confusing and mostly unnecessary.

Confusing because: specifying --colour actually disables colored output. This is extremely counterintuitive!

Additionally it is possible to detect whether the tools output goes to a terminal or to a pipe and therefore automatically decide whether or not to enable colored output. This is exactly what grep and other gnu-tools are doing with the default --color=auto.

It would be nice if you could either remove the --colour option completely and replace it by auto-detection or reimplement it in a similar fashion as the gnu tools.

For the time being I wrote myself a wrapper-script that does the detection for me and put it into ~/bin/searchsploit:

#!/bin/bash

if [ -t 1 ]
then
    # output to terminal - enable colors
    /usr/bin/searchsploit "$@"
else
    # output to pipe - disable colors
    /usr/bin/searchsploit --colour "$@"
fi
offensive-security commented 2 years ago

Sorry for the delay. Thank you for the feedback.

We have switched it from --colour to now --disable-colour-.

You should be able to get updates now from: https://gitlab.com/exploit-database/exploitdb If you are still having issues, open up a ticket here: https://gitlab.com/exploit-database/exploitdb/-/issues