From 0417b1f9e8e41560efb41e4e391be795c12a5e6d Mon Sep 17 00:00:00 2001 From: g0tmi1k Date: Tue, 29 Aug 2017 11:41:33 +0100 Subject: [PATCH 1/2] Fix #97 - JSON Formatting Issue --- searchsploit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/searchsploit b/searchsploit index 2b3187aa9..e14f012a3 100755 --- a/searchsploit +++ b/searchsploit @@ -693,9 +693,9 @@ elif [[ "${EDBID}" -eq 1 ]]; then ## Print JSON format (full options) ("--json")? elif [[ "${JSON}" -eq 1 ]]; then OUTPUT="$( eval ${SEARCH} \ - | awk -F ',' '{ printf "\r\t\t'{'\"Exploit\":\"%s\",\"Platform\":\"%s\",\"Type\":\"%s\",\"Date\":\"%s\",\"Path\":\"'${gitpath}/'%s\",\"EDB-ID\":%s},\n", $2, $5, $6, $4, $3, $1 }' \ - | sed '$ s/,$//g' \ - | sort )" + | awk -F ',' '{ printf "\r\t\t'{'\"Exploit\":\"%s\",\"Platform\":\"%s\",\"Type\":\"%s\",\"Date\":\"%s\",\"Path\":\"'${gitpath}/'%s\",\"EDB-ID\":\"%s\"},\n", $2, $5, $6, $4, $3, $1 }' \ + | sort \ + | sed '$ s/,$//g' )" ## Default view else OUTPUT="$( eval ${SEARCH} \ From b543db6a5b42a0dba295146a0ed6d99324ec01aa Mon Sep 17 00:00:00 2001 From: g0tmi1k Date: Tue, 29 Aug 2017 11:44:36 +0100 Subject: [PATCH 2/2] Add path information in output (Copying & updating) --- searchsploit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/searchsploit b/searchsploit index e14f012a3..ee4eca905 100755 --- a/searchsploit +++ b/searchsploit @@ -1,6 +1,6 @@ #!/bin/bash # Name: SearchSploit - Exploit-DB's CLI search tool -# Version: 3.8.2 (Release date: 2017-06-26) +# Version: 3.8.3 (Release date: 2017-08-29) # Written by: Offensive Security, Unix-Ninja, and g0tmi1k # Homepage: https://github.com/offensive-security/exploit-database # Manual: https://www.exploit-db.com/searchsploit/ @@ -197,6 +197,7 @@ function updategit() fi echo -e "\n[*] Git update finished." + echo "[i] Path: ${gitpath}/platforms/" exit 6 } @@ -565,7 +566,7 @@ if [[ "${GETPATH}" -eq 1 ]]; then if [[ "${MIRROR}" -eq 1 ]]; then cp -i "${location}" "$( pwd )/" - echo "Copied to '$( pwd )/'" + echo "Copied to: $( pwd )/$( basename ${location} )" echo -e "\n" fi else