From 301b1fc17506f8cb5f0b0462a60b6c072b89f08d Mon Sep 17 00:00:00 2001 From: ruri Date: Sun, 12 May 2019 00:59:07 +0200 Subject: [PATCH] Removed the error being thrown on Unknown Protection during CF bypass. --- RuriLib/Blocks/BlockBypassCF.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/RuriLib/Blocks/BlockBypassCF.cs b/RuriLib/Blocks/BlockBypassCF.cs index 9fbfcfc..bc32b77 100644 --- a/RuriLib/Blocks/BlockBypassCF.cs +++ b/RuriLib/Blocks/BlockBypassCF.cs @@ -156,6 +156,10 @@ namespace RuriLib { data.Log(new LogEntry($"[Success] Protection bypassed: {result.DetectResult.Protection}", Colors.GreenYellow)); } + else if (result.DetectResult.Protection == CloudflareProtection.Unknown) + { + data.Log(new LogEntry("Unknown protection, skipping the bypass!", Colors.Tomato)); + } else { throw new Exception($"CF Bypass Failed: {result.FailReason}"); @@ -183,8 +187,11 @@ namespace RuriLib data.Proxy.Cfduid = cfduid; } - data.Log(new LogEntry("Got Cloudflare clearance!", Colors.GreenYellow)); - data.Log(new LogEntry(clearance + Environment.NewLine + cfduid + Environment.NewLine, Colors.White)); + if (clearance != "") + { + data.Log(new LogEntry("Got Cloudflare clearance!", Colors.GreenYellow)); + data.Log(new LogEntry(clearance + Environment.NewLine + cfduid + Environment.NewLine, Colors.White)); + } // Get code data.ResponseCode = ((int)response.StatusCode).ToString();