Skip to content

Instantly share code, notes, and snippets.

@zesty
Created April 24, 2022 20:15
Show Gist options
  • Save zesty/00da1cf0e11aee585b104c81e65d0dab to your computer and use it in GitHub Desktop.
Save zesty/00da1cf0e11aee585b104c81e65d0dab to your computer and use it in GitHub Desktop.
owasp zap update latest download
% cat zapup.sh
#!/bin/zsh
cd $HOME/Downloads
curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmllint --xpath '//core/daily/url/text()' - > /tmp/zzzzap
if [[ -z "$(find $HOME/Downloads -name 'ZAP_D*' | head -1)" ]] || ! $(grep $(ls -d ZAP_D* | sed -e "s/ZAP_//") /tmp/zzzzap >& /dev/null)
then
/bin/rm -f $HOME/Downloads/zap
/bin/rm -rf $HOME/Downloads/ZAP_[DW]*
wget $(curl -s https://raw.githubusercontent.com/zaproxy/zap-admin/master/ZapVersions.xml | xmllint --xpath '//core/daily/url/text()' -)
unzip ZAP*zip
ln -s ZAP_D* zap
fi
rm /tmp/zzzzap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment