Compare commits

..

19 Commits

Author SHA1 Message Date
neru 90a6ab1ba8 fix: size_t to int casting
Build / build (push) Successful in 3m13s
2026-04-07 02:47:24 -03:00
neru 2c795a335f fix: typos
Build / build (push) Failing after 2m39s
2026-04-07 01:39:29 -03:00
neru 015a13eb86 fix: double assignment 2026-04-07 01:39:08 -03:00
neru b0524c0589 style: run clang-format 2026-04-07 01:37:09 -03:00
neru abd3c18040 style: remove leftover stuff 2026-04-07 01:34:29 -03:00
neru afb4a9c157 feat: give random item per req 2026-04-07 01:33:02 -03:00
neru 9c83499f0f feat: spoof bloodweb items 2026-04-07 01:28:03 -03:00
neru cd6d8df243 style: formatting 2026-04-07 01:04:20 -03:00
neru 64ded73f89 fix: spoof level on modifyCharacter to handle all requests 2026-04-07 01:04:15 -03:00
neru 022c67cab9 fix: initialize set only when used 2026-04-07 01:04:01 -03:00
neru cc07cd139c fix: leftover debug string 2026-04-07 01:03:43 -03:00
neru 490feb1be7 fix: killer detection logic 2026-04-07 01:03:19 -03:00
neru b5a8477ba2 fix: nurse not detected 2026-04-07 00:43:49 -03:00
neru e933515e45 fix: typo
Build / build (push) Successful in 3m10s
2026-04-06 21:54:57 -03:00
neru ff7284dfbf fix: update dumper to use xbox game 2026-04-06 21:54:52 -03:00
neru 7a710f2e17 feat: update catalog 2026-04-06 21:54:11 -03:00
neru b36d47a8fb chore: update file names to reflect platform 2026-04-06 21:51:49 -03:00
neru 6e2c709426 chore: add mappings
Build / build (push) Has been cancelled
2026-04-06 21:50:08 -03:00
neru 8929c0e39b fix: spoof level for every char < 15 or p0
Build / build (push) Successful in 4m27s
2026-04-02 01:21:03 -03:00
7 changed files with 90 additions and 40 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
+6 -6
View File
@@ -13,9 +13,9 @@ using Newtonsoft.Json;
class DumpByDaylight class DumpByDaylight
{ {
private const string _pakDir = "E:\\Program Files (x86)\\Steam\\steamapps\\common\\Dead by Daylight\\DeadByDaylight\\Content\\Paks"; private const string _pakDir = "D:\\XboxGames\\Dead By Daylight\\Content\\DeadByDaylight\\Content\\Paks";
private const string _aesKey = "0x22B1639B548124925CF7B9CBAA09F9AC295FCF0324586D6B37EE1D42670B39B3"; private const string _aesKey = "0x22B1639B548124925CF7B9CBAA09F9AC295FCF0324586D6B37EE1D42670B39B3";
private const string _mappingURL = "https://github.com/Masusder/FModel-DbdMappings/raw/refs/heads/main/Mappings/9.5.0/5.4.4-3172922+++DeadByDaylight+Quiche_REL-DeadByDaylight.usmap"; private const string _mappingURL = "https://git.neru.rip/neru/UnlockedByDaylight/raw/branch/main/res/mappings/latest-xbox.usmap";
public static async Task<string?> DownloadMappingFileAsync(string url, string savePath) public static async Task<string?> DownloadMappingFileAsync(string url, string savePath)
{ {
@@ -67,7 +67,7 @@ class DumpByDaylight
Console.WriteLine("\nProvider Initialized. Extracting Databases..."); Console.WriteLine("\nProvider Initialized. Extracting Databases...");
var dataPak = provider.GetArchive("pakchunk4-Windows.utoc"); var dataPak = provider.GetArchive("pakchunk4-WinGDK.utoc");
/* /*
* itemdb dump * itemdb dump
@@ -114,7 +114,7 @@ class DumpByDaylight
*/ */
searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/ItemAddonDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList(); searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/ItemAddonDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var camperAddons = new List<string>(); var camperAddons = new List<string>();
var slaherAddons = new List<string>(); var slasherAddons = new List<string>();
foreach (var path in searchPaths) foreach (var path in searchPaths)
{ {
@@ -135,7 +135,7 @@ class DumpByDaylight
} }
if (isSlasherAddon) if (isSlasherAddon)
slaherAddons.Add(row.Key.Text); slasherAddons.Add(row.Key.Text);
else else
camperAddons.Add(row.Key.Text); camperAddons.Add(row.Key.Text);
} }
@@ -144,7 +144,7 @@ class DumpByDaylight
var addonsSerialized = new var addonsSerialized = new
{ {
Slashers = slaherAddons.OrderBy(x => x).ToList(), Slashers = slasherAddons.OrderBy(x => x).ToList(),
Campers = camperAddons.OrderBy(x => x).ToList() Campers = camperAddons.OrderBy(x => x).ToList()
}; };
File.WriteAllText("addons.json", JsonConvert.SerializeObject(addonsSerialized, Formatting.Indented)); File.WriteAllText("addons.json", JsonConvert.SerializeObject(addonsSerialized, Formatting.Indented));
-13
View File
@@ -5,18 +5,6 @@
#include <windows.h> #include <windows.h>
#include <wininet.h> #include <wininet.h>
//#include <fstream>
//#include <iostream>
//#include <string>
//#include <string_view>
//#include <vector>
//#include <format>
//#include <mutex>
//#include <ctime>
//#include <regex>
//#include <unordered_set>
//#include <simdjson.h>
bool setProxy(bool enable, const std::string& proxyAddr) bool setProxy(bool enable, const std::string& proxyAddr)
{ {
@@ -83,7 +71,6 @@ BOOL WINAPI consoleHandler(DWORD dwType)
running = false; running = false;
cleanup(); cleanup();
exit(0); exit(0);
//return TRUE;
} }
return FALSE; return FALSE;
} }
+2 -4
View File
@@ -336,8 +336,7 @@ void Proxy::handleClient(SOCKET hClientSocket)
std::string emptyBody = ""; std::string emptyBody = "";
OnClientRequest.run(url, emptyBody, headers); OnClientRequest.run(url, emptyBody, headers);
if (!pendingUrls.empty()) if (!pendingUrls.empty()) pendingUrls.back() = url;
pendingUrls.back() = url;
SSL_write(remoteSSL, headers.data(), (int)headers.size()); SSL_write(remoteSSL, headers.data(), (int)headers.size());
clientStream.buffer.erase(0, clientStream.headersEnd + 4); clientStream.buffer.erase(0, clientStream.headersEnd + 4);
@@ -387,8 +386,7 @@ void Proxy::handleClient(SOCKET hClientSocket)
if (complete) if (complete)
{ {
OnClientRequest.run(url, body, headers); OnClientRequest.run(url, body, headers);
if (!pendingUrls.empty() && pendingUrls.back() != url) if (!pendingUrls.empty() && pendingUrls.back() != url) pendingUrls.back() = url;
pendingUrls.back() = url;
SSL_write(remoteSSL, headers.data(), (int)headers.size()); SSL_write(remoteSSL, headers.data(), (int)headers.size());
SSL_write(remoteSSL, clientStream.buffer.data() + bodyStart, SSL_write(remoteSSL, clientStream.buffer.data() + bodyStart,
+75 -10
View File
@@ -3,6 +3,7 @@
#include <fstream> #include <fstream>
#include <algorithm> #include <algorithm>
#include <unordered_set> #include <unordered_set>
#include <random>
#include <minwindef.h> #include <minwindef.h>
@@ -199,6 +200,10 @@ void Spoofer::parseAndDumpCatalog(std::string& data)
parseCatalog(data); parseCatalog(data);
} }
std::unordered_set<std::string> killerNames = {
"Chuckles", "Bob", "HillBilly", "Nurse", "Shape", "Witch", "Killer07", "Cannibal", "Bear",
"Nightmare", "Pig", "Clown", "Spirit", "Plague", "Ghostface", "Demogorgon", "Oni", "Gunslinger"};
void Spoofer::modifyCharacterData(json& js) void Spoofer::modifyCharacterData(json& js)
{ {
std::unordered_set<std::string> existingItemIds; std::unordered_set<std::string> existingItemIds;
@@ -207,10 +212,17 @@ void Spoofer::modifyCharacterData(json& js)
if (js.contains("characterName") && js["characterName"].is_string()) if (js.contains("characterName") && js["characterName"].is_string())
{ {
std::string name = js["characterName"]; std::string name = js["characterName"];
if (name == "Bear" || name == "Bob" || name == "Chuckles" || (name.length() >= 2 && name[0] == 'K')) if (killerNames.contains(name) || (name.length() == 3 && name[0] == 'K')) isSlasher = true;
isSlasher = true;
} }
if (js.contains("prestigeLevel") && js["prestigeLevel"].get<int>() <= 1)
if (js.contains("bloodWebLevel") && js["bloodWebLevel"].get<int>() <= 15) js["bloodWebLevel"] = 16;
if (js.contains("bloodWebData"))
{
static std::random_device rd;
static std::mt19937 rng(rd());
std::unordered_set<std::string> stackableIds; std::unordered_set<std::string> stackableIds;
stackableIds.insert(_camperItemIds.begin(), _camperItemIds.end()); stackableIds.insert(_camperItemIds.begin(), _camperItemIds.end());
stackableIds.insert(_camperOfferingIds.begin(), _camperOfferingIds.end()); stackableIds.insert(_camperOfferingIds.begin(), _camperOfferingIds.end());
@@ -218,8 +230,59 @@ void Spoofer::modifyCharacterData(json& js)
stackableIds.insert(_slasherAddonIds.begin(), _slasherAddonIds.end()); stackableIds.insert(_slasherAddonIds.begin(), _slasherAddonIds.end());
stackableIds.insert(_slasherOfferingIds.begin(), _slasherOfferingIds.end()); stackableIds.insert(_slasherOfferingIds.begin(), _slasherOfferingIds.end());
std::string selectedContentId = "Spring2024Offering";
auto it = stackableIds.begin();
std::advance(it, std::uniform_int_distribution<>(0, static_cast<int>(_camperOfferingIds.size()) - 1)(rng));
selectedContentId = *it;
std::vector<std::string> paths;
json ringDataArray = json::array();
ringDataArray.push_back({{"nodeData", json::array({{{"nodeId", "0"}, {"state", "Collected"}}})}});
int nodesPerRing[] = {6, 12, 12};
std::vector<std::string> prevRingNodes = {"0"};
for (int ring = 1; ring <= 3; ++ring)
{
json nodeDataArray = json::array();
std::vector<std::string> currentRingNodes;
int numNodes = nodesPerRing[ring - 1];
for (int i = 1; i <= numNodes; ++i)
{
std::string childId = std::to_string((ring * 100) + i);
currentRingNodes.push_back(childId);
int parentIndex = (i - 1) / (numNodes / static_cast<int>(prevRingNodes.size()));
if (parentIndex >= static_cast<int>(prevRingNodes.size()))
parentIndex = static_cast<int>(prevRingNodes.size()) - 1;
std::string parentId = prevRingNodes[parentIndex];
paths.push_back(parentId + "_" + childId);
nodeDataArray.push_back(
{{"nodeId", childId}, {"state", "Collected"}, {"contentId", selectedContentId}});
}
ringDataArray.push_back({{"nodeData", nodeDataArray}});
prevRingNodes = std::move(currentRingNodes);
}
js["bloodWebData"]["paths"] = paths;
js["bloodWebData"]["ringData"] = ringDataArray;
}
if (js.contains("characterItems") && js["characterItems"].is_array()) if (js.contains("characterItems") && js["characterItems"].is_array())
{ {
std::unordered_set<std::string> stackableIds;
stackableIds.insert(_camperItemIds.begin(), _camperItemIds.end());
stackableIds.insert(_camperOfferingIds.begin(), _camperOfferingIds.end());
stackableIds.insert(_camperAddonIds.begin(), _camperAddonIds.end());
stackableIds.insert(_slasherAddonIds.begin(), _slasherAddonIds.end());
stackableIds.insert(_slasherOfferingIds.begin(), _slasherOfferingIds.end());
for (auto& item : js["characterItems"]) for (auto& item : js["characterItems"])
{ {
if (item.contains("itemId") && item["itemId"].is_string()) if (item.contains("itemId") && item["itemId"].is_string())
@@ -384,11 +447,16 @@ void Spoofer::serverResponseHandler(const std::string& url, std::string& body, s
for (auto& charInfo : charList) for (auto& charInfo : charList)
{ {
if (charInfo.contains("bloodWebLevel") && charInfo.at("bloodWebLevel").get<int>() <= 15)
if (!charInfo.contains("prestigeLevel") || charInfo.at("prestigeLevel").get<int>() <= 0)
charInfo["bloodWebLevel"] = 16;
if (charInfo.contains("bloodWebData") && charInfo.at("bloodWebData").contains("level"))
charInfo["bloodWebData"]["level"] = 1;
if (charInfo["isEntitled"] == false) if (charInfo["isEntitled"] == false)
{ {
charInfo["isEntitled"] = true; charInfo["isEntitled"] = true;
if (charInfo.contains("bloodWebLevel")) charInfo["bloodWebLevel"] = 15;
if (charInfo.contains("bloodWebData")) charInfo["bloodWebData"]["level"] = 1;
if (charInfo.contains("origin")) if (charInfo.contains("origin"))
{ {
charInfo["purchaseInfo"] = {{"quantity", 1}, charInfo["purchaseInfo"] = {{"quantity", 1},
@@ -418,11 +486,11 @@ void Spoofer::serverResponseHandler(const std::string& url, std::string& body, s
if (body.find("NotAllowedException") != std::string::npos && body.find("not owned") != std::string::npos) if (body.find("NotAllowedException") != std::string::npos && body.find("not owned") != std::string::npos)
{ {
Log::info("Spoofing bloodweb error error for unowned character"); Log::info("Spoofing bloodweb error for unowned character");
json mock; json mock;
mock["bloodWebLevelChanged"] = false; mock["bloodWebLevelChanged"] = false;
mock["updatedWallets"] = json::array(); mock["updatedWallets"] = json::array();
mock["bloodWebLevel"] = 15; mock["bloodWebLevel"] = 16;
mock["prestigeLevel"] = 0; mock["prestigeLevel"] = 0;
mock["bloodWebData"] = {{"ringData", json::array()}, {"paths", json::array()}}; mock["bloodWebData"] = {{"ringData", json::array()}, {"paths", json::array()}};
mock["characterItems"] = json::array(); mock["characterItems"] = json::array();
@@ -431,10 +499,7 @@ void Spoofer::serverResponseHandler(const std::string& url, std::string& body, s
modifyCharacterData(mock); modifyCharacterData(mock);
size_t firstSpace = respHeaders.find(' '); size_t firstSpace = respHeaders.find(' ');
if (firstSpace != std::string::npos) if (firstSpace != std::string::npos) respHeaders.replace(firstSpace + 1, 3, "200");
{
respHeaders.replace(firstSpace + 1, 3, "200");
}
body = mock.dump(); body = mock.dump();
return; return;