Fiddler 抓包指定文件格式 并保存在本地
- 打开 fiddler 、打开规则
- 找到函数
Fiddler 抓包并保存图片到本地:
static function OnBeforeResponse(oSession: Session) {
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
if (oSession.PathAndQuery.ToLower().Contains(".jpeg"))
{
if(oSession.responseCode >= 200 && oSession.responseCode <= 302)
{
var directory2 = "E:\\fiddler\\";
var filename2 = oSession.oRequest.headers.RequestPath.Substring(1);
filename2 = filename2.split('?')[0];
var path2: String = System.IO.Path.Combine(directory2, filename2);
FiddlerApplication.Log.LogString("path2="+path2);
oSession.SaveResponseBody(path2);
}
}
}
|