Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add zaproxy package #417

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sources/assets/shells/aliases.d/zaproxy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alias zaproxy='/opt/tools/zaproxy/zap.sh'
3 changes: 3 additions & 0 deletions sources/assets/shells/history.d/zaproxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zaproxy -cmd -addonupdate
zaproxy -host "0.0.0.0" -port "8080"
zaproxy -host "127.0.0.1" -port "8080"
18 changes: 18 additions & 0 deletions sources/install/package_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,23 @@ function install_postman() {
add-to-list "postman,https://www.postman.com/,API platform for testing APIs"
}

function install_zaproxy() {
colorecho "Installing Zaproxy"
local download_url
download_url=$(/usr/bin/curl --location --silent "https://api.github.com/repos/zaproxy/zaproxy/releases/latest" | \
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_*.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 "zaproxy -suppinfo"
add-to-list "zaproxy,https://www.zaproxy.org/,Web application security testing tool."
}

function install_token_exploiter() {
# CODE-CHECK-WHITELIST=add-aliases,add-history
colorecho "Installing Token Exploiter"
Expand Down Expand Up @@ -982,6 +999,7 @@ function package_web() {
install_jsluice # Extract URLs, paths, secrets, and other interesting data from JavaScript source code
install_katana # A next-generation crawling and spidering framework
install_postman # Postman - API platform for testing APIs
install_zaproxy # Zed Attack Proxy
install_token_exploiter # Github personal token Analyzer
end_time=$(date +%s)
local elapsed_time=$((end_time - start_time))
Expand Down
Loading