Look for .csv in source dir even if exe is symlinked
This commit is contained in:
parent
7851596ba7
commit
b1c290b614
1 changed files with 9 additions and 3 deletions
12
searchsploit
12
searchsploit
|
@ -9,9 +9,15 @@ TAGS=
|
||||||
SCASE='-i'
|
SCASE='-i'
|
||||||
VERBOSE=0
|
VERBOSE=0
|
||||||
|
|
||||||
# if files.csv is in the searchsploit path, use that
|
# if files.csv is in the searchsploit source path, use that
|
||||||
if [ -f "$( dirname $0 )/files.csv" ]; then
|
scriptsrc=$0
|
||||||
csvpath="$( dirname $0 )/files.csv"
|
while [ -h $scriptsrc ]; do
|
||||||
|
scriptsrc=$(readlink $scriptsrc)
|
||||||
|
[[ $scriptsrc != /* ]] && scriptsrc="$( cd -P $( dirname $scriptsrc ) && pwd )/$scriptsrc"
|
||||||
|
done
|
||||||
|
progdir="$( cd -P "$( dirname "$scriptsrc" )" && pwd )"
|
||||||
|
if [ -f "$progdir/files.csv" ]; then
|
||||||
|
csvpath="$progdir/files.csv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# usage info
|
# usage info
|
||||||
|
|
Loading…
Add table
Reference in a new issue