From 6d4ba0dc1aef59cb55cee08124c0a0dbda950fa6 Mon Sep 17 00:00:00 2001 From: Leon Jacobs Date: Sat, 19 Mar 2016 11:23:04 +0200 Subject: [PATCH] Be a little more clever about matching a sploit based off the edb-id Thanks @g0tmi1k --- searchsploit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/searchsploit b/searchsploit index ffca7d83a..386f380ce 100755 --- a/searchsploit +++ b/searchsploit @@ -190,8 +190,11 @@ done ## Print the full path. If pbcopy/xclip is available then copy to the clipboard if [[ "${GETPATH}" -eq '1' ]]; then - tag="$( echo ${TAGS} | tr '[:upper:]' '[:lower:]' )" - location=${gitpath}/platforms/${tag//.\//} + tag="$(echo ${TAGS} | tr '[:upper:]' '[:lower:]')" + edbid=$(echo "${tag}" | tr -dc '0-9') + edbpath=$(awk -F ',' '{print $2}' ${csvpath} | grep -E "/${edbid}(\..*)?$") + location="${gitpath}/${edbpath}" + echo "The exploit should be at: ${location}" # Are any copy programs available?