Merge branch 'g0tmi1k-osx'

This commit is contained in:
Offensive Security 2016-03-19 21:36:13 +00:00
commit 1f858f098b

View file

@ -191,12 +191,12 @@ done
## Print the full path. If pbcopy/xclip is available then copy to the clipboard ## Print the full path. If pbcopy/xclip is available then copy to the clipboard
if [[ "${GETPATH}" -eq '1' ]]; then if [[ "${GETPATH}" -eq 1 ]]; then
## Get EDB-ID from input ## Get EDB-ID from input
edbdb="$( echo ${TAGS} | tr -dc '0-9' )" edbdb="$( echo ${TAGS} | tr -dc '0-9' )"
## Check files.csv ## Check files.csv
location=$(cut -d, -f2 "${csvpath}" | grep -m 1 -E "/${edbdb}(\..*)?$") location=$( cut -d, -f2 "${csvpath}" | grep -m 1 -E "/${edbdb}(\..*)?$" )
title=$(grep -m 1 "${location}" "${csvpath}" | cut -d, -f3) title=$( grep -m 1 "${location}" "${csvpath}" | cut -d, -f3 )
## Join paths ## Join paths
location="${gitpath}/${location}" location="${gitpath}/${location}"
@ -250,7 +250,7 @@ fi
if [[ "${WEBLINK}" -eq 1 ]]; then if [[ "${WEBLINK}" -eq 1 ]]; then
COL2=45 COL2=45
else else
COL2=35 COL2=$(( ${#gitpath} + 15 ))
fi fi
COL1=$(( $( tput cols ) - COL2 - 1 )) COL1=$(( $( tput cols ) - COL2 - 1 ))
@ -292,7 +292,10 @@ else
for tag in ${TAGS}; do for tag in ${TAGS}; do
## If we are to use colour, add the values to search for between "or" ## If we are to use colour, add the values to search for between "or"
if [[ "${COLOUR}" -eq 1 ]]; then if [[ "${COLOUR}" -eq 1 ]]; then
COLOUR_TAG="${COLOUR_TAG}\|${tag}" if [[ "${COLOUR_TAG}" ]]; then
COLOUR_TAG="${COLOUR_TAG}\|"
fi
COLOUR_TAG="${COLOUR_TAG}${tag}"
fi fi
## Search both title and path? ## Search both title and path?
@ -313,7 +316,7 @@ else
## Case sensitive? ## Case sensitive?
if [[ "${SCASE}" -eq 1 ]]; then if [[ "${SCASE}" -eq 1 ]]; then
EARCH="${SEARCH}${tag}" SEARCH="${SEARCH}${tag}"
else else
SEARCH="${SEARCH}$( echo ${tag} | tr '[:upper:]' '[:lower:]' )" SEARCH="${SEARCH}$( echo ${tag} | tr '[:upper:]' '[:lower:]' )"
fi fi