From 5a6091f0437c89d65aa14be84e18c8b89f806e5e Mon Sep 17 00:00:00 2001 From: shyouko Date: Mon, 16 Dec 2024 03:16:35 +0100 Subject: [PATCH] Fixed a lot issues Bloodweb error fixed Ban status fixed Cosmetics always finding update even tho file didnt change --- Eclipsed.Light/App.config | 8 +++ Eclipsed.Light/Classes/FiddlerCore.cs | 43 ++++++++------- Eclipsed.Light/Classes/Market.cs | 2 +- Eclipsed.Light/Classes/Utils.cs | 17 +++++- Eclipsed.Light/Eclipsed.Light.csproj | 64 ++++++++++++----------- Eclipsed.Light/Forms/Main.Designer.cs | 2 +- Eclipsed.Light/Forms/Main.cs | 4 +- Eclipsed.Light/Properties/AssemblyInfo.cs | 4 +- Eclipsed.Light/packages.config | 40 +++++++------- 9 files changed, 107 insertions(+), 77 deletions(-) diff --git a/Eclipsed.Light/App.config b/Eclipsed.Light/App.config index 91126fc..9328f48 100644 --- a/Eclipsed.Light/App.config +++ b/Eclipsed.Light/App.config @@ -9,6 +9,14 @@ + + + + + + + + \ No newline at end of file diff --git a/Eclipsed.Light/Classes/FiddlerCore.cs b/Eclipsed.Light/Classes/FiddlerCore.cs index 4fab020..4105730 100644 --- a/Eclipsed.Light/Classes/FiddlerCore.cs +++ b/Eclipsed.Light/Classes/FiddlerCore.cs @@ -125,11 +125,13 @@ public static void BeforeRequest(Session session) { if (session.uriContains("api/v1/dbd-character-data/bloodweb")) { + session.bBufferResponse = true; } if (session.uriContains("api/v1/dbd-character-data/get-all")) { + session.responseCode = 200; session.bBufferResponse = true; } } @@ -156,41 +158,44 @@ public static void BeforeResponse(Session session) for (int i = 0; i < array.Count; i++) { array[i]["prestigeLevel"] = Options.Prestige; - array[i]["bloodWebLevel"] = Options.BloodWebLevel; - array[i]["legacyPrestigeLevel"] = Options.LegacyPrestigeLevel; + array[i]["bloodWebLevel"] = 50; + array[i]["legacyPrestigeLevel"] = 3; } session.utilSetResponseBody(getall.ToString(Newtonsoft.Json.Formatting.None)); } - if (session.uriContains("api/v1/dbd-character-data/bloodweb")) + if (Options.BloodwebExploit) { - var reqBody = JObject.Parse(session.GetRequestBodyAsString()); - var resBody = JObject.Parse(session.GetResponseBodyAsString()); + if (session.uriContains("api/v1/dbd-character-data/bloodweb")) + { + session.responseCode = 200; + var reqBody = session.GetRequestBodyAsString(); + var resBody = session.GetResponseBodyAsString(); + if (reqBody.TryParseJObject(out var json_Request) && resBody.TryParseJObject(out var json_Response)) + { + var charName = (string)json_Request["characterName"]; - var result = JObject.Parse(Cache.CharacterData); - result["characterName"] = resBody["characterName"]; + var result_Response = JObject.Parse(Cache.CharacterData); + result_Response["characterName"] = charName; - result["prestigeLevel"] = Options.Prestige; - result["bloodWebLevel"] = Options.BloodWebLevel; - result["legacyPrestigeLevel"] = Options.LegacyPrestigeLevel; + result_Response["prestigeLevel"] = Options.Prestige; + result_Response["bloodWebLevel"] = Options.BloodWebLevel; + result_Response["legacyPrestigeLevel"] = Options.LegacyPrestigeLevel; - session.utilSetResponseBody(result.ToString(Newtonsoft.Json.Formatting.None)); + session.utilSetResponseBody(result_Response.ToString(Newtonsoft.Json.Formatting.None)); + } + } } } #endregion #region Ban Status - if (session.uriContains("api/v1/auth")) + if (session.uriContains("api/v1/players/ban/status")) { session.utilDecodeResponse(); var body = session.GetResponseBodyAsString(); - var banStatusCodes = new string[] - { - "InvalidTokenException", - "NotAllowedException", - "localizationCode" - }; - if (banStatusCodes.Any(x => body.Contains(x))) + + if (body.Contains("\"isBanned\":true")) { Main.instance.UpdateBanStatus(true); } diff --git a/Eclipsed.Light/Classes/Market.cs b/Eclipsed.Light/Classes/Market.cs index 3d887b4..3a018ff 100644 --- a/Eclipsed.Light/Classes/Market.cs +++ b/Eclipsed.Light/Classes/Market.cs @@ -21,7 +21,7 @@ public static class Market { "CharactersData", Path.Combine(BasePath, "CharactersData.json") }, { "CharacterData", Path.Combine(BasePath, "CharacterData.json") }, { "Characters", Path.Combine(BasePath, "Characters.json") }, - { "Cosmetics", Path.Combine(BasePath, "Cosmetics.json") }, + { "Cosmetics", Path.Combine(BasePath, "CosmeticsEmpty.json") }, { "Inventory", Path.Combine(BasePath, "Inventory.json") } }; diff --git a/Eclipsed.Light/Classes/Utils.cs b/Eclipsed.Light/Classes/Utils.cs index 2844bda..8e2c972 100644 --- a/Eclipsed.Light/Classes/Utils.cs +++ b/Eclipsed.Light/Classes/Utils.cs @@ -1,4 +1,5 @@ -using System; +using Newtonsoft.Json.Linq; +using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; @@ -19,5 +20,19 @@ public static string CalculateSha1(byte[] b) return BitConverter.ToString(hash).Replace("-", string.Empty); } } + public static bool TryParseJObject(this string jsonString, out JObject result) + { + result = null; + + try + { + result = JObject.Parse(jsonString); + return true; + } + catch (Exception) + { + return false; + } + } } } diff --git a/Eclipsed.Light/Eclipsed.Light.csproj b/Eclipsed.Light/Eclipsed.Light.csproj index 5298c87..b1ec08f 100644 --- a/Eclipsed.Light/Eclipsed.Light.csproj +++ b/Eclipsed.Light/Eclipsed.Light.csproj @@ -54,16 +54,16 @@ ..\packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll - - ..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll True True - - ..\packages\Microsoft.Win32.Registry.4.7.0\lib\net461\Microsoft.Win32.Registry.dll + + ..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll ..\packages\NAudio.2.2.1\lib\net472\NAudio.dll @@ -89,8 +89,8 @@ ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll - - ..\packages\RestSharp.110.2.0\lib\net471\RestSharp.dll + + ..\packages\RestSharp.112.1.0\lib\net48\RestSharp.dll @@ -102,14 +102,14 @@ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll + + ..\packages\System.Console.4.3.1\lib\net46\System.Console.dll True True - - ..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll ..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll @@ -160,8 +160,8 @@ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll - - ..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll + + ..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll True True @@ -179,16 +179,16 @@ True True - - ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + + ..\packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll True True ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll - - ..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll + + ..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll True True @@ -202,11 +202,11 @@ True True - - ..\packages\System.Security.AccessControl.4.7.0\lib\net461\System.Security.AccessControl.dll + + ..\packages\System.Security.AccessControl.6.0.1\lib\net461\System.Security.AccessControl.dll - ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll + ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll True True @@ -220,22 +220,22 @@ True True - - ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll True True - - ..\packages\System.Security.Principal.Windows.4.7.0\lib\net461\System.Security.Principal.Windows.dll + + ..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll - - ..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll + + ..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll - - ..\packages\System.Text.Json.7.0.2\lib\net462\System.Text.Json.dll + + ..\packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll - ..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll + ..\packages\System.Text.RegularExpressions.4.3.1\lib\net463\System.Text.RegularExpressions.dll True True @@ -255,7 +255,7 @@ - ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + ..\packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll True True @@ -330,14 +330,16 @@ - Bu proje bu bilgisayarda olmayan NuGet paketlerine başvuru yapıyor. Bunları indirmek için NuGet Paket Geri Yükleme'yi kullanın. Daha fazla bilgi için, bkz. http://go.microsoft.com/fwlink/?LinkID=322105. Eksik dosya: {0}. - + + + + \ No newline at end of file diff --git a/Eclipsed.Light/Forms/Main.Designer.cs b/Eclipsed.Light/Forms/Main.Designer.cs index 66db798..3f27797 100644 --- a/Eclipsed.Light/Forms/Main.Designer.cs +++ b/Eclipsed.Light/Forms/Main.Designer.cs @@ -417,7 +417,7 @@ private void InitializeComponent() this.lblVersion.Name = "lblVersion"; this.lblVersion.Size = new System.Drawing.Size(83, 26); this.lblVersion.TabIndex = 8; - this.lblVersion.Text = "v1.4"; + this.lblVersion.Text = "v1.5"; this.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // Main diff --git a/Eclipsed.Light/Forms/Main.cs b/Eclipsed.Light/Forms/Main.cs index fffe83a..7855edc 100644 --- a/Eclipsed.Light/Forms/Main.cs +++ b/Eclipsed.Light/Forms/Main.cs @@ -246,8 +246,8 @@ private void OptionChanged(object sender, EventArgs e) public void UpdateBhvrSession(string bhvrSession) { - this.tbBhvrSession.Text = bhvrSession; - } + this.tbBhvrSession.Text = bhvrSession; + } public void UpdateBanStatus(bool banned) { diff --git a/Eclipsed.Light/Properties/AssemblyInfo.cs b/Eclipsed.Light/Properties/AssemblyInfo.cs index 35f9417..eaa9f10 100644 --- a/Eclipsed.Light/Properties/AssemblyInfo.cs +++ b/Eclipsed.Light/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Tüm değerleri belirtebilir veya varsayılan Derleme ve Düzeltme Numaralarını kullanmak için // aşağıda gösterildiği gibi '*' kullanabilirsiniz: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.0.0")] -[assembly: AssemblyFileVersion("1.3.0.0")] +[assembly: AssemblyVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.0.0")] diff --git a/Eclipsed.Light/packages.config b/Eclipsed.Light/packages.config index 2f03409..7a6c05a 100644 --- a/Eclipsed.Light/packages.config +++ b/Eclipsed.Light/packages.config @@ -1,12 +1,12 @@  - + - - + + - + @@ -14,16 +14,16 @@ - + - + - + - + @@ -36,8 +36,8 @@ - - + + @@ -45,29 +45,29 @@ - + - + - - + + - - + + - - - + + + - + \ No newline at end of file