Skip to content

Commit

Permalink
zaproxy: use zap.sh instead of zap.jar
Browse files Browse the repository at this point in the history
  • Loading branch information
compass-dexter committed Nov 26, 2024
1 parent 3b96175 commit 64aca6c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sources/assets/shells/aliases.d/zaproxy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
alias zaproxy='/usr/lib/jvm/java-21-openjdk/bin/java -Xmx4g -jar /opt/tools/zaproxy/zap.jar'
alias zaproxy='/opt/tools/zaproxy/zap.sh'
4 changes: 3 additions & 1 deletion sources/assets/shells/history.d/zaproxy
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
zaproxy
zaproxy -cmd -addonupdate
zaproxy -host "0.0.0.0" -port "8080"
zaproxy -host "127.0.0.1" -port "8080"
11 changes: 6 additions & 5 deletions sources/install/package_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -898,15 +898,16 @@ function install_postman() {
function install_zaproxy() {
local download_url
download_url=$(/usr/bin/curl --location --silent "https://api.github.com/repos/zaproxy/zaproxy/releases/latest" | \
jq '.assets[]|select(.name|test("ZAP_[0-9.]+_Linux.tar.gz")).browser_download_url')
jq --raw-output '.assets[]|select(.name|test("ZAP_[0-9.]+_Linux.tar.gz")).browser_download_url')
mkdir /opt/tools/zaproxy
curl --output-dir /opt/tools/zaproxy --location --remote-name $download_url
tar --directory /opt/tools/zaproxy --extract --file /opt/tools/zaproxy/ZAP_*
ln -s /opt/tools/zaproxy/ZAP_*/zap-*.jar /opt/tools/zaproxy/zap.jar
/usr/lib/jvm/java-21-openjdk/bin/java -jar /opt/tools/zaproxy/zap.jar -cmd -addonupdate
tar --directory /opt/tools/zaproxy --extract --file /opt/tools/zaproxy/ZAP_*.tar.gz
rm /opt/tools/zaproxy/ZAP_*.tar.gz
ln -s /opt/tools/zaproxy/ZAP_*/zap.sh /opt/tools/zaproxy/
/opt/tools/zaproxy/zap.sh -cmd -addonupdate
add-aliases zaproxy
add-history zaproxy
add-test-command "/usr/lib/jvm/java-21-openjdk/bin/java -jar /opt/tools/zaproxy/zap.jar -suppinfo"
add-test-command "/opt/tools/zaproxy/zap.sh -suppinfo"
add-to-list "zaproxy,https://www.zaproxy.org/,Web application security testing tool."
}

Expand Down

0 comments on commit 64aca6c

Please sign in to comment.