fiddler 读取本地文件替换响应
static function OnBeforeResponse(oSession: Session) { if (m_Hide304s && oSession.responseCode == 304) { oSession["ui-hide"] = "true"; } // MessageBox.Show(oSession.RequestMethod); if (oSession.RequestMethod == "GET" && oSession.url.indexOf("oBbhUNHFM") > -1) { // MessageBox.Show(111111111111); var filePath = "E:\\mycode\\akm\\hmm\\js\\1.js"; // 替换为您的文件路径 var fileContent = System.IO.File.ReadAllText(filePath); // FiddlerObject.log("File content: " + fileContent); oSession.utilSetResponseBody(fileContent); }
}