Tsaukpaetra

Save JPGs in Fiddler

Nov 3rd, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1.  
  2.     static function OnBeforeResponse(oSession: Session) {
  3.         if (m_Hide304s && oSession.responseCode == 304) {
  4.             oSession["ui-hide"] = "true";
  5.         }
  6.         if(oSession.url.Contains(".jpg")){
  7.             FiddlerApplication.Log.LogFormat("downloading "+oSession.url + " as " + System.IO.Path.GetFileName(new Uri("http://" + oSession.url).AbsolutePath));
  8.             System.IO.File.WriteAllBytes("C:\\Temp\\" + System.IO.Path.GetFileName(new Uri("http://" + oSession.url).AbsolutePath), oSession.responseBodyBytes);
  9.         }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment