
var HttpSender = Java.type("org.parosproxy.paros.network.HttpSender")
var HttpMessage = Java.type("org.parosproxy.paros.network.HttpMessage")
var HttpHeader = Java.type("org.parosproxy.paros.network.HttpHeader")
var HttpRequestHeader = Java.type("org.parosproxy.paros.network.HttpRequestHeader")
var URI = Java.type("org.apache.commons.httpclient.URI")
function consumer(event) {
if (event.getEventType() != "alert.added") return
var params = event.getParameters()
alert = {
"fields": [
{ "Alert": params.get("name"),
"URL": "`" + params.get("uri") + "`" ,
"Risk": params.get("riskString"),
"Confidence": params.get("confidenceString"),
// HTTP Request headers
//HTTP Response headers
}
]
}
var body = {"data": [alert] }
body = JSON.stringify(body)
print(body)
}
function install(helper) {
org.zaproxy.zap.ZAP.getEventBus().registerConsumer(consumer, "org.zaproxy.zap.extension.alert.AlertEventPublisher")
}
function uninstall(helper) {
org.zaproxy.zap.ZAP.getEventBus().unregisterConsumer(consumer)
}
Thanks & Regards,
![]() CodeMax IT Solutions Pvt. Ltd. |
| Email karthik.kanthaswamy@CdMx.in Address Office No A - 201, 202, 2nd Floor, Asian Pinnacle, behind Bank of India, Fatorda, Goa 403602 Mobile +91 776-060-0458 Website CdMx.in |
This e-mail may contain privileged and confidential information which is the property of CodeMax IT Solutions Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. CodeMax IT Solutions Pvt. Ltd. does not accept any liability for virus infected e-mails.
--
You received this message because you are subscribed to a topic in the Google Groups "OWASP ZAP Scripts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zaproxy-scripts/Zk5Hr4i-TOY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zaproxy-scrip...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/zaproxy-scripts/4cc38c1f-dac3-4029-8d02-a0b1f2b525fcn%40googlegroups.com.
from org.zaproxy.zap import ZAP
def consumer(event):
if (event.getEventType() == "alert.added"):
print('success')
def install(helper):
print('Installed');
ZAP.getEventBus().registerConsumer(consumer, "org.zaproxy.zap.extension.alert.AlertEventPublisher")
def uninstall(helper):
print('Uninstall called...!');
Thanks & Regards,
![]() CodeMax IT Solutions Pvt. Ltd. |
| Email karthik.kanthaswamy@CdMx.in Address Office No A - 201, 202, 2nd Floor, Asian Pinnacle, behind Bank of India, Fatorda, Goa 403602 Mobile +91 776-060-0458 Website CdMx.in |
This e-mail may contain privileged and confidential information which is the property of CodeMax IT Solutions Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. CodeMax IT Solutions Pvt. Ltd. does not accept any liability for virus infected e-mails.
To view this discussion on the web, visit https://groups.google.com/d/msgid/zaproxy-scripts/64b9dc31-2030-4d62-ad79-3647849f93afn%40googlegroups.com.
from org.zaproxy.zap import ZAP as zap
from org.zaproxy.zap.eventBus import EventConsumer
class MyEventConsumer(EventConsumer):
def eventReceived(self, event):
if event.getEventType() == "alert.added":
params = event.getParameters()
print(params)
def install(helper):
event_consumer = MyEventConsumer()
if zap.getEventBus().registerConsumer(event_consumer, "org.zaproxy.zap.extension.alert.AlertEventPublisher"):
print("Install called")
def uninstall(helper):
event_consumer = MyEventConsumer()
if zap.getEventBus().unregisterConsumer(MyEventConsumer()):
print("Uninstall called")