Removed the error being thrown on Unknown Protection during CF bypass.

This commit is contained in:
ruri
2019-05-12 00:59:07 +02:00
parent 31e36a16a3
commit 301b1fc175
+9 -2
View File
@@ -156,6 +156,10 @@ namespace RuriLib
{ {
data.Log(new LogEntry($"[Success] Protection bypassed: {result.DetectResult.Protection}", Colors.GreenYellow)); 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 else
{ {
throw new Exception($"CF Bypass Failed: {result.FailReason}"); throw new Exception($"CF Bypass Failed: {result.FailReason}");
@@ -183,8 +187,11 @@ namespace RuriLib
data.Proxy.Cfduid = cfduid; data.Proxy.Cfduid = cfduid;
} }
data.Log(new LogEntry("Got Cloudflare clearance!", Colors.GreenYellow)); if (clearance != "")
data.Log(new LogEntry(clearance + Environment.NewLine + cfduid + Environment.NewLine, Colors.White)); {
data.Log(new LogEntry("Got Cloudflare clearance!", Colors.GreenYellow));
data.Log(new LogEntry(clearance + Environment.NewLine + cfduid + Environment.NewLine, Colors.White));
}
// Get code // Get code
data.ResponseCode = ((int)response.StatusCode).ToString(); data.ResponseCode = ((int)response.StatusCode).ToString();