Http Sender used jython run jar file

32 views
Skip to first unread message

TuanTu Nguyen

unread,
Jun 17, 2024, 2:01:55 AMJun 17
to ZAP User Group
Dear all,

I need to use the ZAP tool to scan API A, but API A requires a real-time token to be generated each time a request is sent to the server. I have already written a jar file to create the token, but currently, I don't know how to use Http Sender (Python code) to run that jar file.

My Python code:

  • import os
  • os.system("java -jar <path to jar file>")

However, every time I run it, it gives an error: " java.lang.reflect.UndeclaredThrowableException java.lang.reflect.UndeclaredThrowableException 

Can anyone help me? Many Thanks

TuanTu Nguyen

unread,
Jun 25, 2024, 5:11:35 AM (8 days ago) Jun 25
to ZAP User Group
I have a solution for my problem. Thanks to view my questionn:)

Vào lúc 13:01:55 UTC+7 ngày Thứ Hai, 17 tháng 6, 2024, TuanTu Nguyen đã viết:

Simon Bennetts

unread,
Jul 1, 2024, 9:45:09 AM (yesterday) Jul 1
to ZAP User Group
If you have a solution, then you dont need an answer any more?

Cheers,

Simon

TuanTu Nguyen

unread,
12:35 AM (23 hours ago) 12:35 AM
to ZAP User Group
Thank you, Simon, for your interest in my question. I made a mistake by not thoroughly understanding the HTTP Header template, which led to errors when I coded in Python. Now that I understand the template, I no longer encounter these errors and can customize the pentest scripts. Thanks to the team for creating such a powerful tool.

Vào lúc 20:45:09 UTC+7 ngày Thứ Hai, 1 tháng 7, 2024, psi...@gmail.com đã viết:
Reply all
Reply to author
Forward
0 new messages