static void FiddlerApplication_BeforeRequest(Session oSession) { oSession.bBufferResponse = true; } static void FiddlerApplication_BeforeResponse(Fiddler.Session oSession) { if (oSession.url.Contains("www.shujucaiji.cn")) { var strHtmlUTF8 = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes); oSession.utilDecodeResponse(); oSession.utilSetResponseBody(strHtmlUTF8); } } private void frmMain_FormClosing(object sender, FormClosingEventArgs e) { Fiddler.FiddlerApplication.Shutdown(); } private void frmMain_Load(object sender, EventArgs e) { Fiddler.FiddlerApplication.BeforeRequest += new SessionStateHandler(FiddlerApplication_BeforeRequest); Fiddler.FiddlerApplication.BeforeResponse += new Fiddler.SessionStateHandler(FiddlerApplication_BeforeResponse); Fiddler.FiddlerApplication.Startup(8877, FiddlerCoreStartupFlags.Default); }