Merge pull request #98 from g0tmi1k/searchsploit
Fix #97 & More Display Output
This commit is contained in:
commit
e3a111f58c
1 changed files with 6 additions and 5 deletions
11
searchsploit
11
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
|
||||
|
@ -693,9 +694,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} \
|
||||
|
|
Loading…
Add table
Reference in a new issue