This is a migrated thread and some comments may be shown as answers.

Modifying Request Body from Deflated SAML

0 Answers 208 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 07 Nov 2016, 12:16 AM

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);
}
}

No answers yet. Maybe you can help?

Tags
Fiddler Classic
Asked by
Josh
Top achievements
Rank 1
Share this question
or