From 32edeb43421c517ccfcdad07f2fa062170f83f10 Mon Sep 17 00:00:00 2001 From: g0tmi1k Date: Wed, 8 Jul 2015 21:24:00 +0100 Subject: [PATCH] Switching -f with -t (--file to --title) Search just the exploit title (Default is title AND the file's path) --- searchsploit | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/searchsploit b/searchsploit index 3d0a937c8..ffe0ffc55 100755 --- a/searchsploit +++ b/searchsploit @@ -25,7 +25,7 @@ VERBOSE=0 WEBLINK=0 EDBID=0 COLOUR='true' -FILEPATH=0 +FILEPATH=1 ## If files.csv is in the searchsploit path, use that instead @@ -46,8 +46,8 @@ function usage() echo " Options " echo "=========" echo " -c, --case Perform a case-sensitive search (Default is insensitive)." - echo " -f, --file Include file's path when searching (Default is just the exploit title)." echo " -h, --help Show this help screen." + echo " -t, --title Search just the exploit title (Default is title AND the file's path)." echo " -u, --update Update exploit database from git." echo " -v, --verbose Verbose output. Title lines are allowed to overflow their columns." echo " -w, --www Show URLs to Exploit-DB.com rather than local path." @@ -87,22 +87,22 @@ fi ## Parse long arguments ARGS="-" for param in "$@"; do - if [[ "${param}" == "--help" ]]; then - usage >&2 - elif [[ "${param}" == "--web" ]]; then - WEBLINK=1 - elif [[ "${param}" == "--case" ]]; then + if [[ "${param}" == "--case" ]]; then SCASE='' + elif [[ "${param}" == "--help" ]]; then + usage >&2 + elif [[ "${param}" == "--title" ]]; then + FILEPATH=0 elif [[ "${param}" == "--update" ]]; then UPDATE=1 + elif [[ "${param}" == "--www" ]]; then + WEBLINK=1 elif [[ "${param}" == "--verbose" ]]; then VERBOSE=1 - elif [[ "${param}" == "--id" ]]; then - EDBID=1 - elif [[ "${param}" == "--file" ]]; then - FILEPATH=1 elif [[ "${param}" == "--colour" ]] || [[ "${param}" == "--color" ]]; then COLOUR='' + elif [[ "${param}" == "--id" ]]; then + EDBID=1 else if [[ "${param:0:1}" == "-" ]]; then ARGS=${ARGS}${param:1} @@ -122,10 +122,10 @@ while getopts "uchvwf" arg "${ARGS}"; do case ${arg} in c) SCASE='';; h) usage >&2;; + t) FILEPATH=0;; u) UPDATE=1;; v) VERBOSE=1;; - w) WEBLINK=1;; - f) FILEPATH=1;; + w) WEBLINK=1;;y esac shift $(( OPTIND - 1 )) done @@ -159,7 +159,7 @@ if [[ "${UPDATE}" -eq 1 ]]; then git pull origin master fi - echo "Update finished." + echo "[*] Update finished." exit 6 fi