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

fiddlercore and browsergame

8 Answers 136 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
Pietro
Top achievements
Rank 1
Pietro asked on 10 Dec 2015, 01:35 PM

hello

in demo application of fiddlercore i add in beforeresponde event

   oS.utilDecodeResponse();
                     Monitor.Enter(oAllSessions);
                     using (StreamWriter writetext = File.AppendText("write.rtf"))
                     {
                         writetext.WriteLine(oS.GetResponseBodyAsString());
                     }
                     Monitor.Exit(oAllSessions);

 

in my file "write.rtf"  i get some javascript function and strange characters like this

 )�2�S��U �k�k

 

how i can read it?

is a browsergame in adobe flash

I hope to find help.

 

8 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 10 Dec 2015, 07:23 PM
Hello, Pietro--

Please keep in mind that GetResponseBodyAsString() is only useful when you call it on responses that are, in fact, text. While you can call this API on a binary body (e.g. like an image or a video) doing so will result in a "garbage" string. You may wish to modify your code like so:

// Add a global variable
   object lockObj = new Object();


// Inside OnBeforeResponse, add
if ((null != oS.oResponse) && oS.oResponse.Contains("text/"))
{
                     string sText = oS.GetResponseBodyAsString();
                     lock (lockObj)
                     {

                         using (StreamWriter writetext = File.AppendText("write.rtf"))
                         {
                            writetext.WriteLine(sText);
                         }
                     }
}

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pietro
Top achievements
Rank 1
answered on 10 Dec 2015, 08:17 PM

Hello Eric, thanks for reply

oResponse not have "Contains" i get error :(

from this data that I have received, I have not found
energy, ammunition, weapons ..
things that are visible in web-browser

I thought they were encrypted inside those weird strings.. otherwise where they are hidden

 

0
Eric Lawrence
Telerik team
answered on 10 Dec 2015, 08:55 PM
Typo fixed:

// Add a global variable
   object lockObj = new Object();


// Inside OnBeforeResponse, add
if ((null != oS.oResponse) && oS.oResponse.MIMEType.Contains("text/"))
{
                     string sText = oS.GetResponseBodyAsString();
                     lock (lockObj)
                     {

                         using (StreamWriter writetext = File.AppendText("write.rtf"))
                         {
                            writetext.WriteLine(sText);
                         }
                     }
}

Be sure to run your code with the browser's cache cleared, or previously-cached content will not be seen by FiddlerCore.

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pietro
Top achievements
Rank 1
answered on 11 Dec 2015, 12:30 PM

Hello Eric,

yes with clean cache i get more hits, but still I can not find the resources that I want.

When in the game is unleashed an event, fiddler read only {"success":true}

nothing about energy, ammunition, weapons, other players, or whatever..

where are the data exchanged client/server :(

0
Eric Lawrence
Telerik team
answered on 11 Dec 2015, 06:22 PM
Hi, Pietro--

There's no magic in the network. If you share a SAZ file of the traffic (collected in Fiddler) I could probably help you find it, but it's impossible for me to guess without actually seeing the traffic.

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pietro
Top achievements
Rank 1
answered on 12 Dec 2015, 05:53 PM

Hello Eric here file.saz can't upload :(

I think the things I look for are

Content-Type: application/x-compressed-json

and

Content-Type: application/x-shockwave-flash

how to read or how can I share with you my file.saz?

0
Eric Lawrence
Telerik team
answered on 14 Dec 2015, 07:28 PM
Hello, Pietro--

You can send me a SAZ file by clicking Help > Send Feedback, which will open an email to fiddler{atTelerikdotcom}

Regards,
Eric Lawrence
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pietro
Top achievements
Rank 1
answered on 14 Dec 2015, 08:04 PM

Hi Eric, I sent..

I am truly thankful :)

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