Add "--exclude" to remove values from results
This commit is contained in:
parent
d029dd02ce
commit
2b95b7a760
2 changed files with 19 additions and 3 deletions
|
@ -20,6 +20,7 @@ root@kali:~# searchsploit -h
|
||||||
searchsploit afd windows local
|
searchsploit afd windows local
|
||||||
searchsploit -t oracle windows
|
searchsploit -t oracle windows
|
||||||
searchsploit -p 39446
|
searchsploit -p 39446
|
||||||
|
searchsploit linux kernel 3.2 --exclude="(PoC)|/dos/"
|
||||||
|
|
||||||
For more examples, see the manual: https://www.exploit-db.com/searchsploit/
|
For more examples, see the manual: https://www.exploit-db.com/searchsploit/
|
||||||
|
|
||||||
|
@ -40,7 +41,10 @@ root@kali:~# searchsploit -h
|
||||||
--colour Disable colour highlighting in search results.
|
--colour Disable colour highlighting in search results.
|
||||||
--id Display the EDB-ID value rather than local path.
|
--id Display the EDB-ID value rather than local path.
|
||||||
--nmap [file.xml] Checks all results in Nmap's XML output with service version (e.g.: nmap -sV -oX file.xml).
|
--nmap [file.xml] Checks all results in Nmap's XML output with service version (e.g.: nmap -sV -oX file.xml).
|
||||||
Use "-v" (verbose) to try even more combinations
|
Use "-v" (verbose) to try even more combinations
|
||||||
|
--exclude="term" Remove values from results. By using "|" to separated you can chain multiple values.
|
||||||
|
e.g. --exclude="term1|term2|term3".
|
||||||
|
|
||||||
=======
|
=======
|
||||||
Notes
|
Notes
|
||||||
=======
|
=======
|
||||||
|
@ -50,7 +54,7 @@ root@kali:~# searchsploit -h
|
||||||
* And/Or '-e' if you wish to filter results by using an exact match.
|
* And/Or '-e' if you wish to filter results by using an exact match.
|
||||||
* Use '-t' to exclude the file's path to filter the search results.
|
* Use '-t' to exclude the file's path to filter the search results.
|
||||||
* Remove false positives (especially when searching using numbers - i.e. versions).
|
* Remove false positives (especially when searching using numbers - i.e. versions).
|
||||||
* When updating from git or displaying help, search terms will be ignored.
|
* When updating or displaying help, search terms will be ignored.
|
||||||
|
|
||||||
root@kali:~#
|
root@kali:~#
|
||||||
root@kali:~# searchsploit afd windows local
|
root@kali:~# searchsploit afd windows local
|
||||||
|
|
14
searchsploit
14
searchsploit
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Name: SearchSploit - Exploit-DB's CLI search tool
|
# Name: SearchSploit - Exploit-DB's CLI search tool
|
||||||
# Version: 3.7.6 (Release date: 2017-06-13)
|
# Version: 3.8 (Release date: 2017-06-14)
|
||||||
# Written by: Offensive Security, Unix-Ninja, and g0tmi1k
|
# Written by: Offensive Security, Unix-Ninja, and g0tmi1k
|
||||||
# Homepage: https://github.com/offensive-security/exploit-database
|
# Homepage: https://github.com/offensive-security/exploit-database
|
||||||
# Manual: https://www.exploit-db.com/searchsploit/
|
# Manual: https://www.exploit-db.com/searchsploit/
|
||||||
|
@ -40,6 +40,7 @@ XML=0
|
||||||
COLOUR_TAG=""
|
COLOUR_TAG=""
|
||||||
TAGS=""
|
TAGS=""
|
||||||
SEARCH=""
|
SEARCH=""
|
||||||
|
EXCLUDE=""
|
||||||
CASE_TAG_GREP="-i"
|
CASE_TAG_GREP="-i"
|
||||||
CASE_TAG_FGREP="tolower"
|
CASE_TAG_FGREP="tolower"
|
||||||
AWK_SEARCH=""
|
AWK_SEARCH=""
|
||||||
|
@ -67,6 +68,7 @@ function usage()
|
||||||
echo " ${progname} afd windows local"
|
echo " ${progname} afd windows local"
|
||||||
echo " ${progname} -t oracle windows"
|
echo " ${progname} -t oracle windows"
|
||||||
echo " ${progname} -p 39446"
|
echo " ${progname} -p 39446"
|
||||||
|
echo " ${progname} linux kernel 3.2 --exclude=\"(PoC)|/dos/\""
|
||||||
echo ""
|
echo ""
|
||||||
echo " For more examples, see the manual: https://www.exploit-db.com/searchsploit/"
|
echo " For more examples, see the manual: https://www.exploit-db.com/searchsploit/"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -88,6 +90,8 @@ function usage()
|
||||||
echo " --id Display the EDB-ID value rather than local path."
|
echo " --id Display the EDB-ID value rather than local path."
|
||||||
echo " --nmap [file.xml] Checks all results in Nmap's XML output with service version (e.g.: nmap -sV -oX file.xml)."
|
echo " --nmap [file.xml] Checks all results in Nmap's XML output with service version (e.g.: nmap -sV -oX file.xml)."
|
||||||
echo " Use \"-v\" (verbose) to try even more combinations"
|
echo " Use \"-v\" (verbose) to try even more combinations"
|
||||||
|
echo " --exclude=\"term\" Remove values from results. By using \"|\" to separated you can chain multiple values."
|
||||||
|
echo " e.g. --exclude=\"term1|term2|term3\"."
|
||||||
echo ""
|
echo ""
|
||||||
echo "======="
|
echo "======="
|
||||||
echo " Notes "
|
echo " Notes "
|
||||||
|
@ -432,6 +436,8 @@ for param in "$@"; do
|
||||||
EDBID=1
|
EDBID=1
|
||||||
elif [[ "${param}" == "--nmap" ]]; then
|
elif [[ "${param}" == "--nmap" ]]; then
|
||||||
XML=1
|
XML=1
|
||||||
|
elif [[ "${param}" =~ "--exclude=" ]]; then
|
||||||
|
EXCLUDE="$( echo "${param}" | cut -d '=' -f 2- )"
|
||||||
elif [[ "${param}" == "--verbose" ]]; then
|
elif [[ "${param}" == "--verbose" ]]; then
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
else
|
else
|
||||||
|
@ -667,6 +673,12 @@ fi
|
||||||
SEARCH="${SEARCH} | sed 's/\"//g'"
|
SEARCH="${SEARCH} | sed 's/\"//g'"
|
||||||
|
|
||||||
|
|
||||||
|
## Remove any terms not wanted from the search
|
||||||
|
if [[ "${EXCLUDE}" ]]; then
|
||||||
|
SEARCH="${SEARCH} | grep -vEi '${EXCLUDE}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
## Magic search Fu
|
## Magic search Fu
|
||||||
## Web link format ("--www")?
|
## Web link format ("--www")?
|
||||||
if [[ "${WEBLINK}" -eq 1 ]]; then
|
if [[ "${WEBLINK}" -eq 1 ]]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue