I need some more help with that. This is the script I'm trying to use more or less, i think I do everything right here, but I get the error below it.
Searched through the sources but couldn't find any newAlert() calls that need an argument in any of the ScriptActiveScanners's parents.
------------Script--------------
from org.zaproxy.zap.extension.script import ScriptVars
from org.zaproxy.zap.extension.ascan import ScriptsActiveScanner as sas
msg = ScriptVars.getGlobalCustomVar("InsecureCookie")
if msg is not None:
sas.newAlert()\
.setRisk(0)\
.setConfidence(1)\
.setName("TestAlert")\
.setDescription("alertDescription")\
.setSolution("alertSolution")\
.setCweId(4)\
.setWascId(5)\
.setParam("1")\
.setAttack("2")\
.setEvidence("3")\
.setMessage(msg)\
.setUri(msg.getRequestHeader().getURI().toString())\
.raise()
---------------------------------
---------Error------------------
Traceback (most recent call last):
File "<script>", line 7, in <module>
TypeError: newAlert(): expected 1 args; got 0
Traceback (most recent call last):
File "<script>", line 7, in <module>
TypeError: newAlert(): expected 1 args; got 0
java.lang.reflect.UndeclaredThrowableExceptionjava.lang.reflect.UndeclaredThrowableException
--------------------------------