Better EDB-ID detection - able to put in path and it will extract the value
This commit is contained in:
parent
a0a08b85e3
commit
2be6186aa3
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Name: SearchSploit - Exploit-DB's CLI search tool
|
||||
# Version: 3.7.5 (Release date: 2017-04-21)
|
||||
# Version: 3.7.6 (Release date: 2017-06-13)
|
||||
# Written by: Offensive Security, Unix-Ninja, and g0tmi1k
|
||||
# Homepage: https://github.com/offensive-security/exploit-database
|
||||
# Manual: https://www.exploit-db.com/searchsploit/
|
||||
|
@ -508,7 +508,7 @@ fi
|
|||
if [[ "${GETPATH}" -eq 1 ]]; then
|
||||
for exploit in $(echo ${TAGS}); do
|
||||
## Get EDB-ID from input
|
||||
edbdb="$( echo ${exploit} | tr -dc '0-9' )"
|
||||
edbdb="$( echo ${exploit} | rev | cut -d '/' -f1 | rev | cut -d'.' -f1 | tr -dc '0-9' )"
|
||||
|
||||
## Check files.csv
|
||||
location=$( cut -d, -f2 "${csvpath}" | grep -m 1 -E "/${edbdb}(\..*)?$" )
|
||||
|
|
Loading…
Add table
Reference in a new issue