Login to start a new topic

Response modification error

I made some progress, if I paste the request url in a browser, I get the modified response, but if I launch the software i'm tryna bypass it's not modifing the response, or dunno. Fiddler everywhere can't even see the process's request, but http debugger pro does.

here's my code, am I doing something wrong?


 

using System;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
 
namespace FiddlerCore_ModifyResponse
{
    class Program
    {
        static async Task Main(string[] args)
        {
          
            FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.bc.Debug", true);
 
            BCCertMaker.BCCertMaker certProvider = new BCCertMaker.BCCertMaker();
            CertMaker.oCertProvider = certProvider;
            FiddlerApplication.ResponseHeadersAvailable += FiddlerApplication_ResponseHeadersAvailable;
 
            Fiddler.FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse;
            
 
        
 
            FiddlerCoreStartupSettings startupSettings =
                                            new FiddlerCoreStartupSettingsBuilder()
                                                .ListenOnPort(8887)
                                                .DecryptSSL()
                                                .RegisterAsSystemProxy()
                                                .Build();
 
 
            FiddlerApplication.Startup(startupSettings);
            Console.WriteLine("\nPROXY set, waiting for request");
            Console.WriteLine("enter to remove proxy");
 
            Console.ReadLine();
            FiddlerApplication.Shutdown();
        }
 
 
        private static void FiddlerApplication_BeforeResponse(Session oSession)
        {
 
          
 
 
            if (oSession.fullUrl.Contains("xyz"))
            {
                oSession.bBufferResponse = true;
                oSession.utilDecodeResponse();
 
               
                oSession.utilDecodeResponse();
                var oBody = System.Text.Encoding.UTF8.GetString(oSession.responseBodyBytes);
               
                oBody = "522b349923da5dc131887d";
               
                oSession.utilSetResponseBody(oBody);
            }
  
        }
 
        
 
        private static void FiddlerApplication_ResponseHeadersAvailable(Session oSession)
        {
 
            if (oSession.fullUrl.Contains("xyz"))
            {
                oSession.bBufferResponse = true;
            }
        }
    }
}

 

1 Comment

Note: The code above is not related to Fiddler Everywhere and looks like an implementation used with the FiddlerCore library.


Based on your issue description, it sounds like the process you are trying to capture is not respecting the custom proxy you are setting on port 8877. HTTP Debugger is a sniffer and not a proxy (based on their product page), which explains the difference in the behavior.

 

Login to start a new topic