From 38aac3b449f5aeaa42889b3e515773e22fbb0970 Mon Sep 17 00:00:00 2001 From: ruri Date: Sat, 7 Sep 2019 22:06:53 +0200 Subject: [PATCH] Updated Cloudflare library, removed the warning about System.Net.Http assemblies mismatch and retargeted all the projects to .NET framework 4.7.2. To avoid errors please select Rebuild All in Visual Studio if you're building OpenBullet yourself. --- OpenBullet/App.config | 20 +++--- OpenBullet/OpenBullet.csproj | 3 +- OpenBullet/Properties/Settings.Designer.cs | 9 ++- OpenBullet/packages.config | 2 +- OpenBulletCLI/App.config | 8 +-- OpenBulletCLI/OpenBulletCLI.csproj | 3 +- README.md | 2 +- RuriLib/Blocks/BlockBypassCF.cs | 9 ++- RuriLib/RuriLib.csproj | 71 ++++++++++++++++++++-- RuriLib/app.config | 10 +-- RuriLib/packages.config | 47 +++++++++++++- 11 files changed, 143 insertions(+), 41 deletions(-) diff --git a/OpenBullet/App.config b/OpenBullet/App.config index 7dc2913..f3c97aa 100644 --- a/OpenBullet/App.config +++ b/OpenBullet/App.config @@ -1,23 +1,19 @@ - + - + - + - - + + - - - - - - + + - \ No newline at end of file + diff --git a/OpenBullet/OpenBullet.csproj b/OpenBullet/OpenBullet.csproj index 6a35975..4efeeaa 100644 --- a/OpenBullet/OpenBullet.csproj +++ b/OpenBullet/OpenBullet.csproj @@ -8,7 +8,7 @@ WinExe OpenBullet OpenBullet - v4.6.1 + v4.7.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -30,6 +30,7 @@ false false true + AnyCPU diff --git a/OpenBullet/Properties/Settings.Designer.cs b/OpenBullet/Properties/Settings.Designer.cs index 3be32de..5dfd238 100644 --- a/OpenBullet/Properties/Settings.Designer.cs +++ b/OpenBullet/Properties/Settings.Designer.cs @@ -8,12 +8,11 @@ // //------------------------------------------------------------------------------ -namespace OpenBullet.Properties -{ - - +namespace OpenBullet.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/OpenBullet/packages.config b/OpenBullet/packages.config index 7431dba..8c3d5be 100644 --- a/OpenBullet/packages.config +++ b/OpenBullet/packages.config @@ -17,7 +17,7 @@ - + diff --git a/OpenBulletCLI/App.config b/OpenBulletCLI/App.config index dfbc147..af9adc8 100644 --- a/OpenBulletCLI/App.config +++ b/OpenBulletCLI/App.config @@ -1,11 +1,11 @@ - + - + - + - \ No newline at end of file + diff --git a/OpenBulletCLI/OpenBulletCLI.csproj b/OpenBulletCLI/OpenBulletCLI.csproj index bbf7428..27bfbd9 100644 --- a/OpenBulletCLI/OpenBulletCLI.csproj +++ b/OpenBulletCLI/OpenBulletCLI.csproj @@ -8,7 +8,7 @@ Exe OpenBulletCLI OpenBulletCLI - v4.6.1 + v4.7.2 512 true true @@ -27,6 +27,7 @@ false false true + AnyCPU diff --git a/README.md b/README.md index 71a6e9f..f9c82ad 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The **OpenBullet API** was released. It can be used to host configs remotely on Found a bug? [Create an issue!](https://help.github.com/en/articles/creating-an-issue) # How to build -0. Make sure you have installed the .NET framework (dev) 4.6.1 (I will retarget to a more recent one soon). +0. Make sure you have installed the .NET framework (dev) 4.7.2. 1. **Clone this repository** and open the solution file with Visual Studio. 2. Switch to **Release** mode for a much cleaner output. 3. **Build** the solution (Visual Studio will fetch all the missing nuget packages). diff --git a/RuriLib/Blocks/BlockBypassCF.cs b/RuriLib/Blocks/BlockBypassCF.cs index 3ebcf2d..34e6b4d 100644 --- a/RuriLib/Blocks/BlockBypassCF.cs +++ b/RuriLib/Blocks/BlockBypassCF.cs @@ -6,9 +6,10 @@ using System.Windows.Media; using System.Threading; using Jint; using System.Net; -using Cloudflare; -using Cloudflare.CaptchaProviders; +using CloudflareSolverRe; using System.Net.Http; +using CloudflareSolverRe.Types; +using CloudflareSolverRe.CaptchaProviders; namespace RuriLib { @@ -104,6 +105,8 @@ namespace RuriLib cf = new CloudflareSolver(); break; } + cf.MaxTries = 3; + cf.ClearanceDelay = 3000; // Initialize the handler with the Proxy and the previous cookies HttpClientHandler handler = null; @@ -145,7 +148,7 @@ namespace RuriLib } // Initialize the HttpClient with the given handler, timeout, user-agent - var httpClient = new HttpClient(handler); + HttpClient httpClient = new HttpClient(handler); httpClient.Timeout = TimeSpan.FromMinutes(timeout); httpClient.DefaultRequestHeaders.Add("User-Agent", ReplaceValues(userAgent, data)); diff --git a/RuriLib/RuriLib.csproj b/RuriLib/RuriLib.csproj index 02c1036..943a3a4 100644 --- a/RuriLib/RuriLib.csproj +++ b/RuriLib/RuriLib.csproj @@ -9,10 +9,11 @@ Properties RuriLib RuriLib - v4.6.1 + v4.7.2 512 + true @@ -39,11 +40,14 @@ ..\packages\AngleSharp.0.9.9.2\lib\net45\AngleSharp.dll - - ..\packages\AntiCaptchaAPI.1.0.0\lib\netstandard2.0\AntiCaptcha.dll + + ..\packages\AntiCaptchaAPI.1.1.0\lib\netstandard2.0\AntiCaptcha.dll - - ..\packages\CloudflareSolver.1.4.1\lib\netstandard2.0\CloudflareSolver.dll + + ..\packages\CloudflareSolverRe.1.0.5\lib\netstandard1.1\CloudflareSolverRe.dll + + + ..\packages\CloudflareSolverRe.Captcha.1.0.5\lib\netstandard1.1\CloudflareSolverRe.Captcha.dll False @@ -82,6 +86,11 @@ ..\packages\DynamicLanguageRuntime.1.2.2\lib\net45\Microsoft.Scripting.Metadata.dll + + ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll + True + True + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll @@ -93,16 +102,63 @@ ..\packages\ProxySocket.1.1.2\lib\net40\ProxySocket.dll + + ..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll + True + True + + + + ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll + True + True + + + ..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll + True + True + + + ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll + True + True + + + + ..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll + True + True + + + ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll + True + True + + + ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll + True + True + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll + + ..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll + True + True + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + True + True + ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll @@ -125,6 +181,11 @@ + + ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + True + True + ..\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll diff --git a/RuriLib/app.config b/RuriLib/app.config index 09497f0..f5ee617 100644 --- a/RuriLib/app.config +++ b/RuriLib/app.config @@ -1,12 +1,12 @@ - + - + - - + + - \ No newline at end of file + diff --git a/RuriLib/packages.config b/RuriLib/packages.config index b84fb15..8a0bb69 100644 --- a/RuriLib/packages.config +++ b/RuriLib/packages.config @@ -2,24 +2,65 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + \ No newline at end of file