input vector script and site tree

33 views
Skip to first unread message

Eric murphy

unread,
Dec 2, 2021, 4:14:19 AM12/2/21
to OWASP ZAP Scripts

I use the zap input vector script to parse HTTP request custom parameters for zap sitetree (eg:
a=1&b=
{
    "aid": 1,
    "bid": 1,
    "did": "1234",
    "form": 0,
    "eid": 0,
    "fid": 0,
    "type": 1,
    "tables": [{
        "key": "ABC",
        "seed": 0,
        "tableMode": 1,
        "columns": [{
            "type": 1,
            "key": "ID",
            "index": 0,
            "type": 7,
            "mustRender": true
        }],
        "rows": []
    }],
    "class": {},
    "mainKey": "Collection",
    "objectKey": "CollectionList",
    "Values": {},
    "otherValues": {},
    "emptyGridValues": {},
    "Filter": {}
}&c=3)
From the example of zap input vector script template (< input vector default template. JS > and < site modifying JSON example. JS >), I know there are four functions:
function parseParameters(helper, msg) //for customize parse and add params
function getLeafName(helper, nodeName, msg) //for parse and add node
function setParameter(helper, msg, param, value, escaped) // for active plugin scan use and set values;
function getTreePath(helper, msg) // for customize parse url
But I still don't know how to parse the above parameter scheme. Can someone familiar with the principle of zap script give me some clues?
Reply all
Reply to author
Forward
0 new messages