Telerik Forums
Fiddler Forum
2 answers
342 views

I am using Chromium to embed an web browser in a winforms app.  I insert custom JavaScript into the pages to automatically redirect the user to a login page if a certain HTML condition exists.  All this works as expected so I then added FiddlerCore with the hopes of modifying certain HTTP requests.  The problem is as long as FiddlerCore is running, page redirects initiated via JavaScript calls are canceled (see attached image).  I have very minimal code running, so I'm guessing I'm missing a configuration setting somewhere.  Any help would be greatly appreciated.  Below is the FiddlerCore code that I'm using:

 

public void Start()
{
    if (!IsStarted)
    {
        IsStarted = true;
 
        Fiddler.FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest;
        Fiddler.FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse;
 
        // For forward-compatibility with updated FiddlerCore libraries, it is strongly recommended that you
        // start with the DEFAULT options and manually disable specific unwanted options.
        FiddlerCoreStartupFlags oFCSF = FiddlerCoreStartupFlags.Default;
 
        // NOTE: In the next line, you can pass 0 for the port (instead of 8877) to have FiddlerCore auto-select an available port
        int iPort = 8877;
        Fiddler.FiddlerApplication.Startup(iPort, oFCSF);
 
        FiddlerApplication.Log.LogFormat("Created endpoint listening on port {0}", iPort);
 
    }
}
 
public void Stop()
{
    if (IsStarted)
    {
        IsStarted = false;
        Fiddler.FiddlerApplication.Shutdown();
        Fiddler.FiddlerApplication.BeforeRequest -= FiddlerApplication_BeforeRequest;
        Fiddler.FiddlerApplication.BeforeResponse -= FiddlerApplication_BeforeResponse;
    }
}
 
void FiddlerApplication_BeforeRequest(Fiddler.Session oSession)
{
         Console.WriteLine(oSession.fullUrl);
}
 
void FiddlerApplication_BeforeResponse(Fiddler.Session oSession)
{
}
Andy
Top achievements
Rank 1
 answered on 30 Dec 2015
3 answers
994 views

Hi,

 

I try to get cookie values in request header with GetTokenValue(), but failing.

 

Script:

var result1 = oSession.RequestHeaders.GetTokenValue("Cookie",  "target");

var result2 = oSession.RequestHeaders.GetTokenValue("Cookie",  "TEST_target");

 

[Request Header A] Cookie: target=X; TEST_target=Y

--> resut1 = X, result2=Y

 

[Request Header B] Cookie: Test_target=Y; target=X

--> resut1 = Y, result2=Y

 

Is this in the specifications? Please give me some advice.

Eric Lawrence
Telerik team
 answered on 29 Dec 2015
1 answer
261 views

I've made a method which interacts with Fiddler in C#. The code looks like this:

using Fiddler; 
namespace SmartMocks
{
    public class SmartMocks
    {
        public static void SmartMock(Session oSession, string directoryPath)
        { //etc...
After referencing the DLL in Fiddler > Options > Extensions, I add the following to the top of FiddlerScript:

import SmartMocks;

And then I can call the function in FiddlerScript like this:

SmartMocks.SmartMocks.SmartMock(oSession, "C:\\SomeFile.txt");

This works fine. However, I'd like to make SmartMock be an extension method of Fiddler.Session, so that I can use this nicer-looking syntax instead in FiddlerScript:

oSession.SmartMock("C:\\SomeFile.txt");

I'm not familiar with JScript.NET and how it handles references, so I've been having trouble adding this method to Fiddler.Session. I tried changing the code to an extension like this:

namespace SmartMocks
{
    public static class SmartMocks
    {
        public static void SmartMock(this Session oSession, string directoryPath)
        {

However, when compiling FiddlerScript, calling "oSession.SmartMock("C:\\SomeFile.txt")" gives the error "Objects of type 'Fiddler.Session' do not have such a member".

My question is:

  • How do you create an extension method to a class (like Fiddler.Session) in JScript.NET?
Eric Lawrence
Telerik team
 answered on 29 Dec 2015
1 answer
446 views

 When I started decrypting Https connection, it simply doesn't work.

Always I see below message with Untrusted Connection message. I don't remember when this started happening, but it used to be working after I upgraded to windows 10.

I use latest Firefox and Windows 10. I hit the same issue even when I use IE 11, Microsoft Edge.

lc2txe3.sharepoint.com uses an invalid security certificate. The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported. (Error code: sec_error_unknown_issuer)

 

I export the certificate and import into the Firefox, so that I can see cert name DO_NOT_TRUST_Fiddler in Certificate Manager of Firefox. Also, trusted root authority contains DO_NOT_TRUST_Fiddler certificate.

Fiddler Options : Protocols : ssl3;tls1.0;tls1.1;tls1.2 / Certificates are generated by Fiddler.DefaultCertificateProvider

Fiddler 4.6.1.4

Firefox 43.0.2

What else am I missing ?

 

Eric Lawrence
Telerik team
 answered on 28 Dec 2015
2 answers
1.9K+ views

Hi,

I have a flash application that sends flex messages to the server using POST request with application/x-amf content-type.

following piece of code:

        private static void FiddlerApplication_BeforeRequest(Session oSession)
        {
            if (oSession.oRequest.headers.ExistsAndEquals("Content-Type", "application/x-amf"))
            {
                Encoding enc = oSession.GetRequestBodyEncoding(); //we can use Encoding.UTF8..... doesn't matter - same result
                string reqBody = enc.GetString(oSession.requestBodyBytes);
                oSession.requestBodyBytes = enc.GetBytes(reqBody);
            }
        }

WOW!!! In a response i see next:

Headers:

HTTP/1.1 200 OK
Date: Fri, 25 Dec 2015 00:00:26 GMT
Server: Apache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 275
Connection: close
Content-Type: application/x-amf;charset=utf-8

 and body:

..some content...//Unknown AMF type '-65'.Buf���/Client.Message.Encoding....

 

So the server doesn' t like my harmless operation. But i can't understand. I think i did nothing with request body actually.

Eric Lawrence
Telerik team
 answered on 28 Dec 2015
1 answer
119 views

Hi,

I am from ECS Infosolutions Pvt. Ltd. We are running one internal project for server migration for which I need information for following application regarding supporting and compatibility information on Windows server 2008 R2 and Windows server 2012 R2.

Fiddler 2.4.2.6
Fiddler 2.4.6.2
Fiddler 4.4.5.3
Fiddler (remove only)
Fiddler2 2.3.6.7
Fiddler2 2.3.8.3
Fiddler2 2.3.8.5

Appreciate your response on these applications.

Awaiting for reply.

Thank you for your time.

Regards,
Rushikesh

 

Eric Lawrence
Telerik team
 answered on 24 Dec 2015
5 answers
591 views

Hi, I got a working webservice to which I am sendig SOAP-requests. The server demands authentication of the client and authenticates itself to the client via X509-certificates. I've successfully used fiddler as a proxy to send requests to this service and watch the transmitted content by decrypting it with fiddler.

However it turns out that fiddler fails to transmit the requests if they start to get larger. For example a request with 200kb does still work and there are no problems but if I extend the request up to 300 kb it fails with fiddler throwing the following exception:

HTTP/1.1 504 Fiddler - Receive Failure
Date: Mon, 21 Dec 2015 16:05:50 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 17:05:50.804

[Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes.

 

The request works though if I do not use fiddler. So whats the problem here? May it have to do something with the chunks of the request? I had some problems with chunking before that have led to the exact same error message. But I wouldn't know how to resolve this within fiddler...

Eric Lawrence
Telerik team
 answered on 24 Dec 2015
1 answer
100 views
Fiddler hook 4.6.1.5 verification in Firefox 43.02 failed and has been disabled.
Eric Lawrence
Telerik team
 answered on 24 Dec 2015
2 answers
78 views
I will try to explain this as clearly as possible. I installed the HTTPS decrypter setting on Fiddler, went to the local address on my iPhone and installed the certificate and then I modified my iPhone's WiFi settings to my computer's IP and port 8888. It manages to capture traffic when I use Safari and all but when I go to the App Store and some other apps they do not work. Why is this and is there a fix for it?
Mustafa
Top achievements
Rank 1
 answered on 24 Dec 2015
1 answer
171 views

Hi,

 I'm testing a web application which uses https.

 First I used the Fiddler desktop appliction to test the web application and there was a problem with the certificates so i followed this guide http://textslashplain.com/2015/10/30/reset-fiddlers-https-certificates/ and now it works.

 Now when I try to access the same https url and using FiddlerCore it doesn't work. I tried this guide http://weblog.west-wind.com/posts/2014/Jul/29/Using-FiddlerCore-to-capture-HTTP-Requests-with-NET with no luck.

 So my question is how can i do these steps using fiddlercore:

Click Tools > Fiddler Options.
Click the HTTPS tab.
Ensure that the text says Certificates generated by CertEnroll engine.
Click Actions > Reset Certificates. This may take a minute.
Accept all prompts

Thanks

Jesper
Top achievements
Rank 1
 answered on 22 Dec 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?