Import a python script

70 views
Skip to first unread message

Brayhan Zuluaga

unread,
Dec 14, 2020, 1:27:35 PM12/14/20
to OWASP ZAP Scripts
Hello guys I need to import a function from another script, I'm working with active rules. I created a script call "importada" in that script I have a function call "imprime" and actually only do print("hello world"). Also I have a script call "Importadora" that script import "Importada".
The problem is:
ImportError: No module named importada
Also I was trying : from importada import imprime, but I have the same error.

How can I import a function from another script?

Thak you.WhatsApp Image 2020-12-14 at 1.26.29 PM.jpeg

Simon Bennetts

unread,
Dec 15, 2020, 4:23:15 AM12/15/20
to OWASP ZAP Scripts
You can configure the path to the directory with additional modules/libraries for Python scripting via the Option / Jython screen: https://www.zaproxy.org/docs/desktop/addons/python-scripting/options/
Will that do what you need?
Reply all
Reply to author
Forward
0 new messages