Created
April 24, 2022 20:15
-
-
Save zesty/00da1cf0e11aee585b104c81e65d0dab to your computer and use it in GitHub Desktop.
owasp zap update latest download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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