Move burp from standalone script to install_tool.

This commit is contained in:
David Tomaschik
2017-03-25 07:38:03 -07:00
parent dbe4c21ca1
commit 607204a85c
2 changed files with 15 additions and 32 deletions

View File

@@ -1,32 +0,0 @@
#!/bin/zsh
_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

View File

@@ -105,6 +105,21 @@ case ${TOOL} in
# Install components # Install components
${DESTDIR}/tools/bin/sdkmanager "emulator" "platform-tools" ${DESTDIR}/tools/bin/sdkmanager "emulator" "platform-tools"
;; ;;
burp)
# Install latest burp free
mkdir -p ${DESTDIR}
wget -q --content-disposition --no-server-response -P ${DESTDIR} \
https://portswigger.net/DownloadUpdate.ashx\?Product\=Free
if [ $? -ne 0 ] ; then
echo "Download failed." >&2
exit 1
fi
if [ -x /usr/bin/jarwrapper ] ; then
# We have binfmt support for jar, so add to bin
chmod +x ${DESTDIR}/*.jar
ln -sf ${DESTDIR}/*.jar ${HOME}/bin/burp
fi
;;
*) *)
echo "Unknown tool: ${TOOL}" >/dev/stderr echo "Unknown tool: ${TOOL}" >/dev/stderr
exit 1 exit 1