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

ZAP not printing script errors to console in cmdline mode with -script #8403

Closed
1 task
njmulsqb opened this issue Mar 15, 2024 · 1 comment · Fixed by #8404
Closed
1 task

ZAP not printing script errors to console in cmdline mode with -script #8403

njmulsqb opened this issue Mar 15, 2024 · 1 comment · Fixed by #8404

Comments

@njmulsqb
Copy link
Contributor

Describe the bug

I am running a standalone script that contains a syntax error, but ZAP doesn't print errors to console.

Steps to reproduce the behavior

Here's the command I am using
./zap.sh -cmd -script /Users/administrator/Downloads/script.js
The output:

Found Java version 11.0.20.1
Available memory: 0 MB

The script:
print('hello world')i i is added to introduce error

Expected behavior

It should print errors to console.

Software versions

ZAP
Version: 2.14.0

Installed Add-ons: [[id=accessControl, version=9.0.0],
[id=alertFilters, version=19.0.0], [id=ascanrules,
version=63.0.0], [id=authhelper, version=0.12.0],
[id=automation, version=0.35.0], [id=bruteforce,
version=15.0.0], [id=callhome, version=0.11.0],
[id=commonlib, version=1.22.0], [id=custompayloads,
version=0.13.0], [id=database, version=0.3.0], [id=diff,
version=14.0.0], [id=directorylistv1, version=7.0.0],
[id=domxss, version=18.0.0], [id=encoder, version=1.4.0],
[id=exim, version=0.8.0], [id=formhandler, version=6.5.0],
[id=fuzz, version=13.12.0], [id=gettingStarted,
version=16.0.0], [id=graaljs, version=0.5.0], [id=graphql,
version=0.23.0], [id=help, version=17.0.0], [id=hud,
version=0.18.0], [id=invoke, version=14.0.0], [id=network,
version=0.14.0], [id=oast, version=0.17.0], [id=onlineMenu,
version=12.0.0], [id=openapi, version=39.0.0], [id=postman,
version=0.2.0], [id=pscanrules, version=56.0.0],
[id=quickstart, version=44.0.0], [id=replacer,
version=16.0.0], [id=reports, version=0.30.0],
[id=requester, version=7.4.0], [id=retest, version=0.8.0],
[id=retire, version=0.32.0], [id=reveal, version=7.0.0],
[id=scripts, version=45.0.0], [id=selenium,
version=15.19.0], [id=soap, version=21.0.0], [id=spider,
version=0.10.0], [id=spiderAjax, version=23.18.0], [id=tips,
version=12.0.0], [id=wappalyzer, version=21.32.0],
[id=webdrivermacos, version=75.0.0], [id=websocket,
version=30.0.0], [id=zest, version=43.0.0]]

Operating System: Mac OS X
Architecture: aarch64
Java Version: Eclipse Adoptium 11.0.20.1
System's Locale: en_PK
Display Locale: en_GB
Format Locale: en_PK
Default Charset: UTF-8
ZAP Home Directory: /Users/administrator/Library/Application Support/ZAP/
ZAP Installation Directory: /Applications/ZAP.app/Contents/Java/./
Look and Feel: Mac OS X (com.apple.laf.AquaLookAndFeel)

Screenshots

No response

Errors from the zap.log file

No response

Additional context

No response

Would you like to help fix this issue?

  • Yes
@njmulsqb njmulsqb added the bug label Mar 15, 2024
@thc202 thc202 added enhancement and removed bug labels Mar 15, 2024
@psiinon
Copy link
Member

psiinon commented Mar 15, 2024

For info I think this used to work, but a recent change might have broken it ... possibly zaproxy/zap-extensions@de7ae1a
I was looking into it at one stage but got distracted ..

@thc202 thc202 added this to the 2.15.0 milestone Mar 15, 2024
@thc202 thc202 changed the title ZAP not printing errors to console in cmdline mode ZAP not printing script errors to console in cmdline mode with -script Mar 15, 2024
@thc202 thc202 self-assigned this Mar 15, 2024
thc202 added a commit to thc202/zaproxy that referenced this issue Mar 15, 2024
Log/print possible errors when running the scripts specified through
the command line (e.g. `-script`, direct file path).

Fix zaproxy#8403.

Signed-off-by: thc202 <thc202@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants