Another attempt at fixing the previous issue, HttpClient was giving 403 on cookies reuse.

This commit is contained in:
ruri
2019-05-01 17:49:42 +02:00
parent 66b0a26cef
commit f1c5459380
+8 -1
View File
@@ -105,7 +105,7 @@ namespace RuriLib
CookieContainer cookies = new CookieContainer();
foreach (var cookie in data.Cookies)
cookies.Add(new Cookie(cookie.Key, cookie.Value));
cookies.Add(uri, new Cookie(cookie.Key, cookie.Value));
if (data.UseProxies)
{
@@ -150,6 +150,13 @@ namespace RuriLib
if (data.HasClearance)
{
data.Log(new LogEntry("Skipping CF Bypass because there is already a valid cookie", Colors.White));
// Blockception!
BlockRequest req = new BlockRequest();
req.Method = Extreme.Net.HttpMethod.GET;
req.Url = localUrl;
req.Process(data);
return;
}
else // Otherwise solve the CF challenge
{