mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Make burp work from alt-f2 and other non-function locations.
This commit is contained in:
30
bin/burp
Executable file
30
bin/burp
Executable file
@@ -0,0 +1,30 @@
|
||||
_start_burp() {
|
||||
setopt localoptions nullglob numeric_glob_sort
|
||||
local NO_DOWNLOAD
|
||||
local JAR
|
||||
if (( ${+argv[(r)*no-download]} )) ; then
|
||||
NO_DOWNLOAD=1
|
||||
shift
|
||||
else
|
||||
NO_DOWNLOAD=0
|
||||
fi
|
||||
JAR=(${HOME}/bin/burpsuite*jar(On[1])) 2>/dev/null
|
||||
if [ -z $JAR ] ; then
|
||||
if (( $NO_DOWNLOAD )) ; then
|
||||
echo "Not downloading, --no-download specified" >&2
|
||||
return 1
|
||||
fi
|
||||
echo "Burp JAR not found in ${HOME}/bin. Attempting to download free edition." >&2
|
||||
wget -q --content-disposition --no-server-response -P ${HOME}/bin \
|
||||
https://portswigger.net/DownloadUpdate.ashx\?Product\=Free
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Download failed." >&2
|
||||
return 1
|
||||
fi
|
||||
burp --no-download "$@"
|
||||
return $?
|
||||
else
|
||||
java -jar ${JAR} "$@"
|
||||
fi
|
||||
}
|
||||
_start_burp
|
||||
Reference in New Issue
Block a user