send messages from targeted script

18 views
Skip to first unread message

Aphak 5010

unread,
Jun 28, 2021, 6:36:06 PM6/28/21
to OWASP ZAP User Group
Hello, 
I'm working on a targeted script (python) that processes the message it is invoked with, makes changes to the message and re-sends the message multiple times.
The code I have so far to send a message:

http_sender = HttpSender(Model.getSingleton().getOptionsParam().getConnectionParam(), True, HttpSender.MANUAL_REQUEST_INITIATOR)
http_sender.sendAndReceive(msg, True)

The messages are sent but they do not show up in the history tab.
How can I send the messages so that they do show up in the history tab?

Thanks in advance for your answers!

kingthorin+owaspzap

unread,
Jun 29, 2021, 3:38:15 PM6/29/21
to OWASP ZAP User Group
You probably just need to trigger a UI update. Have a look at this script for an example: https://github.com/zaproxy/community-scripts/blob/main/standalone/historySourceTagger.js
Reply all
Reply to author
Forward
0 new messages