Clearance and Cfduid are now added on bot start too so you can place REQUESTs before CFBYPASSes while reusing cookies if you need to do so.

This commit is contained in:
ruri
2019-10-16 16:02:20 +02:00
parent bc347c0bd6
commit a86cc8de0e
2 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ namespace RuriLib
if (data.Proxy.Clearance != "" && !data.GlobalSettings.Proxies.AlwaysGetClearance)
{
data.Log(new LogEntry("Skipping CF Bypass because there is already a valid cookie", Colors.White));
data.Cookies.Add("cf_clearance", data.Proxy.Clearance);
data.Cookies["cf_clearance"] = data.Proxy.Clearance;
return;
}
}
@@ -224,7 +224,7 @@ namespace RuriLib
if (ErrorOn302 && data.ResponseCode.Contains("302"))
{
data.Status = BotStatus.ERROR;
};
}
}
}
}
+7
View File
@@ -700,6 +700,13 @@ namespace RuriLib.Runner
}
catch { }
// Set the cloudflare cookies (to be used in normal requests) if we already have clearance and we don't have to get it each time
if (botData.UseProxies && botData.Proxy != null && botData.Proxy.Clearance != "" && !Settings.Proxies.AlwaysGetClearance)
{
botData.Cookies["cf_clearance"] = botData.Proxy.Clearance;
botData.Cookies["__cfduid"] = botData.Proxy.Cfduid;
}
// Initialize the LoliScript
LoliScript loli = new LoliScript(Config.Script);
loli.Reset();