public void AutoTamperRequestBefore()

in Source/Program.cs [413:446]


        public void AutoTamperRequestBefore(Session session)
        {
            // Exit early if plugin is disabled
            if (!pluginEnabled)
                return;

            string host = session.host.ToLower();

            if (blockedHostList.ContainsHost(host) || (blockExternalServices && !host.Contains("xboxlive.com")))
            {
                // Exists in C:\Program Files (x86)\Fiddler2\ResponseTemplates
                string response = "404_Plain.dat";

                // The path for these response templates can be found via CONFIG.GetPath("Responses")
                switch (failureType)
                {
                    case FailureType.NotFound:
                        response = "404_XboxLiveResiliency_NotFound.dat";
                        break;
                    case FailureType.ServiceUnavailable:
                        response = "503_XboxLiveResiliency_ServiceUnavailable.dat";
                        break;
                    case FailureType.RateLimitBurst:
                        response = "429_XboxLiveResiliency_RateLimit_Burst.dat";
                        break;
                    case FailureType.RateLimitSustained:
                        response = "429_XboxLiveResiliency_RateLimit_Sustained.dat";
                        break;
                }

                session["x-replywithfile"] = response;
                MarkSession(session);
            }
        }