Hello just wondering if someone already wrote a script for Zap to modify headers automatically with out me having to do it on each response/request.. example. modify response from 3xx or 4xx to 2xx to bypass some misconfigure sites. If I can't find any I will try to write my own, just trying not to reinvent the wheel. thanks


Answered here: https://github.com/zaproxy/zaproxy/issues/4022

For simple replacement theres the Replacer add-on: https://github.com/zaproxy/zap-extensions/wiki/HelpAddonsReplacerReplacer and for more complicated situations there are httpsender scripts: https://github.com/zaproxy/community-scripts/tree/master/httpsender


If you're set on using a script you could build an HttpSender script that does something like:

function sendingRequest(msg, initiator, helper) {
    // Nothing to do here

function responseReceived(msg, initiator, helper) {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.