Switching -f with -t (--file to --title)
Search just the exploit title (Default is title AND the file's path)
This commit is contained in:
parent
91c236ab2c
commit
32edeb4342
1 changed files with 14 additions and 14 deletions
28
searchsploit
28
searchsploit
|
@ -25,7 +25,7 @@ VERBOSE=0
|
||||||
WEBLINK=0
|
WEBLINK=0
|
||||||
EDBID=0
|
EDBID=0
|
||||||
COLOUR='true'
|
COLOUR='true'
|
||||||
FILEPATH=0
|
FILEPATH=1
|
||||||
|
|
||||||
|
|
||||||
## If files.csv is in the searchsploit path, use that instead
|
## If files.csv is in the searchsploit path, use that instead
|
||||||
|
@ -46,8 +46,8 @@ function usage()
|
||||||
echo " Options "
|
echo " Options "
|
||||||
echo "========="
|
echo "========="
|
||||||
echo " -c, --case Perform a case-sensitive search (Default is insensitive)."
|
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 " -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 " -u, --update Update exploit database from git."
|
||||||
echo " -v, --verbose Verbose output. Title lines are allowed to overflow their columns."
|
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."
|
echo " -w, --www Show URLs to Exploit-DB.com rather than local path."
|
||||||
|
@ -87,22 +87,22 @@ fi
|
||||||
## Parse long arguments
|
## Parse long arguments
|
||||||
ARGS="-"
|
ARGS="-"
|
||||||
for param in "$@"; do
|
for param in "$@"; do
|
||||||
if [[ "${param}" == "--help" ]]; then
|
if [[ "${param}" == "--case" ]]; then
|
||||||
usage >&2
|
|
||||||
elif [[ "${param}" == "--web" ]]; then
|
|
||||||
WEBLINK=1
|
|
||||||
elif [[ "${param}" == "--case" ]]; then
|
|
||||||
SCASE=''
|
SCASE=''
|
||||||
|
elif [[ "${param}" == "--help" ]]; then
|
||||||
|
usage >&2
|
||||||
|
elif [[ "${param}" == "--title" ]]; then
|
||||||
|
FILEPATH=0
|
||||||
elif [[ "${param}" == "--update" ]]; then
|
elif [[ "${param}" == "--update" ]]; then
|
||||||
UPDATE=1
|
UPDATE=1
|
||||||
|
elif [[ "${param}" == "--www" ]]; then
|
||||||
|
WEBLINK=1
|
||||||
elif [[ "${param}" == "--verbose" ]]; then
|
elif [[ "${param}" == "--verbose" ]]; then
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
elif [[ "${param}" == "--id" ]]; then
|
|
||||||
EDBID=1
|
|
||||||
elif [[ "${param}" == "--file" ]]; then
|
|
||||||
FILEPATH=1
|
|
||||||
elif [[ "${param}" == "--colour" ]] || [[ "${param}" == "--color" ]]; then
|
elif [[ "${param}" == "--colour" ]] || [[ "${param}" == "--color" ]]; then
|
||||||
COLOUR=''
|
COLOUR=''
|
||||||
|
elif [[ "${param}" == "--id" ]]; then
|
||||||
|
EDBID=1
|
||||||
else
|
else
|
||||||
if [[ "${param:0:1}" == "-" ]]; then
|
if [[ "${param:0:1}" == "-" ]]; then
|
||||||
ARGS=${ARGS}${param:1}
|
ARGS=${ARGS}${param:1}
|
||||||
|
@ -122,10 +122,10 @@ while getopts "uchvwf" arg "${ARGS}"; do
|
||||||
case ${arg} in
|
case ${arg} in
|
||||||
c) SCASE='';;
|
c) SCASE='';;
|
||||||
h) usage >&2;;
|
h) usage >&2;;
|
||||||
|
t) FILEPATH=0;;
|
||||||
u) UPDATE=1;;
|
u) UPDATE=1;;
|
||||||
v) VERBOSE=1;;
|
v) VERBOSE=1;;
|
||||||
w) WEBLINK=1;;
|
w) WEBLINK=1;;y
|
||||||
f) FILEPATH=1;;
|
|
||||||
esac
|
esac
|
||||||
shift $(( OPTIND - 1 ))
|
shift $(( OPTIND - 1 ))
|
||||||
done
|
done
|
||||||
|
@ -159,7 +159,7 @@ if [[ "${UPDATE}" -eq 1 ]]; then
|
||||||
git pull origin master
|
git pull origin master
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Update finished."
|
echo "[*] Update finished."
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue