Telerik Forums
Fiddler Forum
2 answers
2.2K+ views
01.
if(oSession.HostnameIs("exemple.com")&& oSession.uriContains("login")) {
02.    // Color this response, so we can spot it in Fiddler
03.    oSession["ui-backcolor"] = "lime";
04. 
05.    // Convert the request body into a string
06.    var oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
07. 
08.    // Convert the text into a JSON object
09.    var j = Fiddler.WebFormats.JSON.JsonDecode(oBody);
10. 
11.    // Inside of our dictionary, we have an array (ArrayList) called "placements"
12.    var testObject = j.JSONObject["teste"];
13.    /* Change this to different values, e.g. "0.0", 0.0, null, "", etc. */
14.     
15.                   j.JSONObject["auth"]="true";
16.                   j.JSONObject["user"]="false";
17.     
18. 
19.    // Convert back to a byte array
20.    var modBytes = Fiddler.WebFormats.JSON.JsonEncode(j.JSONObject);
21. 
22.    // Convert json to bytes, storing the bytes in request body
23.    var mod = System.Text.Encoding.UTF8.GetBytes(modBytes);
24.    oSession.ResponseBody = mod;
25. 
26. 
27. 
28.}
Eric R | Senior Technical Support Engineer
Telerik team
 answered on 24 Apr 2020
2 answers
341 views

Hi,

I'm running Fiddler for .Net 4.6.1 v5.0.20202.18177

In the Fiddler options dialog I have "Caputre HTTPS CONNECTs", and "Decrypt HTTPS traffic" enabled"

I have Postman installed on the same machine, with Fiddler set as its proxy. I make a https call to a cloud web service from Postman. I see a session row in Fiddler with a Host of "Tunnel to" that hits the URL of the web service.

If I select Help\Troubleshoot from Fiddler then it also shows the "real" session with the request and response payloads. If I right-click the "real" (filtered) session and select "Comment" then the following is displayed, repeated many times:

"Hidden due to FTS>Path"

I'm trying to prevent this "real" session being filtered. I've checked the filters at the bottom left of the Fiddler screen and none of them match. I don't have the filters tab enabled. 

How can I prevent my "real" session from being filtered?

Thanks,

Rob.

 

rob
Top achievements
Rank 1
 answered on 24 Apr 2020
1 answer
979 views

I updated fiddler to 5.0.20202.18177 and I constantly get 504 errors when hitting known working end points now. In the previous versions I did not. I also have a number of unit tests that hit these end points and they work every time I run them. So I know the server is working.

Any help or a method to roll back my version of fiddler would be great!

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 24 Apr 2020
7 answers
605 views

I remember that the Fiddler ScriptEditor in JScript provided IntelliSense years ago.

Installing Fiddler now to a new machine, having C# selected as script language, IntelliSense seems to have gone.

It's utterly hard to program rules without being able to search and find appropriate properties of the oSession object.

How can I enable IntelliSense for the C# ScriptEditor?

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 23 Apr 2020
4 answers
692 views

How to get rid of this error?

Everything seems normal until I use CCleaner to clean up something. I let it run, scan and delete automatically and after that, I didn't check again.

One day later, when I access any sites with HTTPS, everything turns into this error and prevent me from access those sites.

Google Chrome says: Your connection is not private, NET::ERR_CERT_INVALID.

What should I do now?

It seems that I have deleted some files that Fiddler needs?

I found some guides in Google.com, which are related to this error to refer, such as:

https://usefulpcguide.com/16666/your-connection-is-not-private/

Not nothing is useful and help me get rid of it.

Tony
Top achievements
Rank 2
 answered on 21 Apr 2020
1 answer
159 views
Need Help getting fiddler up and running on MAC
Eric R | Senior Technical Support Engineer
Telerik team
 answered on 20 Apr 2020
1 answer
107 views
Super new and trying to find a way to automatically raise a number by 1 then execute and repeat? Example change "Id":"1" to "Id":"2" then execute and change 2 to 3 and so on if that makes sense. 
Eric R | Senior Technical Support Engineer
Telerik team
 answered on 16 Apr 2020
5 answers
774 views

Hello there,

I know every time you install Fiddler in a different machine and enable it to decrypt HTTPS it generates a new certificate that is different for each machine and you need to install it in client devices so the decryption can happen.  I thought I had find a way around this until today it didn't work for me anymore but just want to ask in case something can still be done :-).

I built a cloud server and installed Fiddler and set it up to decrypt HTTPS then configured a bunch of devices to accept the certificate and everything was fine.  Once finished my testing since cloud servers cost money and I didn't wanna pay for it while idle I created an image and deleted the server in hopes next time I would have all the configuration and it seemed to work fine.  I recreated the server from the image a bunch of times and every time I was able to connect the devices and do my testing no problem... well, until today when I just did the same again and I'm getting the …  "!SecureClientPipeDirect failed: System.ComponentModel.Win32Exception The credentials supplied to the package were not recognized for pipe (CN=*.somerandomdomain.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com)" .. which basically means if I'm correct I need to generate a new certificate which then I need to install in all the clients :-\ .. I tried just downloading the certificate again from the fiddler proxy URL but it is the same of course and if I do a binary compare using "fc.exe /b" I can confirm they're identical so it seems my only way would be to generate a new one … before I give up to that, is there anything else I could do to avoid having to do it? my main issue is I don't have all the devices on hand and now I'd have to reach to every user and explain one by one how to do this and some of them are not that tech savvy :-(

Cheers,

Carlos.

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 16 Apr 2020
2 answers
405 views

Hi,

 

I am using FiddlerCore with PuppeteerSharp browser automation tests in order to get performance metrics (thanks to FiddlerCore) like page loading time, DOM loading time, TTFB, HTTPs handshake time, ns lookup...etc.

I am facing a problem trying to access some website like: https://outlook.office.com which redirects to to Microsoft login portal. I have the impression that I am missing some configuration in my code but I cannot figure out what the problem is. The code I am use is the following: 

internal class FiddlerProxy : IDisposable
{
    public string Uri { get; private set; }
    public Proxy ProxyEndpoint { get; private set; }
    public int SessionCount { get; private set; }
 
    internal FiddlerProxy(string uri)
    {
        Uri = uri;
        ProxyEndpoint = null;
        SessionCount = 1;
    }
 
    public void Start()
    {
        // Register for the FiddlerCore events
        FiddlerApplication.AfterSessionComplete += OnAfterSessionComplete;
        FiddlerApplication.BeforeRequest += OnBeforeRequest;
        FiddlerApplication.OnNotification += delegate (object sender, NotificationEventArgs oNEA) { Console.WriteLine("** NotifyUser: " + oNEA.NotifyString); };
        FiddlerApplication.Log.OnLogString += delegate (object sender, LogEventArgs oLEA) { Console.WriteLine("** LogString: " + oLEA.LogString); };
         
        // Create an HTTPs certificate and Start the proxy
        if (!InstallCertificate())
            throw new InvalidOperationException("Creating a certiicate failed. Https traffic cannot be captured.");
 
        if (FiddlerApplication.IsStarted())
            Stop();
 
        FiddlerApplication.Startup(0, FiddlerCoreStartupFlags.Default & ~FiddlerCoreStartupFlags.RegisterAsSystemProxy);
        ProxyEndpoint = FiddlerApplication.CreateProxyEndpoint(FiddlerApplication.oProxy.ListenPort, true, "localhost");
    }
 
    public static bool InstallCertificate()
    {
        if (!CertMaker.rootCertExists())
        {
            if (!CertMaker.createRootCert())
                return false;
 
            if (!CertMaker.trustRootCert())
                return false;
        }
 
        return true;
    }
 
    private void OnBeforeRequest(Session session)
    {
        if (!ShouldProcess(session))
            return;
        else
        {
            // Do something
        }
    }
 
    private void OnAfterSessionComplete(Session session)
    {
        if (!ShouldProcess(session))
            return;
 
        Console.WriteLine($"Session no. {SessionCount++} coming from :{session.fullUrl}:");
        Console.WriteLine(session.Timers.ToString(true));
    }
 
    private bool ShouldProcess(Session session)
    {
        if (session.RequestMethod.Equals("CONNECT", StringComparison.InvariantCultureIgnoreCase))
            return false;
 
        if (session.fullUrl.Contains(Uri))
            return true;
        else
            return false;
    }
 
    public void Stop()
    {
        if (ProxyEndpoint != null)
        {
            ProxyEndpoint.Detach();
            ProxyEndpoint.Dispose();
        }
         
        FiddlerApplication.AfterSessionComplete -= OnAfterSessionComplete;
        if (FiddlerApplication.IsStarted())
        {
            FiddlerApplication.Shutdown();
        }
    }
 
    public void Dispose()
    {
        Stop();
    }
}

Then I use FiddlerProxy class in Main() method in Program.cs as follows:

static void Main(string[] args)
{
    var uriToMonitor = "https://outlook.office.com";
    using (var fiddlerProxy = new FiddlerProxy(uriToMonitor))
    {
        fiddlerProxy.Start();
        LoadPageUsingPuppeteerSharp(uriToMonitor, fiddlerProxy.ProxyEndpoint.ListenPort).Wait();
    }
    Console.ReadLine();
}
 
public static async Task LoadPageUsingPuppeteerSharp(string uri, int proxyPort)
{
    var launchOptions = new LaunchOptions
    {
        ExecutablePath = @".\chrome-win\chrome.exe",
        Headless = false,
        IgnoreHTTPSErrors = true,
        Args = new[] {
            $"--proxy-server=127.0.0.1:{proxyPort}",
            "--no-sandbox",
            "--disable-infobars",
            "--disable-setuid-sandbox",
            "--ignore-certificate-errors"
        }
    };
 
    using (var browser = await Puppeteer.LaunchAsync(launchOptions))
    {
        var context = await browser.CreateIncognitoBrowserContextAsync();
        using (var page = await context.NewPageAsync())
        {
            await page.SetUserAgentAsync("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3563.0 Safari/537.36");
            await page.SetViewportAsync(new ViewPortOptions { Width = 1500, Height = 800 });
             
            await page.GoToAsync(uri);
        }
    }
}

 

Attached are the console output that I get when running my program, and two screenshots of my chrome browser.

One last question, is it possible to configure an HTTP Proxy (some proxy that we have in our organisation) through which FiddlerCore can send requests?

 

Thank you in advance for your help.

Adel

ADEL
Top achievements
Rank 1
 answered on 16 Apr 2020
3 answers
1.2K+ views

I'm using the latest Fiddler version and O365 extension, but I'm still unable to get through the authentication process when using Oauth.  I've been trying with EWS editor, and both Oauth and basic fail.  Outlook fails to connect to an Exchange Online mailbox.  Using Chrome and IE can't get to outlook on the web, or google.com for that matter.  It seems to be having a problem with SSL, but I'm not clear on that.

 

EWS editor error using basic

Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()

Exception details: Message: The request failed. The underlying connection was closed: An unexpected error occurred on a send.
Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
Source: Microsoft.Exchange.WebServices

 

EWS editor error using Oauth

System.Threading.Tasks.Task`1.get_Result()

Exception details:
Message: One or more errors occurred.
Type: System.AggregateException
Source: mscorlib

matt
Top achievements
Rank 1
 answered on 13 Apr 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?