This is a migrated thread and some comments may be shown as answers.

code working in fiddler,but not working in fiddlercore?

2 Answers 78 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
poko
Top achievements
Rank 1
poko asked on 03 Aug 2014, 07:10 AM
code working in fiddler,but not working in fiddlercore?


//init function
FiddlerApplication.BeforeResponse += onBeforeResponse;


//onBeforeResponse
private static void onBeforeResponse(Session oSession)
{
        if (oSession.url.IndexOf("/p_manager/")!=-1)
        {
                oSession.utilDecodeResponse();
                oSession.utilReplaceOnceInResponse("</body>", "<script>alert(1)</script></body>", false);
             //this code not working in fiddlercore,but this code in fiddler is working. i think maybe must append some code like
            //oSession["X-ResponseBody"] ,but i do not know how to do that.
            // i read fiddler's CustomRules.js but it not say how to do it.
           // i
           // recently ,in my hometown the google is no access. so i consult you again.
      
        }


2 Answers, 1 is accepted

Sort by
0
poko
Top achievements
Rank 1
answered on 04 Aug 2014, 07:17 AM
I find the answer .

need this code in onBeforRequest

 static void onBeforeRequest(Session oSession)
  {
            oSession.bBufferResponse = true;
}

I bought  you book in  Amazon china. but it in the mail car now. 
i really looking forward read it.
0
Eric Lawrence
Telerik team
answered on 04 Aug 2014, 02:57 PM
Hello, Poko--

Thanks for letting me know that the book is now available in China! The publisher never got back to me.

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FiddlerCore
Asked by
poko
Top achievements
Rank 1
Answers by
poko
Top achievements
Rank 1
Eric Lawrence
Telerik team
Share this question
or