From 688cd13e967a43a588f41202a731b50959b072c2 Mon Sep 17 00:00:00 2001 From: g0tmi1k Date: Tue, 20 Dec 2016 14:30:14 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20for=20#67=20-=20Show=20result=20when=20th?= =?UTF-8?q?eir=E2=80=99s=20only=201=20for=20nmap=E2=80=99s=20XML=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- searchsploit | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/searchsploit b/searchsploit index 3eb636496..45a66ca8a 100755 --- a/searchsploit +++ b/searchsploit @@ -1,6 +1,6 @@ #!/bin/bash # Name: SearchSploit - Exploit-DB's CLI search tool -# Version: 3.7.2 (Release date: 2016-12-08) +# Version: 3.7.3 (Release date: 2016-12-20) # Written by: Offensive Security, Unix-Ninja, and g0tmi1k # Homepage: https://github.com/offensive-security/exploit-database # @@ -238,7 +238,7 @@ function searchsploitout() if [[ "${lines}" -gt 100 ]]; then echo -e "[-] Skipping output: ${tmp} (Too many results. Please re-search manually: $0 ${arg} ${tmp})\n" 1>&2 ## Are there any result? - elif [[ "${lines}" -gt 6 ]]; then + elif [[ "${lines}" -gt 5 ]]; then echo -e "${out}\n\n" ## If there's no results else @@ -262,7 +262,7 @@ function searchsploitout() if [[ "${lines}" -gt 100 ]]; then echo -e "[-] Skipping output: ${software} (Too many results. Please re-search manually: $0 ${arg} ${software})\n" 1>&2 ## Are there any result? - elif [[ "${lines}" -gt 6 ]]; then + elif [[ "${lines}" -gt 5 ]]; then echo -e "${out}\n\n" fi fi @@ -652,13 +652,12 @@ fi ## Display colour highlights ("--colour")? if [[ "${COLOUR_TAG}" ]] && [[ "${JSON}" -eq 0 ]]; then - OUTPUT=$( echo -e "${OUTPUT}" | eval ${COLOUR_TAG} ) + [[ "${OUTPUT}" ]] && OUTPUT=$( echo -e "${OUTPUT}" | eval ${COLOUR_TAG} ) fi ## Show content -echo "${OUTPUT}" - +[[ "${OUTPUT}" ]] && echo "${OUTPUT}" ## Print footer if NOT in JSON ("--json") if [[ "${JSON}" -eq 0 ]]; then