Merge branch 'ui-tweak' of https://github.com/prurigro/exploit-database into prurigro-ui-tweak

This commit is contained in:
Offensive Security 2014-12-10 17:39:38 +00:00
commit f19fa32536

View file

@ -23,23 +23,22 @@ fi
# usage info # usage info
function usage() function usage()
{ {
echo "Usage: $progname [options] term1 [term2] ... [termN]" echo "Usage : $progname [OPTIONS] term1 [term2] ... [termN]"
echo "Example: $progname oracle windows local" echo "Example: $progname oracle windows local"
echo echo
echo "=======" echo "========="
echo "Options" echo " OPTIONS "
echo "=======" 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
echo " -c Perform case-sensitive searches; by default, searches will" echo "NOTES:"
echo " try to be greedy" echo " - Use any number of search terms you would like (minimum: 1)"
echo " -h, --help Show help screen" echo " - Search terms are not case sensitive, and order is irrelevant"
echo " -v By setting verbose output, description lines are allowed to" exit 0
echo " overflow their columns"
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
} }
# dynamically set column widths # dynamically set column widths
@ -80,10 +79,13 @@ while getopts "chv" arg $ARGS; do
done done
# print header # print header
printf "%-${COL1}s %s" " Description" printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
printf "%-${COL1}s |%s" " Description"
echo " Path" echo " Path"
printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}` printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n " " echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}` printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
echo echo
@ -110,4 +112,9 @@ fi
| awk -F "\"*,\"*" '{ printf "%-'$FORMAT's | %s\n", $3, $2}' \ | awk -F "\"*,\"*" '{ printf "%-'$FORMAT's | %s\n", $3, $2}' \
| sed " s/| platforms/| /" \ | sed " s/| platforms/| /" \
| eval $SEARCH | eval $SEARCH
printf "%0.s-" `eval echo {1..$(( $COL1 + 1 ))}`
echo -n "|"
printf "%0.s-" `eval echo {1..$(( $COL2 - 1 ))}`
exit 0 exit 0