Telerik Forums
Fiddler Forum
1 answer
417 views

Hello,

I have added request by timer custom code.

FiddlerApplication.UI.actCaptureScreenshot(false);

What should be added in this part to Stop Timer using hotkey?

Thanks.

Regards,

Adam

Adam
Top achievements
Rank 1
Iron
 updated question on 19 Jul 2021
17 answers
1.0K+ views
Been using Fiddler for awhile.  It's an amazing program.  I'm no longer able to capture https traffic from the Android Facebook app.  I've read all the threads and searched all around for a solution.  I've seen discussions on ssl pinning, killswitch, etc.  I've used proxydroid in the past, as well.  Does Facebook now have this certificate pinning issue or is there another workaroud available.  It used to work great.  I would rather test on a non-rooted device.  Thanks.
Herb
Top achievements
Rank 1
Iron
 answered on 16 Jul 2021
0 answers
782 views

Hello everybody

i have this code in fiddlerScript :

        if(oSession.HostnameIs("example.com")) { 
            oSession.utilDecodeResponse();
            oSession.utilReplaceRegexInResponse('text-align: left; width: 120px;">[^<]*</span>','text-align: left; width: 120px;">xxxxxxxxx</span>');
            oSession.utilReplaceRegexInResponse('text-align: left; width: 145px;">[^<]*</span>','text-align: left; width: 145px;">yyyyyyyy</span>');

---------------------------------------

In the webpage there is more element that will begin like that :    text-align: left; width: 145px;

my question is : how can i replace only the first string that will seen on the webpage , not all  ?!?!

thanks !

eric
Top achievements
Rank 1
 asked on 16 Jul 2021
1 answer
923 views

Hello, I have some old OAUTH/XAUTH code I am debugging and it uses the old DevDefined library.  The underlying HTTP requests/responses are simply not being picked up by Fiddler.  All other requests and responses on my machine are being picked up and displayed.

Here is an example of some C# code invoking the DevDefined method GetAccessTokenUsingXAuth(), and I know it is running and working, but I can't see the underlying request/response and wonder if some proxy is involved:

        /// <summary>
        /// Create Session
        /// </summary>
        /// <returns>Session, authorized for OAUTH using XAUTH protocol</returns>
        private static IOAuthSession CreateSession()
        {
            var consumerContext = new OAuthConsumerContext
            {
                ConsumerKey = ConsumerKey,
                ConsumerSecret = ConsumerSecret,
                SignatureMethod = SignatureMethod.HmacSha1,
            };

            var session = new OAuthSession(consumerContext, new Uri(BdBaseUrl + XAuthRelativeUrl));

            try
            {
                session.GetAccessTokenUsingXAuth(null, ServiceUser, ServicePassword);
            }
            catch (Exception e)
            {
                if (DumpOAuthInfoOnException)
                {
                    string serializedSession = JsonConvert.SerializeObject(session);
                    string msg =
                        $"Inner Exception on GetAccessTokenUsingXAuth.  Username {ServiceUser}, Password {ServicePassword}, Session: {serializedSession}";
                    throw new Exception(msg, e);
                }
                throw;
            }

            return session;
        }
Any help to be given here?  I have never tried to viewed one of these messages with Fiddler before, so I can't say it ever worked.  But the code has been working fine for years and years.
Lini
Telerik team
 answered on 15 Jul 2021
1 answer
724 views

i need to replace 2 dynamic values from a website ! everytime when i visit website i will see randomize numbers like a clock ! and i need to catch the values to replace with anothers. i attached a PART of the website to see it !

i have tryed this and not work :

 

  static function OnBeforeResponse(oSession: Session) {
        if (m_Hide304s && oSession.responseCode == 304) {
            oSession["ui-hide"] = "true";
        }
        if(oSession.HostnameIs("example.com"))
        {
            oSession.bBufferResponse = true;
            oSession.utilDecodeResponse();
        
            var pattern = '<SPAN
        id=ValueA class=CSItemLabel
        style="FONT-SIZE: 11px; HEIGHT: 17px; WIDTH: 120px; FONT-WEIGHT: bold; COLOR: green; PADDING-BOTTOM: 2px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 2px; DISPLAY: inline-block; PADDING-RIGHT: 0px; BACKGROUND-COLOR: #efefef\">(?<VAL>.*)</SPAN>';        
                    
            var sNewBody: Match = Regex.Match(oSession.GetResponseBodyAsString(),pattern);
            var valueA = sNewBody.Groups["VAL"].Value;

        
            pattern = '<SPAN id=ValueB
        class=CSItemLabel
        style="FONT-SIZE: 11px; HEIGHT: 17px; WIDTH: 145px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; TEXT-ALIGN: left; PADDING-TOP: 0px; PADDING-LEFT: 2px; DISPLAY: inline-block; PADDING-RIGHT: 0px; BACKGROUND-COLOR: #efefef\">(?<VAL>.*)</SPAN>';
            var sNewBody2 : Match = Regex.Match(oSession.GetResponseBodyAsString(),pattern);
            var valueB = sNewBody2.Groups["VAL"].Value;
        
            var strContent = oSession.GetResponseBodyAsString().Replace(valueA,"99.614,99").Replace(valueB,"88.123,88");
        
            oSession.utilSetResponseBody(strContent);
        }
    }

 

also i tryed this :

if (oSession.HostnameIs("https://example.com) && oSession.url.EndsWith("etc.aspx"))
{   
   oSession.utilDecodeResponse();
   var sBody = oSession.GetResponseBodyAsString();
   sBody = Regex.Replace(sBody, "(<SPAN id=ValueA class=CSItemLabel[^>]+>)[^<]+", "$1 99.614,99");
   sBody = Regex.Replace(sBody, "(<SPAN id=ValueB class=CSItemLabel[^>]+>)[^<]+", "$1 88.123,88");
   oSession.utilSetResponseBody(sBody);
}
 

no success ! please help me somebody !

i attached the files to see it ! thanks in advice !

eric
Top achievements
Rank 1
 updated question on 14 Jul 2021
1 answer
997 views

I tried to create a certificate by this way.

  1. Install  "fiddlercertmaker.exe" (get it from http://fiddler2.com/r/?fiddlercertmaker/.)
  2. ”prefs set fiddler.certmaker.bc.ee.yearsvalid 1”
  3. Options -> HTTPS tab -> "Actions" -> ”Reset All Certificates”
  4. Options -> HTTPS tab -> "Actions" -> ”Trust Root Certificates" 

see config.jpg and Option.jpg

However, the term of the certificate is 10 years.”Certificates.jpg”

If my understanding is mistaken, please tell me.

Lini
Telerik team
 answered on 14 Jul 2021
0 answers
203 views

Sometimes when I use fiddler for a while, connection will closed by client when response is large (random for small/medium size).

With browser (Firefox and Chrome), I'll get
SSL_ERROR_BAD_MAC_READ or
SSL_ERROR_RX_RECORD_TOO_LONG

Even in emulator (android), it's the same. Response time is not different from when it's normal.

More info:
- Problem persist even without Fiddler script
- But if I use oSession.Ignore() in Fiddler script, it'll run fine.
- If I close Fiddler, it'll run fine.
- Restart Fiddler not eliminate the problem but restart the computer works.
- If I replay (r) in Fiddler, it has no abort icon in new request
- I try to export .saz the only different is: Process name and PipeInfo CltReuse="true" (ClientPipeReused?) so I try uncheck "Reuse client&server connections" in Options. But it's still ClientPipeReused and aborted > This is only my testing. But I think it's unrelated, replay is issue by Fiddler so it just not abort it own request.

It's not a big deal as I can restart my pc and it's not too often but it would be good if there's a way to fix a problem without restarting the pc.

Ryuu
Top achievements
Rank 1
Iron
 updated question on 08 Jul 2021
0 answers
556 views

I wrote a test program to check fiddlercore, the certificate installed, but HTTPS traffic is not captured, only HTTP. Exactly the same program captures HTTPS traffic fine on another edition of Windows 10 (Enterprise), but on Windows 10 home (2004) HTTPS traffic is not captured. Do I need to change any Windows settings to capture HTTPS traffic?

 

 

My program:


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.OutputEncoding = Encoding.UTF8;
            if (!CertMaker.rootCertIsTrusted())
            {
                var rootCertificatePassword = "Password1";
                BCCertMaker.BCCertMaker certProvider = new BCCertMaker.BCCertMaker();
                CertMaker.oCertProvider = certProvider;
                string rootCertificatePath = @"RootCertificate.p12";
                if (!File.Exists(rootCertificatePath))
                {
                    certProvider.CreateRootCertificate();
                    certProvider.WriteRootCertificateAndPrivateKeyToPkcs12File(rootCertificatePath, rootCertificatePassword);
                }
                if (File.Exists(rootCertificatePath))
                {
                    certProvider.ReadRootCertificateAndPrivateKeyFromPkcs12File(rootCertificatePath, rootCertificatePassword);
                }
                CertMaker.trustRootCert();
                if (CertMaker.rootCertIsTrusted())
                {
                    Console.WriteLine("Certificate is installed");
                }
                else
                {
                    Console.WriteLine("Certificate is not installed");
                }
                var settings = new FiddlerCoreStartupSettingsBuilder()
                .ListenOnPort(6666)
                .ChainToUpstreamGateway()
                .DecryptSSL()
                .OptimizeThreadPool()
                .RegisterAsSystemProxy()
                .Build();
                FiddlerApplication.Startup(settings);
                FiddlerApplication.AfterSessionComplete += session =>
                {
                    if (session != null)
                    {
                        Console.WriteLine(session.fullUrl);
                    }
                };
                Console.ReadLine();
            }
        }
    }
}

Denis
Top achievements
Rank 1
 asked on 07 Jul 2021
1 answer
259 views

I got a session;

But I don't want to request now

How to resubmit the session?

Sorry, my English is not good

Nick Iliev
Telerik team
 answered on 28 Jun 2021
1 answer
1.1K+ views

I use Fiddler Classic.

I enable Decrypt HTTPS and Trust Certificate.

Most websites can capture traffic, but some website display error: Err_Connection_Reset. How to fix it?

Thanks for reading!

Nick Iliev
Telerik team
 answered on 28 Jun 2021
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?