Capture Https Traffic

6 posts, 0 answers
  1. Avinash
    Avinash avatar
    10 posts
    Member since:
    Jan 2015

    Posted 20 Feb 2015 Link to this post

    Hi Eric,
    I was a newbie to FiddlerCore.I want to capture https traffic when requested to website using Selenium and FiddlerCore in .net.Coded as below 

    CODE:

    CONFIG.bCaptureCONNECT = true;
     CONFIG.IgnoreServerCertErrors = true;
    var cert = InstallCertificate();// getting true
    FiddlerCoreStartupFlags flags = FiddlerCoreStartupFlags.DecryptSSL & FiddlerCoreStartupFlags.AllowRemoteClients & FiddlerCoreStartupFlags.CaptureFTP & FiddlerCoreStartupFlags.ChainToUpstreamGateway & FiddlerCoreStartupFlags.MonitorAllConnections & FiddlerCoreStartupFlags.CaptureLocalhostTraffic;
    FiddlerApplication.Startup(desiredPort, flags);
    FiddlerApplication.BeforeRequest += RequestDetails;

    private static void RequestDetails(Session oSession)
            {
                Console.WriteLine("Request URL {0}", oSession.fullUrl);// getting only http traffic details
                
            }

    public static bool InstallCertificate()
            {
               
                if (!CertMaker.rootCertExists())
                {
                    if (!CertMaker.createRootCert())
                        return false;

                    if (!CertMaker.trustRootCert())
                        return false;
                }

                return true;
            }

    Could you suggest me the way to capture https traffic


    Thank you

    Regards,
    Avinash
  2. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 24 Feb 2015 Link to this post

    Hi,

    Decryption requires that makecert.exe or the certificate provider be located in the appropriate folder.
    It also requires that the client trust the root certificate.

    CertMaker.TrustRootCert modifies the Windows Certificate Store.

    Unlike Chrome, IE, Safari, etc, Firefox does not use the Windows Certificate Store.
     

    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.

     
  3. Avinash
    Avinash avatar
    10 posts
    Member since:
    Jan 2015

    Posted 26 Feb 2015 in reply to Eric Lawrence Link to this post

    Hi Eric,

    Getting following Exception at OnLogString Event:
         
    FiddlerApplication.Log.OnLogString+= delegate(object sender, LogEventArgs e)
                {
    Console.WriteLine("Log {0}", e.LogString);
    //getting following text
    Process-determination failed. fiddler.config.path.lsof=/usr/sbin/lsof
    Call returned 2.
    System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    at Fiddler.Winsock.GetPIDFromLSOF(Int32 iPort)
    };

    Thank you,
    Avinash
  4. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 26 Feb 2015 Link to this post

    Hi, Avinash-- Please open a new ticket for new issues. This will help ensure that your issues aren't overlooked.

    You didn't say what platform you're using, but the error message here suggests that you're using FiddlerCore on Mono on either Mac or Linux. The error message means exactly as it says-- it can't find the lsof executable because the value of the fiddler.config.path.lsof preference is set incorrectly.

    The most likely explanation is that you could fix this by:

    FiddlerApplication.Prefs.SetStringPref("fiddler.config.path.lsof", "/usr/bin/lsof");


    But if that doesn't work, you'll need to find where lsof is on your system.

    Only the Mono builds of Fiddler use lsof because IPHelper.dll does not exist on Mac or Linux, and hence the code described in this blog post does not run on those platforms.

  5. Avinash
    Avinash avatar
    10 posts
    Member since:
    Jan 2015

    Posted 27 Feb 2015 in reply to Eric Lawrence Link to this post

    thanks for reply Eric,i'm using windows 8.1.
  6. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 27 Feb 2015 Link to this post

    The error message below indicates that you're using the Mono build of FiddlerCore. You should use the regular builds, which run only on Windows.

    http://www.telerik.com/fiddler/fiddlercore

    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.

     
Back to Top