Remove -X flag and replace with -m for mirror only

This commit is contained in:
Chris Baal 2016-09-12 17:42:29 -04:00
parent a30ebe3ca1
commit 2ce9b3fd51

View file

@ -72,7 +72,7 @@ function usage()
echo " -u, --update Update exploit database from git." echo " -u, --update Update exploit database from git."
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."
echo " -x, --examine Examine exploit in terminal pager." echo " -x, --examine Examine exploit in terminal pager."
echo " -X Copy exploit to current path and then examine in terminal pager." echo " -m, --mirror Mirror (Copy) exploit to current path."
echo " --colour Disable colour highlighting." echo " --colour Disable colour highlighting."
echo " --id Display EDB-ID value rather than local path." echo " --id Display EDB-ID value rather than local path."
echo echo
@ -187,7 +187,7 @@ done
## Parse short arguments ## Parse short arguments
while getopts "cehjoptuwxX" arg "${ARGS}"; do while getopts "cehjmoptuwx" arg "${ARGS}"; do
if [[ "${arg}" = "?" ]]; then if [[ "${arg}" = "?" ]]; then
usage >&2; usage >&2;
fi fi
@ -196,13 +196,13 @@ while getopts "cehjoptuwxX" arg "${ARGS}"; do
e) EXACT=1;; e) EXACT=1;;
h) usage >&2;; h) usage >&2;;
j) JSON=1;; j) JSON=1;;
m) COPY_EXPLOIT=1;;
o) OVERFLOW=1;; o) OVERFLOW=1;;
p) GETPATH=1;; p) GETPATH=1;;
t) FILEPATH=0;; t) FILEPATH=0;;
u) update;; u) update;;
w) WEBLINK=1;; w) WEBLINK=1;;
x) GETPATH=1; EXAMINE=1;; x) GETPATH=1; EXAMINE=1;;
X) GETPATH=1; EXAMINE=1; COPY_EXPLOIT=1;;
esac esac
shift $(( OPTIND - 1 )) shift $(( OPTIND - 1 ))
done done
@ -239,9 +239,6 @@ if [[ "${GETPATH}" -eq 1 ]]; then
fi fi
if [[ "${EXAMINE}" -eq 1 ]]; then if [[ "${EXAMINE}" -eq 1 ]]; then
if [[ "${COPY_EXPLOIT}" -eq 1 ]]; then
cp ${location} . && echo "Copied exploit to $(pwd)/"
fi
if [[ "${PAGER}" ]]; then if [[ "${PAGER}" ]]; then
/bin/sh -c ${PAGER} ${location} /bin/sh -c ${PAGER} ${location}
elif [[ -f "$(which pager 2> /dev/null)" ]]; then elif [[ -f "$(which pager 2> /dev/null)" ]]; then
@ -262,6 +259,13 @@ if [[ "${GETPATH}" -eq 1 ]]; then
fi fi
fi fi
if [[ "${COPY_EXPLOIT}" -eq 1 ]]; then
for exploit in $TAGS; do
find ${cvspath} -name ${exploit}'.*' -exec cp {} . \; -exec echo 'Copied {} to '$(pwd) \;
done
exit 0
fi
## If we are doing an exact match, do not check folder path. ## If we are doing an exact match, do not check folder path.
if [[ "${EXACT}" -eq 1 ]]; then if [[ "${EXACT}" -eq 1 ]]; then