open owasp on ubuntu app

34 views
Skip to first unread message

simone zambonardi

unread,
Aug 12, 2022, 11:03:14 AM8/12/22
to OWASP ZAP Developer Group
Hello, I wanted to ask for help.
I am using zap on windows but trying to log in from Ubuntu (windows app). When I start the program with sudo ./zap.sh this message comes out

890 [main] INFO  org.zaproxy.zap.GuiBootstrap - OWASP ZAP 2.11.1 started 12/08/2022, 16:58:31 with home /root/.ZAP/
893 [main] FATAL org.zaproxy.zap.GuiBootstrap - ZAP GUI is not supported on a headless environment.
Run ZAP inline or in daemon mode, use -help command line argument for more details.
ZAP GUI is not supported on a headless environment.
Run ZAP inline or in daemon mode, use -help command line argument for more details.

Do you think the problem is that I'm using the Ubuntu app on windows? how can i solve? thank you

psiinon

unread,
Aug 12, 2022, 11:07:19 AM8/12/22
to OWASP ZAP Developer Group
Yes :)
Solution: use ZAP on Windows.
Any reason why you dont want to do that?

Cheers,

Simon

simone zambonardi

unread,
Aug 12, 2022, 11:11:33 AM8/12/22
to OWASP ZAP Developer Group
I'm simulating on ubuntu because then the automation script I made will go to a linux server. So the problem is caused by the "simulator"?

psiinon

unread,
Aug 12, 2022, 11:16:53 AM8/12/22
to OWASP ZAP Developer Group
The problem is that Ubuntu on Windows doesnt appear to support a GUI out of the box.

But ... if you are automating ZAP then why do you need the GUI?
You can run ZAP with the "-daemon" flag to run it without the GUI.
Or you can use the Zap Automation Framework(AF): https://www.zaproxy.org/docs/automate/automation-framework/ - an AF plan is yaml and will work the same on Windows as Linux.

Cheers,

Simon

simone zambonardi

unread,
Aug 12, 2022, 11:46:50 AM8/12/22
to OWASP ZAP Developer Group
I noticed that if I don't open the program (graphically) the script doesn't work. It seems he doesn't recognize the apikey. Is there any way to disable it? Thanks for your help :)

psiinon

unread,
Aug 12, 2022, 11:48:47 AM8/12/22
to OWASP ZAP Developer Group

ZAP is designed to automate - you do not have to use the GUI if you dont want to.

simone zambonardi

unread,
Aug 12, 2022, 11:56:59 AM8/12/22
to OWASP ZAP Developer Group
When I launch my script. Owasp is opened on port 8080 (without activating the graphics) the problem is that it gives me this error. do you know what it can be?

954746 [ZAP-ProxyThread-6] WARN  org.zaproxy.zap.extension.api.API - API key incorrect or not supplied: (apikey code) in request from 127.0.0.1
Traceback (most recent call last): ..... etc

If, on the other hand, I start the .exe file, it doesn't give any problems

psiinon

unread,
Aug 12, 2022, 12:01:51 PM8/12/22
to OWASP ZAP Developer Group

simone zambonardi

unread,
Aug 12, 2022, 1:00:36 PM8/12/22
to OWASP ZAP Developer Group
Thank you very much for your help. What I don't understand though is why if I open the OWASP GUI the script in python works. It runs the scans with respective reports. If I use the -daemon command instead, it does not work.
Message has been deleted

simone zambonardi

unread,
Aug 13, 2022, 6:03:08 AM8/13/22
to OWASP ZAP Developer Group
Last night I tried experimenting again. The problem is when I start a scan function or whatever. If I keep owasp in "demon" mode this warning comes up even though the api key is correct. The script is done in python and I am using the ubuntu app on windows
13462 [ZAP-ProxyThread-3] WARN  org.zaproxy.zap.extension.api.API - API key incorrect or not supplied: **code apikey **  in request from 127.0.0.1
The problem does not persist if the owasp GUI is opened.

psiinon

unread,
Aug 15, 2022, 3:40:05 AM8/15/22
to OWASP ZAP Developer Group
Have you looked at the FAQ I've mentioned above a couple of times?
Have you tried disabling the API key as mentioned in the FAQ?
If so can you send us the command you are using to launch ZAP?
Reply all
Reply to author
Forward
0 new messages