From 171223a3edbf2813c2141b8d0843c311129268bc Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Fri, 8 Aug 2014 12:36:29 -0400 Subject: [PATCH] Made some minor updates to the UI for (imo) better formatting --- searchsploit | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/searchsploit b/searchsploit index 166ae4764..794dfaa98 100755 --- a/searchsploit +++ b/searchsploit @@ -17,23 +17,22 @@ fi # usage info function usage() { - echo "Usage: $progname [options] term1 [term2] ... [termN]" + echo "Usage : $progname [OPTIONS] term1 [term2] ... [termN]" echo "Example: $progname oracle windows local" - echo - echo "=======" - echo "Options" - echo "=======" echo - echo " -c Perform case-sensitive searches; by default, searches will" - echo " try to be greedy" - echo " -h, --help Show help screen" - echo " -v By setting verbose output, description lines are allowed to" - echo " overflow their columns" + echo "=========" + echo " OPTIONS " + echo "=========" + echo " -c - Perform case-sensitive searches; by default," + echo " searches will try to be greedy" + echo " -v - By setting verbose output, description lines" + echo " are allowed to overflow their columns" + echo " -h, --help - Show help screen" echo - echo "*NOTES*" - echo "Use any number of search terms you would like (minimum of one)." - echo "Search terms are not case sensitive, and order is irrelevant." - exit 1 + echo "NOTES:" + echo " - Use any number of search terms you would like (minimum: 1)" + echo " - Search terms are not case sensitive, and order is irrelevant" + exit 0 } # dynamically set column widths @@ -74,10 +73,13 @@ while getopts "chv" arg $ARGS; do done # print header -printf "%-${COL1}s %s" " Description" -echo " Path" printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` -echo -n " " +echo -n "|" +printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` +printf "%-${COL1}s |%s" " Description" +echo " Path" +printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` +echo -n "|" printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` echo @@ -104,4 +106,9 @@ fi | awk -F "\"*,\"*" '{ printf "%-'$FORMAT's | %s\n", $3, $2}' \ | sed " s/| platforms/| /" \ | eval $SEARCH + +printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` +echo -n "|" +printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` + exit 0