How to remove passwords from a fiddler trace

173 views
Skip to first unread message

D Yo

unread,
Jun 7, 2019, 10:18:38 AM6/7/19
to Fiddler
Hey guys! Does anyone happen to have the code to help remove passwords from sessions? Logging on to web sites I can see the passwords in the WebForms and TextViews. The following code no longer seems to work in Fiddler 4+

I have not been able to find the public documentation that shows how to pull back the sessions requests to remove or modify them.

 public static ToolsAction("Remove Passwords") 
    function doClean() 
    {         
       
        var arrSess: Session[] = FiddlerApplication.UI.GetAllSessions(); 
        for (var i: int=0; i<arrSess.Length; i++) 
        { 
            var oRH = arrSess[i].oRequest.headers["Connection"]
            MessageBox.Show(oRH);
           // oRH.Remove("Cookie"); 
           //oRH.Remove("Authorization"); 
           // oRH.Remove("Proxy-Authorization"); 
            
            
            var oRH = arrSess[i].oResponse.headers; 
           // oRH.Remove("Set-Cookie"); 
           // oRH.Remove("WWW-Authenticate"); 
           // oRH.Remove("Proxy-Authenticate"); 
        } 
        MessageBox.Show("Done"); 
    }

EricLaw

unread,
Jun 17, 2019, 2:37:16 PM6/17/19
to httpf...@googlegroups.com
Removing headers that might contain passwords is easy. Removing POST body data or URL QueryString data that might contain passwords is nearly impossible to do reliably, because there's no standard for how such data is encoded.


public static ToolsAction("Remove PII") 
    function doClean() 
    {         
        var arrSess: Session[] = FiddlerApplication.UI.GetAllSessions(); 
        for (var i: int=0; i<arrSess.Length; i++) 
        { 
          arrSess[i].RequestHeaders.RemoveRange(["Cookie", "Authorization", "Proxy-Authorization"]);
          arrSess[i].ResponseHeaders.RemoveRange(["Set-Cookie", "WWW-Authenticate", "Proxy-Authenticate"]);
        } 
        MessageBox.Show("Done"); 
    }
Reply all
Reply to author
Forward
0 new messages