From c53ef7dcdaa90ff385e69d946754706c55621621 Mon Sep 17 00:00:00 2001 From: SkyperTHC Date: Sat, 16 Dec 2023 07:04:05 +0000 Subject: [PATCH] color --- tools/whatserver.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/whatserver.sh b/tools/whatserver.sh index 328f759..94b166f 100755 --- a/tools/whatserver.sh +++ b/tools/whatserver.sh @@ -3,6 +3,12 @@ # Script to quickly find juicy targets. Often used in combination with gsexecio to # retrieve information from all hosts: # cat secrets.txt | parallel -j50 'cat whatserver.sh | exec gsexecio {} >whatserver-{}.log' +# +# Use `less -R whatserver.log` to display the log files with color. +# Use `cat whatserver.log | sed -e 's/\x1b\[[0-9;]*m//g'` to remove colors. + +# NOCOLOR=1 # un-comment this line to disable colors + : <<-'COMMENT' # Extracting all domain names from all log files and displaying them with @@ -35,8 +41,6 @@ find . -name 'whatserver*.log' | while read fn; do done | anew | column -t -s'|' -o' | ' COMMENT -# NOCOLOR=1 # un-comment this line to disable colors - [[ -z $NOCOLOR ]] && { CY="\e[1;33m" # yellow CG="\e[1;32m" # green