Modifying Request Body from Deflated SAML

1 posts, 0 answers
  1. Josh
    Josh avatar
    1 posts
    Member since:
    Nov 2016

    Posted 06 Nov Link to this post

    Hello,

    I'm trying to edit a response body that is encoded in deflated SAML.

    Fiddler's TextWizard allows me to convert the body to readable content, but so far I am unable to properly code it in FiddlerScript (to adjust automatically, and for several edits at a time).

    I'm sure I am missing a couple steps, and am hoping someone can help me fill in the blanks.

    Here is a sample of what I have so far:

    static function OnBeforeRequest(oSession: Session) {
             
            if (oSession.HostnameIs("http://test-site.com")) {
                oSession.utilDecodeResponse();         
     
                var strBody = oSession.GetRequestBodyAsString();
            strBody = strBody.Replace('"type":11','"type":12,');
         
        oSession.utilSetRequestBody(strBody);
    }
    }
Back to Top