mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
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:
@@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user