Compare commits

...

122 Commits

Author SHA1 Message Date
neru b8ae9ba743 fix: wrong global offering account
Build / build (push) Successful in 3m34s
2026-04-13 19:00:50 -03:00
neru 9637931164 fix: add missing includes
Build / build (push) Successful in 3m30s
2026-04-13 01:21:45 -03:00
neru 290307aa84 fix: change ShlObj_core to shlobj
Build / build (push) Failing after 2m35s
2026-04-13 01:18:10 -03:00
neru f3552ce79c feat: spoof ownership by default now that DLC unlocking is available
Build / build (push) Has been cancelled
2026-04-13 01:12:37 -03:00
neru 441c49d31a style: run clang-format
Build / build (push) Failing after 2m28s
2026-04-13 01:09:21 -03:00
neru e282a10f4d chore: add dlc dump 2026-04-13 01:09:12 -03:00
neru 8f6fbbb244 feat: initialize cache cleaner 2026-04-13 01:09:06 -03:00
neru 5adf5e6417 feat: add cachecleaner 2026-04-13 01:08:46 -03:00
neru a421793a54 fix: utf8 to 16 conversion missing on encrypt 2026-04-13 01:08:41 -03:00
neru bda519e70a fix: use ends_with instead of find when possible 2026-04-13 01:08:27 -03:00
neru b7aa912e1b style: misc formatting changes 2026-04-13 01:08:17 -03:00
neru 7db8048469 feat: add DLC unlocking 2026-04-13 01:08:02 -03:00
neru 091418eb53 fix: remove leftover print 2026-04-13 00:16:00 -03:00
neru 533b992a45 fix: incorrect str fmt 2026-04-12 23:18:52 -03:00
neru 937734ff7b fix: remove odd characters 2026-04-12 21:09:24 -03:00
neru 72c5466ce6 feat: add accessKey and keyId to config 2026-04-12 20:57:57 -03:00
neru 8a828db908 fix: push type 2 encryption 2026-04-12 20:57:01 -03:00
neru 3b461cd845 feat: add dbdcrypt 2026-04-12 20:56:25 -03:00
neru b2dfd9e1e5 build: link zlib statically 2026-04-12 20:56:18 -03:00
neru 448f6b7167 build: add zlib 2026-04-12 20:10:52 -03:00
neru ebe2000993 feat: send characters on /get-all request 2026-04-12 14:09:58 -03:00
neru 26038a03d1 feat: make body editable on proxy client req listeners 2026-04-12 13:12:42 -03:00
neru 698ac445e0 style: move code to onBloodwebClient 2026-04-12 13:12:24 -03:00
neru 45431e29f1 fix: remove repeated statement 2026-04-12 13:12:00 -03:00
neru 5bd481eb1e chore: update dump data
Build / build (push) Successful in 3m15s
2026-04-12 12:42:14 -03:00
neru 4559b9d4ec feat: update spoofer to reflect new data 2026-04-12 12:42:08 -03:00
neru de418a6568 feat: rewrite dumper from scratch 2026-04-12 12:41:47 -03:00
neru 2bf8407640 fix: use config values from default member initialization
Build / build (push) Successful in 3m17s
2026-04-11 16:00:46 -03:00
neru a8b5e0148f style: add additional comments
Build / build (push) Successful in 3m17s
2026-04-11 15:51:11 -03:00
neru 50413eb420 feat: fix bloodweb for spoofed inventories 2026-04-11 15:50:51 -03:00
neru ea49c39e53 feat: define PLACEHOLDER_ITEMID 2026-04-11 15:43:29 -03:00
neru f599a9a648 fix: remove early return 2026-04-11 15:43:18 -03:00
neru b8b24a5c30 fix: X509_NAME typedef compiler issue on gcc
Build / build (push) Successful in 3m18s
2026-04-11 13:48:46 -03:00
neru 4a71bc6f1b fix: variable name
Build / build (push) Failing after 2m47s
2026-04-11 13:42:03 -03:00
neru cfd52b8e05 feat: use random str for CA 2026-04-11 13:41:55 -03:00
neru b2ca193aa4 fix: pass 0 instead of NULL 2026-04-11 13:41:33 -03:00
neru 491daebf06 fix: use definition order on initializer list 2026-04-11 13:41:18 -03:00
neru 9799c2babe feat: set rnd seed on start 2026-04-11 13:38:51 -03:00
neru 27b8a0e497 style: run clang-format
Build / build (push) Failing after 2m51s
2026-04-11 13:08:25 -03:00
neru 3f9409b8c6 style: variable naming 2026-04-11 13:07:45 -03:00
neru 1fdc7450cd fix: reimplement setProxy logic 2026-04-11 13:06:47 -03:00
neru 75338b10ff fix: increase thread count 2026-04-11 12:59:24 -03:00
neru 5e8f059c49 feat: add whitelist 2026-04-11 12:59:17 -03:00
neru 11a9447e05 fix: chunk logic 2026-04-11 12:53:06 -03:00
neru 911c4d199a fix: SSL deadlock 2026-04-11 12:45:20 -03:00
neru 167e5ee696 fix: restore settings before shutting down proxy 2026-04-11 12:43:47 -03:00
neru 7e6797b6c7 fix: restore lock guard 2026-04-11 12:42:56 -03:00
neru c8b3104b4b fix: break on tunnelmode 2026-04-11 12:41:00 -03:00
neru 785d4a3ff2 feat: get status code from HttpStream and process 2026-04-11 12:40:55 -03:00
neru c09ce8b02a fix: move thread count to preprocessor var 2026-04-11 12:40:21 -03:00
neru 0af818fc0f fix: remove useless mutex 2026-04-11 12:36:00 -03:00
neru 6e62bcb1dc feat: add idle timeout 2026-04-11 12:35:00 -03:00
neru 1a05ef2742 feat: simplify removeHeader 2026-04-11 12:27:40 -03:00
neru 642c1c80fa feat: add thread pools 2026-04-11 12:21:59 -03:00
neru 32525c1566 fix: header matching issues 2026-04-11 12:21:43 -03:00
neru 75171b4557 fix: SSL / TLS handshake trap 2026-04-11 12:21:15 -03:00
neru fe71decd38 fix: drop invalid chunk sizes 2026-04-11 12:19:48 -03:00
neru acfdf7b3ef fix: update casing to reflect proxy refactor changes 2026-04-11 12:17:45 -03:00
neru e8d387e520 feat: add randomizeString 2026-04-11 12:12:54 -03:00
neru 03a1841b8e feat: refactor proxy 2026-04-11 12:12:49 -03:00
neru e61c20bb5a feat: rewrite CertManager 2026-04-11 11:38:36 -03:00
neru 105f8b6df0 fix: remove unneeded ssl include, rename for future changes 2026-04-11 11:13:18 -03:00
neru 0300ced79c feat: add config 2026-04-11 10:41:45 -03:00
neru 83ac8615ba style: remove non-working hotfix comment 2026-04-09 23:49:11 -03:00
neru 697bff9752 chore: make more logs dbg only
Build / build (push) Successful in 3m26s
2026-04-09 23:27:08 -03:00
neru 0fa2e0540b feat: add getCatalogItems listener
Build / build (push) Successful in 3m32s
2026-04-09 23:23:10 -03:00
neru a1a123054f feat: move dumping to separate thread 2026-04-09 23:16:12 -03:00
neru 76d581c419 feat: add message spoofing 2026-04-09 23:12:12 -03:00
neru 4f91ab9cff fix: prevent log spam on rel builds 2026-04-09 23:11:55 -03:00
neru e6111f8dbd feat: add message spoofing 2026-04-09 23:11:44 -03:00
neru 7ec6e385a0 feat: add runtime catalog dumping 2026-04-09 23:11:31 -03:00
neru 7427357bc5 fix: dangling else
Build / build (push) Successful in 3m12s
2026-04-09 06:45:58 -03:00
neru 6b63d54eb8 build: modify tags, keep commits of failed runs
Build / build (push) Failing after 2m45s
2026-04-09 06:41:13 -03:00
neru a3df782245 feat: add getExePath 2026-04-09 06:40:34 -03:00
neru d4650aac84 feat: completely refactor dumper again
Build / build (push) Has been cancelled
2026-04-09 06:38:08 -03:00
neru 73b1c95257 chore: update items to reflect dumper changes 2026-04-09 06:37:59 -03:00
neru 93fe999249 feat: change items dump format 2026-04-09 06:37:53 -03:00
neru 393a591485 style: misc changes 2026-04-09 03:18:16 -03:00
neru 2b8cbafa19 feat: skip string scans for non bhvrdbd urls 2026-04-08 04:10:53 -03:00
neru 623542046a feat: add fun fact
Build / build (push) Successful in 3m19s
2026-04-07 19:43:20 -03:00
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
neru ab2385fc2f fix: comment out unused param
Build / build (push) Successful in 3m10s
2026-03-22 07:57:36 -03:00
neru 510241e311 fix: update to reflect callback changes
Build / build (push) Failing after 2m45s
2026-03-22 07:52:15 -03:00
neru 5e701e1e1b fix: make api res logs dbg only 2026-03-22 07:51:49 -03:00
neru edc4a8b500 feat: allow url modification 2026-03-22 07:41:48 -03:00
neru 7e878a1ac1 fix: missing slasher offerings as stackable ids
Build / build (push) Successful in 3m12s
2026-03-22 03:24:18 -03:00
neru 5f7ab419b0 fix: always set bloodWebData level
Build / build (push) Successful in 3m17s
2026-03-22 03:04:06 -03:00
neru 38b98bc3ab feat: spoof purchaseInfo
Build / build (push) Has been cancelled
2026-03-22 03:01:11 -03:00
neru fd0f55bd5e fix: remove unused variable (again)
Build / build (push) Successful in 3m16s
2026-03-22 00:03:15 -03:00
neru 502a35357c fix: remove unused variable
Build / build (push) Failing after 2m45s
2026-03-21 23:59:00 -03:00
neru f3020200a0 fix: use zeromemory for initialization (wtf)
Build / build (push) Failing after 2m36s
2026-03-21 23:55:28 -03:00
neru 492677d5bb fix: add workaround for bloodpoint error
Build / build (push) Failing after 2m26s
2026-03-21 23:50:53 -03:00
neru a325ee5fb5 fix: empty initialization 2026-03-21 23:45:36 -03:00
neru 2812d225cd style: remove even more deprecated code 2026-03-21 23:37:57 -03:00
neru 603627bd33 style: remove deprecated code 2026-03-21 23:37:43 -03:00
neru 698ad23963 feat: completely rewrite unlocker logic
Build / build (push) Failing after 2m33s
2026-03-21 23:31:59 -03:00
neru 90a12905e4 fix: comment out unused params 2026-03-21 23:31:46 -03:00
neru a20168a347 chore: rename catalog dump 2026-03-21 23:31:38 -03:00
neru bd3f144c6b chore: update dumps 2026-03-21 23:31:33 -03:00
neru 2638344649 feat: output categorized data 2026-03-21 23:31:19 -03:00
neru 3d307746da build: add json dependency, remove old simdjson stuff 2026-03-21 20:19:31 -03:00
neru 9cb6d5a058 chore: add nlohmann::json 2026-03-21 20:17:51 -03:00
neru 2d077e8b63 chore: remove simdjson 2026-03-21 20:17:12 -03:00
neru ad244ea8b0 feat: forward more info on callback events 2026-03-21 19:30:11 -03:00
38 changed files with 12704 additions and 1891 deletions
+22 -20
View File
@@ -22,36 +22,31 @@ jobs:
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
shell: bash shell: bash
run: | run: |
git fetch --tags || true git fetch --tags --force
# Determine last tag and log range if LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
LAST_TAG=$(git describe --tags --abbrev=0)
RANGE="${LAST_TAG}..HEAD" RANGE="${LAST_TAG}..HEAD"
else else
LAST_TAG="v0.1.9" LAST_TAG="v0.1.9"
RANGE="HEAD" RANGE="HEAD"
fi fi
# Calculate next version
IFS='.' read -r major minor patch <<< "${LAST_TAG#v}" IFS='.' read -r major minor patch <<< "${LAST_TAG#v}"
NEW_VERSION="$major.$minor.$((patch + 1))" NEW_VERSION="$major.$minor.$((patch + 1))"
NEW_TAG="v$NEW_VERSION"
# Log commits
CHANGELOG=$(git log $RANGE --oneline | sed 's/^/* /') CHANGELOG=$(git log $RANGE --oneline | sed 's/^/* /')
[ -z "$CHANGELOG" ] && CHANGELOG="Maintenance build." if [ -z "$CHANGELOG" ]; then
CHANGELOG="Re-run of version $NEW_VERSION or maintenance build."
fi
# Tag and push back to Gitea
git tag $NEW_TAG
git push origin $NEW_TAG
# Set outputs for next steps
echo "version-string=$NEW_VERSION" >> $GITHUB_OUTPUT echo "version-string=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "changelog<<EOF" >> $GITHUB_OUTPUT echo "new-tag=v$NEW_VERSION" >> $GITHUB_OUTPUT
echo "## What's Changed" >> $GITHUB_OUTPUT {
echo "$CHANGELOG" >> $GITHUB_OUTPUT echo "changelog<<EOF"
echo "EOF" >> $GITHUB_OUTPUT echo "## What's Changed"
echo "$CHANGELOG"
echo "EOF"
} >> $GITHUB_OUTPUT
- name: Setup Tools Cache - name: Setup Tools Cache
id: tools-cache id: tools-cache
@@ -124,11 +119,18 @@ jobs:
name: unlocker-build name: unlocker-build
path: unlocker.zip path: unlocker.zip
- name: Finalize Version and Push Tag
if: ${{ github.event_name == 'push' && success() }}
run: |
git tag ${{ steps.calculate-version.outputs.new-tag }}
git push origin ${{ steps.calculate-version.outputs.new-tag }}
- name: Create Gitea Release - name: Create Gitea Release
if: ${{ github.event_name == 'push' }} if: ${{ github.event_name == 'push' && success() }}
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
files: unlocker.zip files: unlocker.zip
tag_name: v${{ steps.calculate-version.outputs.version-string }} tag_name: ${{ steps.calculate-version.outputs.new-tag }}
name: Release v${{ steps.calculate-version.outputs.version-string }} name: Release ${{ steps.calculate-version.outputs.new-tag }}
body: ${{ steps.calculate-version.outputs.changelog }} body: ${{ steps.calculate-version.outputs.changelog }}
+6 -3
View File
@@ -1,9 +1,12 @@
[submodule "vendor/nerutils"] [submodule "vendor/nerutils"]
path = vendor/nerutils path = vendor/nerutils
url = https://git.neru.rip/neru/nerutils url = https://git.neru.rip/neru/nerutils
[submodule "vendor/simdjson"]
path = vendor/simdjson
url = https://github.com/simdjson/simdjson
[submodule "vendor/CUE4Parse"] [submodule "vendor/CUE4Parse"]
path = vendor/CUE4Parse path = vendor/CUE4Parse
url = https://github.com/FabianFG/CUE4Parse url = https://github.com/FabianFG/CUE4Parse
[submodule "vendor/json"]
path = vendor/json
url = https://github.com/nlohmann/json
[submodule "vendor/zlib"]
path = vendor/zlib
url = https://github.com/madler/zlib
+1 -14
View File
@@ -66,19 +66,6 @@ else()
target_compile_options(dbd-unlocker-warnings INTERFACE -Wall -Wextra -Werror) target_compile_options(dbd-unlocker-warnings INTERFACE -Wall -Wextra -Werror)
endif() endif()
# ------------------------------
# simdjson without errors
# ------------------------------
add_library(simdjson-wrapped INTERFACE)
target_link_libraries(simdjson-wrapped INTERFACE simdjson)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
target_compile_options(simdjson-wrapped INTERFACE /W0)
else()
target_compile_options(simdjson-wrapped INTERFACE -w)
endif()
# ------------------------------ # ------------------------------
# unlocker # unlocker
# ------------------------------ # ------------------------------
@@ -89,7 +76,7 @@ add_executable(dbd-unlocker ${UNLOCKER_SOURCES})
string(RANDOM LENGTH 12 ALPHABET "abcdefghijklmnopqrstuvwxyz0123456789" RANDOM_EXE_NAME) string(RANDOM LENGTH 12 ALPHABET "abcdefghijklmnopqrstuvwxyz0123456789" RANDOM_EXE_NAME)
set_target_properties(dbd-unlocker PROPERTIES OUTPUT_NAME "${RANDOM_EXE_NAME}") set_target_properties(dbd-unlocker PROPERTIES OUTPUT_NAME "${RANDOM_EXE_NAME}")
target_link_libraries(dbd-unlocker PRIVATE dbd-unlocker-warnings OpenSSL::SSL OpenSSL::Crypto nerutils wsock32 ws2_32 wininet crypt32 simdjson-wrapped) target_link_libraries(dbd-unlocker PRIVATE dbd-unlocker-warnings OpenSSL::SSL OpenSSL::Crypto nerutils wsock32 ws2_32 wininet crypt32 nlohmann_json zlibstatic )
if(NOT MSVC) if(NOT MSVC)
target_link_options(dbd-unlocker PRIVATE -static -static-libgcc -static-libstdc++) target_link_options(dbd-unlocker PRIVATE -static -static-libgcc -static-libstdc++)
+1
View File
@@ -8,3 +8,4 @@ for /r "src" %%f in (*.cpp *.h *.cs) do (
echo done echo done
pause pause
+73 -73
View File
@@ -1,77 +1,5 @@
{ {
"Items": [ "Slashers": [
"Addon_Firecracker_BlackPowder",
"Addon_Firecracker_BuckShot",
"Addon_Firecracker_FlashPowder",
"Addon_Firecracker_GunPowder",
"Addon_Firecracker_LargePack",
"Addon_Firecracker_LongFuse",
"Addon_Firecracker_MagnesiumPowder",
"Addon_Firecracker_MediumFuse",
"Addon_Flashlight_001",
"Addon_Flashlight_002",
"Addon_Flashlight_003",
"Addon_Flashlight_004",
"Addon_Flashlight_005",
"Addon_Flashlight_006",
"Addon_Flashlight_007",
"Addon_Flashlight_008",
"Addon_Flashlight_BrokenBulb",
"ADDON_flashlight_highendsapphire",
"ADDON_flashlight_intensehalogen",
"ADDON_flashlight_lonflifebattery",
"ADDON_flashlight_oddbulb",
"ADDON_flashlight_rubbergrip",
"Addon_FogVial_Accelerant",
"Addon_FogVial_Amplifier",
"Addon_FogVial_DenseFogExtract",
"Addon_FogVial_LargeVial",
"Addon_FogVial_SlowRelease",
"Addon_Key_001",
"Addon_Key_002",
"Addon_Key_003",
"Addon_Key_004",
"Addon_Key_005",
"Addon_Key_006",
"Addon_Key_007",
"Addon_Key_008",
"Addon_Key_WeddingRing",
"Addon_Map_001",
"Addon_Map_002",
"Addon_Map_003",
"Addon_Map_004",
"Addon_Map_005",
"Addon_Map_006",
"Addon_Map_007",
"Addon_Map_008",
"Addon_Map_009",
"Addon_Medkit_001",
"Addon_Medkit_002",
"Addon_Medkit_003",
"Addon_Medkit_004",
"Addon_Medkit_005",
"Addon_Medkit_006",
"Addon_Medkit_007",
"Addon_Medkit_008",
"ADDON_medkit_abdominaldressing",
"Addon_Medkit_BlightedSyringe",
"ADDON_medkit_gauzeroll",
"ADDON_medkit_needleandthread",
"ADDON_medkit_selfadherentwrap",
"ADDON_medkit_surgicalsuture",
"Addon_Toolbox_001",
"Addon_Toolbox_002",
"Addon_Toolbox_003",
"Addon_Toolbox_004",
"Addon_Toolbox_005",
"Addon_Toolbox_006",
"Addon_Toolbox_007",
"Addon_Toolbox_008",
"ADDON_toolbox_cuttingwire",
"ADDON_toolbox_socketswivels",
"ADDON_toolbox_springclamp"
],
"Powers": [
"Addon_Beartrap_001", "Addon_Beartrap_001",
"Addon_Beartrap_002", "Addon_Beartrap_002",
"Addon_Beartrap_003", "Addon_Beartrap_003",
@@ -916,5 +844,77 @@
"Addon_Trickster_18", "Addon_Trickster_18",
"Addon_Trickster_19", "Addon_Trickster_19",
"Addon_Trickster_20" "Addon_Trickster_20"
],
"Campers": [
"Addon_Firecracker_BlackPowder",
"Addon_Firecracker_BuckShot",
"Addon_Firecracker_FlashPowder",
"Addon_Firecracker_GunPowder",
"Addon_Firecracker_LargePack",
"Addon_Firecracker_LongFuse",
"Addon_Firecracker_MagnesiumPowder",
"Addon_Firecracker_MediumFuse",
"Addon_Flashlight_001",
"Addon_Flashlight_002",
"Addon_Flashlight_003",
"Addon_Flashlight_004",
"Addon_Flashlight_005",
"Addon_Flashlight_006",
"Addon_Flashlight_007",
"Addon_Flashlight_008",
"Addon_Flashlight_BrokenBulb",
"ADDON_flashlight_highendsapphire",
"ADDON_flashlight_intensehalogen",
"ADDON_flashlight_lonflifebattery",
"ADDON_flashlight_oddbulb",
"ADDON_flashlight_rubbergrip",
"Addon_FogVial_Accelerant",
"Addon_FogVial_Amplifier",
"Addon_FogVial_DenseFogExtract",
"Addon_FogVial_LargeVial",
"Addon_FogVial_SlowRelease",
"Addon_Key_001",
"Addon_Key_002",
"Addon_Key_003",
"Addon_Key_004",
"Addon_Key_005",
"Addon_Key_006",
"Addon_Key_007",
"Addon_Key_008",
"Addon_Key_WeddingRing",
"Addon_Map_001",
"Addon_Map_002",
"Addon_Map_003",
"Addon_Map_004",
"Addon_Map_005",
"Addon_Map_006",
"Addon_Map_007",
"Addon_Map_008",
"Addon_Map_009",
"Addon_Medkit_001",
"Addon_Medkit_002",
"Addon_Medkit_003",
"Addon_Medkit_004",
"Addon_Medkit_005",
"Addon_Medkit_006",
"Addon_Medkit_007",
"Addon_Medkit_008",
"ADDON_medkit_abdominaldressing",
"Addon_Medkit_BlightedSyringe",
"ADDON_medkit_gauzeroll",
"ADDON_medkit_needleandthread",
"ADDON_medkit_selfadherentwrap",
"ADDON_medkit_surgicalsuture",
"Addon_Toolbox_001",
"Addon_Toolbox_002",
"Addon_Toolbox_003",
"Addon_Toolbox_004",
"Addon_Toolbox_005",
"Addon_Toolbox_006",
"Addon_Toolbox_007",
"Addon_Toolbox_008",
"ADDON_toolbox_cuttingwire",
"ADDON_toolbox_socketswivels",
"ADDON_toolbox_springclamp"
] ]
} }
File diff suppressed because one or more lines are too long
+95
View File
@@ -0,0 +1,95 @@
[
"Ace",
"Adam",
"Ash",
"Bear",
"Bill",
"Bob",
"Cannibal",
"Chuckles",
"Claudette",
"Clown",
"Demogorgon",
"Dwight",
"Eric",
"Feng",
"Ghostface",
"Gunslinger",
"HillBilly",
"Jake",
"Jane",
"Jeff",
"K20",
"K21",
"K22",
"K23",
"K24",
"K25",
"K26",
"K27",
"K28",
"K29",
"K30",
"K31",
"K32",
"K33",
"K34",
"K35",
"K36",
"K37",
"K38",
"K39",
"K40",
"K41",
"K42",
"Kate",
"Killer07",
"Laurie",
"Legion",
"Meg",
"Nancy",
"Nea",
"Nightmare",
"Nurse",
"Oni",
"Pig",
"Plague",
"Quentin",
"S22",
"S23",
"S24",
"S25",
"S26",
"S27",
"S28",
"S29",
"S30",
"S31",
"S32",
"S33",
"S34",
"S35",
"S36",
"S37",
"S38",
"S39",
"S40",
"S41",
"S42",
"S43",
"S44",
"S45",
"S46",
"S47",
"S48",
"S49",
"S50",
"S51",
"Shape",
"Smoke",
"Spirit",
"Steve",
"Witch",
"Yui",
"Zarina"
]
File diff suppressed because it is too large Load Diff
+427
View File
@@ -0,0 +1,427 @@
[
{
"name": "The 80's Suitcase",
"grdk": "9NF6VS6NVC2P",
"egs": "a1f208be98e64c5ea5e946b86f7d19c3"
},
{
"name": "ACPack_01",
"grdk": "9N4LWJH8J800",
"egs": "168d750b4a6f451ca6eb68618a741f2c"
},
{
"name": "ACPack_02",
"grdk": "9NSD3C05HVNM",
"egs": "d9ba2a71c7664785a1cfff524edb768c"
},
{
"name": "ACPack_03",
"grdk": "9N6FGJW61X23",
"egs": "81c99b3171f941ff9f7915b51e371f05"
},
{
"name": "ACPack_04",
"grdk": "9PLG9SM9GNLM",
"egs": "916bfd0101c24561b75e984751e46e95"
},
{
"name": "ACPack_05",
"grdk": "9N310FS0QMG8",
"egs": "920f365a9b454af3a9bc675f839bed64"
},
{
"name": "ACPack_06",
"grdk": "9N82ZN5T0VB3",
"egs": "87bb22af1b6c4ee19404b34b7321fb4c"
},
{
"name": "All Things Wicked Chapter",
"grdk": "9NLCTCL61ZZ2",
"egs": "9a0c250555c14679a6208e57d89918d2"
},
{
"name": "A Binding of Kin Chapter",
"grdk": "9N02CL4TC7CQ",
"egs": "ffda316a960d4f41930027dbe0772e0f"
},
{
"name": "BaseGame",
"grdk": "9NMS4SFNBGBH",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "Leatherface\u2122 Chapter",
"grdk": "9NKNQ2DZMLZW",
"egs": "06f5b0d8cf56445390f14516b28ea5c2"
},
{
"name": "ChineseEventOct2017",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Dungeons & Dragons Chapter",
"grdk": "9PCWX77XPKLP",
"egs": "19bb1e99cbaa41b08fa06ddde6befa28"
},
{
"name": "ChurrosCust",
"grdk": "9PC5X94ST9QK",
"egs": "f5940ef33904476b945229c70c0508b3"
},
{
"name": "All Kill Chapter",
"grdk": "9N54CBKZBV44",
"egs": "87fafa3c2a724dddb87fb2a5cd350dae"
},
{
"name": "DeathGarden",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Tomb Raider Chapter",
"grdk": "9P7BL680J1XZ",
"egs": "b12e9ce935c04bda8624a02d5d14ea02"
},
{
"name": "DonutCust",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Terror Expansion Pack",
"grdk": "9N343FZ245RD",
"egs": "489ff36aa1ba47089591bf623f0af9df"
},
{
"name": "Escape Expansion Pack",
"grdk": "9NR9FPF9G79L",
"egs": "f8c85b036b0c418097f7abf10384c821"
},
{
"name": "Castlevania Chapter",
"grdk": "9NGXBJNF1C13",
"egs": "18a5a780992347afa03d190a9c1927f9"
},
{
"name": "Resident Evil Chapter",
"grdk": "9P29W29LSSG2",
"egs": "dbf62759c9cc439699256801ee09095c"
},
{
"name": "EpicBrillFreeWeek",
"grdk": "9ZZZZZZZZZZZ",
"egs": "a9e88f5bd1a047539c772370f15deb48"
},
{
"name": "EpicBrillGeneral",
"grdk": "9ZZZZZZZZZZZ",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "The Saw\u00ae Chapter",
"grdk": "9N2P7KNZ816R",
"egs": "18b030008f8847af868aff2f0eaab510"
},
{
"name": "GStar2017",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Doomed Course Chapter",
"grdk": "9P4PV6KXJGL2",
"egs": "80cf38fedc164b2c97d6d9570a9ab2cc"
},
{
"name": "Hellraiser Chapter",
"grdk": "9PJNHM94SW0S",
"egs": "bc146268c50b4716a65a132a70d12c0a"
},
{
"name": "Curtain Call Chapter",
"grdk": "9P0HLNG7X2D0",
"egs": "2e8b8ed7a3cd481abcae1f7986153e50"
},
{
"name": "Shattered Bloodline Chapter",
"grdk": "9N78HGQN56L7",
"egs": "ca6f548dabef4026b804aaa0a606a8fa"
},
{
"name": "Maddening Darkness Pack",
"grdk": "9NB4CC8GN5S7",
"egs": "c8d9fd67a4184f069c3c080f104b89a4"
},
{
"name": "Old Wounds Pack",
"grdk": "9NGRVV847PN9",
"egs": "ac0bf77a00eb43cd822b8ac3690f3731"
},
{
"name": "Macabre Tales Pack",
"grdk": "9NP99MKHQHZS",
"egs": "b96de0a9a2294e69a6fb0667ef6ddf74"
},
{
"name": "Endless Hunt Pack",
"grdk": "9NVVCQKVPTQR",
"egs": "e0d3d8e56d934016be3ebf74c5ecc85e"
},
{
"name": "Hour of The Witch Chapter",
"grdk": "9N1XTPLC8DGB",
"egs": "4eb6bf2cdef2438b924c5d8cd2137cc5"
},
{
"name": "Tokyo Ghoul Chapter",
"grdk": "9NRWN81GQ9CJ",
"egs": "cee46f4734a94018be459b5a642f0536"
},
{
"name": "@#DLC_IcecreamCust_SHORT_NAME",
"grdk": "9NPTQDMHG1DT",
"egs": "71836318753941dd8efb7ab68575005b"
},
{
"name": "Portrait of a Murder Chapter",
"grdk": "9NZFJHT080C9",
"egs": "9e8f8dace7a243c480c6d6d06ab429c9"
},
{
"name": "Steady Pulse Chapter",
"grdk": "9P7GG0L4LJBN",
"egs": "e65a462d873046499c01f29910b00b1a"
},
{
"name": "Kabuki",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Darkness Among Us Chapter",
"grdk": "9P62QBBJZSD4",
"egs": "268cae6e74134dee92198670d7b30bcc"
},
{
"name": "Sadako Rising Chapter",
"grdk": "9PKPS8SDQQM8",
"egs": "1f3b9ad501c24864b20a9e6faef38310"
},
{
"name": "Five Nights at Freddy's Chapter",
"grdk": "9NK4H61J4B39",
"egs": "ea868d5b96b94b8ba2c2392d9a8505c0"
},
{
"name": "The Walking Dead Chapter",
"grdk": "9NZJ81G57RGT",
"egs": "f7dfa0fab53146358c1f87bc08d00b7c"
},
{
"name": "Demise of the Faithful Chapter",
"grdk": "9N29SR96GQS4",
"egs": "4f8625dec370441da5fd0a11ff0732d8"
},
{
"name": "Sinister Grace Chapter",
"grdk": "9N7WDS85VBZG",
"egs": "8ddd7882dca64a5f80ec9f1bea49892d"
},
{
"name": "Roots of Dread Chapter",
"grdk": "9PKZR14F59HK",
"egs": "511e4db16dc544faa03b8fb6811efcc5"
},
{
"name": "Ash vs Evil Dead Chapter",
"grdk": "9N55M38QNMCS",
"egs": "f8ead4a3752f41e69632bfce9838ca9b"
},
{
"name": "Ghost Face\u00ae Chapter",
"grdk": "9NMC8SZPD9GF",
"egs": "cd2c0734ab444693884d200be769be0c"
},
{
"name": "@#DLC_Omelet_SHORT_NAME",
"grdk": "9NMS4SFNBGBH",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "Resident Evil: PROJECT W Chapter",
"grdk": "9P47ZQQJM1N4",
"egs": "a523401428b54369880fd3e9d343ffe8"
},
{
"name": "Resident Evil: Project W Chapter",
"grdk": "9NX0ZCNSRNR1",
"egs": ""
},
{
"name": "Stranger Things Chapter 2",
"grdk": "9PJ0JD3ZWTBX",
"egs": "76d10ee1eacd469797a5d13bddd3850a"
},
{
"name": "Pulcinella Chapter",
"grdk": "9MTC8NRZLQ5T",
"egs": ""
},
{
"name": "Stranger Things Chapter",
"grdk": "9MSMWW173HB5",
"egs": "42e370c2688e4e96a7bf67d87a01874a"
},
{
"name": "Forged in Fog Chapter",
"grdk": "9N6Z2RG4GSD4",
"egs": "f6ac362ab0aa462e894e698682a92801"
},
{
"name": "All-Kill: Comeback Chapter",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "A Nightmare on Elm Street\u2122 Chapter",
"grdk": "9NW2X83B4JJV",
"egs": "439c3c5df54b468696f880401660d7ad"
},
{
"name": "Tools of Torment Chapter",
"grdk": "9PCSC363JX1B",
"egs": "e3ec01697342406c89110b8d117eccaf"
},
{
"name": "StoreItem",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Cursed Legacy Chapter",
"grdk": "9NJG10XN1LGL",
"egs": "01bbc39db2f446daab0b283343fc99c8"
},
{
"name": "Chains of Hate Chapter",
"grdk": "9PK2JHM3C71C",
"egs": "9a109c018e17400eae350a423e595107"
},
{
"name": "End Transmission Chapter",
"grdk": "9N5390XWCVZ6",
"egs": "19e7cf4f9329474fa0a2692a14e37fe2"
},
{
"name": "Attack on Titans Armored Chapter",
"grdk": "9P4SDDKMV045",
"egs": "956738aff598412c9a5247cfc7dae735"
},
{
"name": "Attack on Titans War Hammer Chapter",
"grdk": "9NRRQPTBW978",
"egs": "7dbb037c212947fc8011d0c934dd89f5"
},
{
"name": "Nicolas Cage Chapter",
"grdk": "9NCZMBJCLTJ3",
"egs": "29fe12a4cb51431793239261cb1fd8c3"
},
{
"name": "Silent Hill Chapter",
"grdk": "9NWVSBTG89KQ",
"egs": "e7d0828eb497411c813951058d8fd931"
},
{
"name": "Silent Hill Chapter",
"grdk": "9PHV0FJ8HXVJ",
"egs": "3280c01d39a74adc83be41e3fd74b5d1"
},
{
"name": "WinterEvent2017",
"grdk": "9NMS4SFNBGBH",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "Alien Chapter",
"grdk": "9NC2M3W7NHB5",
"egs": "4ebd4f31838549e38eecb23130e57700"
},
{
"name": "XboxPerkNov2020",
"grdk": "9N2DHTZ1D9CC",
"egs": ""
},
{
"name": "Descend Beyond Chapter",
"grdk": "9NFXH0QD1M7C",
"egs": "89120707a96a4210a9e23dced174632e"
},
{
"name": "Chucky Chapter",
"grdk": "9P0NJ7CS0TM1",
"egs": "f1e1bce49652456e85de167fbcc52a6a"
},
{
"name": "Alan Wake Chapter",
"grdk": "9MZ841F14MXK",
"egs": "8fbd0077488b4334ae91de61588870ff"
},
{
"name": "bloodletting",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "The Bloodstained Sack",
"grdk": "9NW55H5J9NH2",
"egs": "abc74084457d46f5a51f062f540bdeee"
},
{
"name": "A Lullaby for the Dark Chapter",
"grdk": "9NMS4SFNBGBH",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "Charity Case",
"grdk": "9P1CNFD3MMC7",
"egs": "0885718299d640708080b66ddb9dceb1"
},
{
"name": "development",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
},
{
"name": "Of Flesh and Mud Chapter",
"grdk": "9NJQTSL5PZJL",
"egs": "b18a490a58d548588eb60c2fd6b4c3cc"
},
{
"name": "Halloween\u00ae Chapter",
"grdk": "9NJ77BPBRSFH",
"egs": "c9d4a48a9576483fb6ba27a99bcb3780"
},
{
"name": "Headcase",
"grdk": "9NCLGTXXZ18Q",
"egs": "93f4e154df3a4254a0ece7241659d84e"
},
{
"name": "The Last Breath Chapter",
"grdk": "9NMS4SFNBGBH",
"egs": "daedda2898b74feeac35f222ef02539a"
},
{
"name": "Spark of Madness Chapter",
"grdk": "9NX58MLKKQWD",
"egs": "4b9c8d9424ca4a2899505254ba46b109"
},
{
"name": "steamOnly",
"grdk": "9ZZZZZZZZZZZ",
"egs": ""
}
]
+5 -46
View File
@@ -1,5 +1,5 @@
{ {
"Items": [ "Campers": [
"FireflyLantern", "FireflyLantern",
"Item_Camper_AlexsToolbox", "Item_Camper_AlexsToolbox",
"Item_Camper_AnniversaryToolbox", "Item_Camper_AnniversaryToolbox",
@@ -24,6 +24,10 @@
"Item_Camper_JerryCan_Spring2025", "Item_Camper_JerryCan_Spring2025",
"Item_Camper_K29InfectionRemover", "Item_Camper_K29InfectionRemover",
"Item_Camper_K32Emp", "Item_Camper_K32Emp",
"Item_Camper_K36MagicItem_Boots",
"Item_Camper_K36MagicItem_Bracers",
"Item_Camper_K36MagicItem_VecnaEye",
"Item_Camper_K36MagicItem_VecnaHand",
"Item_Camper_Key", "Item_Camper_Key",
"Item_Camper_Key_Random", "Item_Camper_Key_Random",
"Item_Camper_LunarToolbox", "Item_Camper_LunarToolbox",
@@ -38,7 +42,6 @@
"Item_Camper_MedKit03", "Item_Camper_MedKit03",
"Item_Camper_MedKit04", "Item_Camper_MedKit04",
"Item_Camper_Medkit05", "Item_Camper_Medkit05",
"Item_Camper_OnryoTape",
"Item_Camper_RainbowMap", "Item_Camper_RainbowMap",
"Item_Camper_Toolbox", "Item_Camper_Toolbox",
"Item_Camper_Toolbox_Anniversary2022", "Item_Camper_Toolbox_Anniversary2022",
@@ -51,49 +54,5 @@
"Item_Survivor_MakeshiftFogVial", "Item_Survivor_MakeshiftFogVial",
"Item_Survivor_PrototypeFogVial", "Item_Survivor_PrototypeFogVial",
"Item_Survivor_VigosFogVial" "Item_Survivor_VigosFogVial"
],
"Powers": [
"Item_Slasher_Beartrap",
"Item_Slasher_Blinker",
"Item_Slasher_Chainsaw",
"Item_Slasher_CloakBell",
"Item_Slasher_DreamInducer",
"Item_Slasher_Frenzy",
"Item_Slasher_GasBomb",
"Item_Slasher_GhostPower",
"Item_Slasher_HarpoonRifle",
"Item_Slasher_Hatchet",
"Item_Slasher_K21Power",
"Item_Slasher_K22Power",
"Item_Slasher_K24Power",
"Item_Slasher_K25Power",
"Item_Slasher_K26Power",
"Item_Slasher_K27Power",
"Item_Slasher_K28Power",
"Item_Slasher_K29Power",
"Item_Slasher_K30Power",
"Item_Slasher_K31Power",
"Item_Slasher_K32Power",
"Item_Slasher_K33Power",
"Item_Slasher_K34Power",
"Item_Slasher_K35Power",
"Item_Slasher_K36Power",
"Item_Slasher_K37Power",
"Item_Slasher_K38Power",
"Item_Slasher_K39Power",
"Item_Slasher_K40Power",
"Item_Slasher_K41Power",
"Item_Slasher_K42Power",
"Item_Slasher_Kanobo",
"Item_Slasher_Killer07Item",
"Item_Slasher_LFChainsaw",
"Item_Slasher_PhantomTrap",
"Item_Slasher_PhaseWalker",
"Item_Slasher_PlaguePower",
"Item_Slasher_QatarKillerPower",
"Item_Slasher_ReverseBearTrap",
"Item_Slasher_Stalker",
"Item_Slasher_ThrowingKnives",
"Item_Slasher_TormentMode"
] ]
} }
Binary file not shown.
Binary file not shown.
+132 -126
View File
@@ -1,126 +1,132 @@
[ {
"BoneSplinter", "Slashers": [
"ArdentRavenWreath", "ArdentRavenWreath",
"ArdentShrikeWreath", "ArdentShrikeWreath",
"ArdentSpottedowlWreath", "ArdentSpottedowlWreath",
"ArdentTanagerWreath", "ArdentTanagerWreath",
"AzarovKey", "BlackSplinter",
"BlackSaltStatuette", "BlackWard",
"BlackWard", "BoneSplinter",
"BogLaurelSachet", "CutCoin",
"BoundEnvelope", "CypressMementoMori",
"CattleTag28", "DevoutRavenWreath",
"ChalkPouch", "DevoutShrikeWreath",
"CharredWeddingPhotograph", "DevoutSpottedowlWreath",
"ClearReagent", "DevoutTanagerWreath",
"ColdwindCattleTag81", "EbonyMementoMori",
"CreamChalkPouch", "GlassSplinter",
"CrescentMoonBouquet", "HollowShell",
"CrispleafAmaranthSachet", "IvoryMementoMori",
"CutCoin", "MoldyOak",
"CypressMementoMori", "MuddySplinter",
"DevoutRavenWreath", "PutridOak",
"DevoutShrikeWreath", "RavenWreath",
"DevoutSpottedowlWreath", "RottenOak",
"DevoutTanagerWreath", "ScratchedCoin",
"EbonyMementoMori", "ShockSplinter",
"FaintReagent", "ShrikeWreath",
"FragrantBogLaurel", "ShroudofSeparation",
"FragrantCrispleafAmaranth", "SmokingSplinter",
"FragrantPrimroseBlossom", "SpottedOwlWreath",
"FragrantSweetWilliam", "SurvivorPudding",
"FreshBogLaurel", "TanagerWreath"
"FreshCrispleafAmaranth", ],
"FreshPrimroseBlossom", "Campers": [
"FreshSweetWilliam", "BlackSaltStatuette",
"FullMoonBouquet", "BogLaurelSachet",
"HazyReagent", "BoundEnvelope",
"HeartLocket", "ChalkPouch",
"HollowShell", "CreamChalkPouch",
"IvoryChalkPouch", "CrispleafAmaranthSachet",
"IvoryMementoMori", "EscapeCake",
"LunacyTicket", "FragrantBogLaurel",
"MacmillanLedgerPage", "FragrantCrispleafAmaranth",
"MacMillanPhalanxBone", "FragrantPrimroseBlossom",
"MoldyOak", "FragrantSweetWilliam",
"MurkyReagent", "FreshBogLaurel",
"NewMoonBouquet", "FreshCrispleafAmaranth",
"PElliotLunacyTicket", "FreshPrimroseBlossom",
"PetrifiedOak", "FreshSweetWilliam",
"PrimroseBlossomSachet", "IvoryChalkPouch",
"PutridOak", "PetrifiedOak",
"QuarterMoonBouquet", "PrimroseBlossomSachet",
"RavenWreath", "SaltPouch",
"RottenOak", "SealedEnvelope",
"SaltPouch", "ShinyCoin",
"ScratchedCoin", "ShroudofBinding",
"SealedEnvelope", "ShroudofUnion",
"ShinyCoin", "SweetWilliamSachet",
"ShreddedPlate", "TarnishedCoin",
"ShrikeWreath", "VigosJarOfSaltyLips",
"ShroudofBinding", "VigosShroud",
"ShroudofSeparation", "WhiteWard"
"ShroudofUnion", ],
"SignedLedgerPage", "All": [
"SpottedOwlWreath", "Anniversary2019Offering",
"SweetWilliamSachet", "Anniversary2020Offering",
"TanagerWreath", "Anniversary2021Offering",
"TarnishedCoin", "Anniversary2022Offering",
"VigosShroud", "Anniversary2023Offering",
"VirginiaPlate", "Anniversary2024Offering",
"WhiteWard", "Anniversary2025Offering",
"VigosJarOfSaltyLips", "AnnotatedBlueprint",
"MuddySplinter", "AzarovKey",
"FumingCordage", "BloodiedBlueprint",
"FumingWelcomeSign", "BloodyPartyStreamers",
"GranmasCookbook", "CattleTag28",
"EscapeCake", "CharredWeddingPhotograph",
"SurvivorPudding", "ChildrensBook",
"BloodyPartyStreamers", "ClearReagent",
"Anniversary2019Offering", "ColdwindCattleTag81",
"Anniversary2022Offering", "CrescentMoonBouquet",
"Anniversary2024Offering", "DecrepitClapboard",
"Winter2024Offering", "EclipseThemeOffering",
"Spring2024Offering", "EmergencyCertificate",
"Anniversary2025Offering", "FaintReagent",
"Anniversary2023Offering", "FullMoonBouquet",
"Halloween2022Offering", "FumingCordage",
"Halloween2021Offering", "FumingWelcomeSign",
"PaintedRiverRock", "GranmasCookbook",
"ChildrensBook", "Halloween2021Offering",
"TheLastMask", "Halloween2022Offering",
"Anniversary2021Offering", "HalloweenOffering",
"SummerOffering", "HarvestFestivalLeaflet",
"QatarThemeOffering", "HazyReagent",
"RedMoney", "HeartLocket",
"SmokingSplinter", "IonThemeOffering",
"ThePiedPiper", "JapaneseCountrySide",
"QuicheThemeOffering", "Jigsawpiece",
"WormholeThemeOffering", "KenyaThemeOffering",
"Anniversary2020Offering", "LunacyTicket",
"BlackSplinter", "MacmillanLedgerPage",
"StrodeRealtyKey", "MacMillanPhalanxBone",
"DecrepitClapboard", "MeteorThemeOffering",
"HarvestFestivalLeaflet", "MurkyReagent",
"ShockSplinter", "NewMoonBouquet",
"EmergencyCertificate", "PaintedRiverRock",
"PsychiatricAssessmentReport", "PElliotLunacyTicket",
"ShatteredGlasses", "PsychiatricAssessmentReport",
"HalloweenOffering", "QatarThemeOffering",
"UmbraThemeOffering", "QuantumThemeOffering",
"QuantumThemeOffering", "QuarterMoonBouquet",
"KenyaThemeOffering", "QuicheThemeOffering",
"EclipseThemeOffering", "RedMoney",
"IonThemeOffering", "SacrificalWard",
"GlassSplinter", "ShatteredGlasses",
"Jigsawpiece", "ShreddedPlate",
"JapaneseCountrySide", "SignedLedgerPage",
"MeteorThemeOffering", "Spring2024Offering",
"UkraineThemeOffering", "StrodeRealtyKey",
"SacrificalWard", "SummerOffering",
"TornBlueprint", "TheLastMask",
"BloodiedBlueprint", "ThePiedPiper",
"VigosBlueprint", "TornBlueprint",
"AnnotatedBlueprint", "UkraineThemeOffering",
"WalesThemeOffering" "UmbraThemeOffering",
] "VigosBlueprint",
"VirginiaPlate",
"WalesThemeOffering",
"Winter2024Offering",
"WormholeThemeOffering"
]
}
+288 -284
View File
@@ -1,313 +1,317 @@
[ {
"S45P01", "Slashers": [
"S45P02", "Agitation",
"S45P03", "Bamboozle",
"K38P01",
"K38P02",
"K38P03",
"K37P01",
"K37P02",
"K37P03",
"TacticianBlastMine_Calamari",
"TacticianWireTap_Calamari",
"BetterTogether",
"Fixated",
"InnerStrength",
"S24P01",
"S24P02",
"S24P03",
"S31P01",
"S31P02",
"S31P03",
"S32P01",
"S32P02",
"S32P03",
"Solidarity",
"Poised",
"HeadOn",
"S29P01",
"S29P02",
"S29P03",
"S27P01",
"S27P02",
"S27P03",
"LuckyBreak",
"AnyMeansNecessary",
"Breakout",
"DeadHard",
"NoMither",
"WereGonnaLiveForever",
"S26P01",
"S26P02",
"S26P03",
"S35P01",
"S35P02",
"S35P03",
"S39P01",
"S39P02",
"S39P03",
"FlipFlop",
"BuckleUp",
"TheMettleOfMan",
"Babysitter",
"Camaraderie",
"SecondWind",
"K27P01",
"K27P02",
"K27P03",
"Ace_In_The_Hole",
"Open_Handed",
"Up_The_Ante",
"Thanatophobia",
"NurseCalling",
"Stridor",
"K33P01",
"K33P02",
"K33P03",
"WindowsOfOpportunity",
"BoilOver",
"Dance_with_me",
"OverwhelmingPresence",
"MonitorAndAbuse",
"GeneratorOvercharge",
"K29P01",
"K29P02",
"K29P03",
"Adrenaline",
"QuickQuiet",
"Sprint_Burst",
"Balanced_Landing",
"Urban_Evasion",
"Streetwise",
"S34P01",
"S34P02",
"S34P03",
"S33P01",
"S33P02",
"S33P03",
"S25P01",
"S25P02",
"S25P03",
"Breakdown",
"Aftercare",
"Distortion",
"BBQAndChilli", "BBQAndChilli",
"InTheDark",
"FranklinsLoss",
"HangmansTrick",
"Surveillance",
"MakeYourChoice",
"BorrowedTime",
"SelfSufficient",
"LeftBehind",
"BeastOfPrey", "BeastOfPrey",
"Hex_HuntressLullaby", "Bitter_Murmur",
"TerritorialImperative", "BloodEcho",
"Botany_Knowledge",
"Empathy",
"Self_Care",
"OffTheRecord",
"RedHerring",
"ForThePeople",
"K24P01",
"K24P02",
"K24P03",
"S38P01",
"S38P02",
"S38P03",
"BloodHound", "BloodHound",
"Predator", "BloodWarden",
"Shadowborn", "BoonDestroyer",
"ImAllEars", "Brutal_Strength",
"ThrillingTremors", "CorruptIntervention",
"Coulrophobia",
"CruelConfinement",
"DarkDevotion",
"DeadMansSwitch",
"Deathbound",
"Deerstalker",
"Discordance",
"Distressing",
"DragonsGrip",
"Dying_Light",
"Enduring",
"FireUp",
"ForcedPenance",
"FranklinsLoss",
"FurtiveChase", "FurtiveChase",
"S41P01", "Gearhead",
"S41P02", "GeneratorOvercharge",
"S41P03", "HangmansTrick",
"SoleSurvivor", "Hex_Devour_Hope",
"DecisiveStrike", "Hex_HauntedGround",
"ObjectOfObsession", "Hex_HuntressLullaby",
"K34P01", "Hex_Ruin",
"K34P02", "Hex_The_Third_Seal",
"K34P03", "Hex_Thrill_Of_The_Hunt",
"HexBloodFavor",
"HexRetribution",
"HexUndying",
"ImAllEars",
"InfectiousFright",
"Insidious",
"InTheDark",
"Iron_Grasp",
"Ironmaiden",
"K22P01",
"K22P02",
"K22P03",
"K23P01", "K23P01",
"K23P02", "K23P02",
"K23P03", "K23P03",
"K30P01", "K24P01",
"K30P02", "K24P02",
"K30P03", "K24P03",
"Visionary",
"DesperateMeasures",
"BuiltToLast",
"Bond",
"Leader",
"Prove_Thyself",
"CorruptIntervention",
"InfectiousFright",
"DarkDevotion",
"S49P01",
"S49P02",
"S49P03",
"K41P01",
"K41P02",
"K41P03",
"SoulGuard",
"BloodPact",
"RepressedAlliance",
"Discordance",
"MadGrit",
"Ironmaiden",
"S30P01",
"S30P02",
"S30P03",
"K42P01",
"K42P02",
"K42P03",
"K35P01",
"K35P02",
"K35P03",
"S46P01",
"S46P02",
"S46P03",
"S28P01",
"S28P02",
"S28P03",
"ZanshinTactics",
"BloodEcho",
"Nemesis",
"S42P01",
"S42P02",
"S42P03",
"S51P01",
"S51P02",
"S51P03",
"S50P01",
"S50P02",
"S50P03",
"Calm_Spirit",
"Iron_Will",
"Saboteur",
"K32P01",
"K32P02",
"K32P03",
"S52P01",
"S52P02",
"S52P03",
"BloodWarden",
"FireUp",
"RememberMe",
"ForcedPenance",
"TrailofTorment",
"Deathbound",
"S37P01",
"S37P02",
"S37P03",
"S47P01",
"S47P02",
"S47P03",
"Save_The_Best_For_Last",
"Dying_Light",
"Play_With_Your_Food",
"S48P01",
"S48P02",
"S48P03",
"Technician",
"Lithe",
"Alert",
"Pharmacy",
"Vigil",
"WakeUp",
"Diversion",
"Deliverance",
"Autodidact",
"S40P01",
"S40P02",
"S40P03",
"S36P01",
"S36P02",
"S36P03",
"K25P01", "K25P01",
"K25P02", "K25P02",
"K25P03", "K25P03",
"K31P01", "K26P01",
"K31P02", "K26P02",
"K31P03", "K26P03",
"S43P01", "K27P01",
"S43P02", "K27P02",
"S43P03", "K27P03",
"K28P01", "K28P01",
"K28P02", "K28P02",
"K28P03", "K28P03",
"K29P01",
"K29P02",
"K29P03",
"K30P01",
"K30P02",
"K30P03",
"K31P01",
"K31P02",
"K31P03",
"K32P01",
"K32P02",
"K32P03",
"K33P01",
"K33P02",
"K33P03",
"K34P01",
"K34P02",
"K34P03",
"K35P01",
"K35P02",
"K35P03",
"K36P01",
"K36P02",
"K36P03",
"K37P01",
"K37P02",
"K37P03",
"K38P01",
"K38P02",
"K38P03",
"K39P01", "K39P01",
"K39P02", "K39P02",
"K39P03", "K39P03",
"K40P01", "K40P01",
"K40P02", "K40P02",
"K40P03", "K40P03",
"Surge", "K41P01",
"K41P02",
"K41P03",
"K42P01",
"K42P02",
"K42P03",
"Lightborn",
"MadGrit",
"MakeYourChoice",
"Mindbreaker", "Mindbreaker",
"CruelConfinement", "MonitorAndAbuse",
"Tenacity", "Monstrous_Shrine",
"Nemesis",
"No_One_Escapes_Death",
"NurseCalling",
"OverwhelmingPresence",
"Play_With_Your_Food",
"pop_goes_the_weasel",
"Predator",
"Rancor",
"RememberMe",
"Save_The_Best_For_Last",
"Shadowborn",
"Sloppy_Butcher",
"Spies_From_The_Shadows",
"SpiritFury",
"Stridor",
"Surge",
"Surveillance",
"TerritorialImperative",
"Thanatophobia",
"ThrillingTremors",
"Tinkerer",
"TrailofTorment",
"Unnerving_Presence",
"Unrelenting",
"Whispers",
"ZanshinTactics"
],
"Campers": [
"Ace_In_The_Hole",
"Adrenaline",
"Aftercare",
"Alert",
"AnyMeansNecessary",
"Autodidact",
"Babysitter",
"Balanced_Landing",
"BetterTogether",
"BloodPact",
"BoilOver",
"Bond",
"BorrowedTime",
"Botany_Knowledge",
"Breakdown",
"Breakout",
"BuckleUp",
"BuiltToLast",
"Calm_Spirit",
"Camaraderie",
"Dance_with_me",
"Dark_Sense",
"DeadHard",
"DecisiveStrike",
"Deja_Vu",
"Deliverance",
"DesperateMeasures",
"DetectivesHunch", "DetectivesHunch",
"StakeOut", "Distortion",
"K36P01", "Diversion",
"K36P02", "Empathy",
"K36P03", "Fixated",
"FlipFlop",
"ForThePeople",
"HeadOn",
"Hope",
"InnerStrength",
"Iron_Will",
"Kindred",
"Leader",
"LeftBehind",
"Lightweight",
"Lithe",
"LuckyBreak",
"No_One_Left_Behind",
"NoMither",
"ObjectOfObsession",
"OffTheRecord",
"Open_Handed",
"Pharmacy",
"Plunderers_Instinct",
"Poised",
"Premonition",
"Prove_Thyself",
"QuickQuiet",
"RedHerring",
"RepressedAlliance",
"Resilience",
"S24P01",
"S24P02",
"S24P03",
"S25P01",
"S25P02",
"S25P03",
"S26P01",
"S26P02",
"S26P03",
"S27P01",
"S27P02",
"S27P03",
"S28P01",
"S28P02",
"S28P03",
"S29P01",
"S29P02",
"S29P03",
"S30P01",
"S30P02",
"S30P03",
"S31P01",
"S31P02",
"S31P03",
"S32P01",
"S32P02",
"S32P03",
"S33P01",
"S33P02",
"S33P03",
"S34P01",
"S34P02",
"S34P03",
"S35P01",
"S35P02",
"S35P03",
"S36P01",
"S36P02",
"S36P03",
"S37P01",
"S37P02",
"S37P03",
"S38P01",
"S38P02",
"S38P03",
"S39P01",
"S39P02",
"S39P03",
"S40P01",
"S40P02",
"S40P03",
"S41P01",
"S41P02",
"S41P03",
"S42P01",
"S42P02",
"S42P03",
"S43P01",
"S43P02",
"S43P03",
"S44P01", "S44P01",
"S44P02", "S44P02",
"S44P03", "S44P03",
"Agitation", "S45P01",
"Bitter_Murmur", "S45P02",
"Brutal_Strength", "S45P03",
"Dark_Sense", "S46P01",
"Deerstalker", "S46P02",
"Deja_Vu", "S46P03",
"Distressing", "S47P01",
"Enduring", "S47P02",
"Hex_Devour_Hope", "S47P03",
"Hex_Ruin", "S48P01",
"Hex_The_Third_Seal", "S48P02",
"Hex_Thrill_Of_The_Hunt", "S48P03",
"Hope", "S49P01",
"Insidious", "S49P02",
"Iron_Grasp", "S49P03",
"Kindred", "S50P01",
"Lightborn", "S50P02",
"Lightweight", "S50P03",
"Monstrous_Shrine", "S51P01",
"No_One_Escapes_Death", "S51P02",
"No_One_Left_Behind", "S51P03",
"Plunderers_Instinct", "S52P01",
"Premonition", "S52P02",
"Resilience", "S52P03",
"Saboteur",
"SecondWind",
"Self_Care",
"SelfSufficient",
"Slippery_Meat", "Slippery_Meat",
"Sloppy_Butcher",
"Small_Game", "Small_Game",
"Spies_From_The_Shadows", "SoleSurvivor",
"Solidarity",
"SoulGuard",
"Spine_Chill", "Spine_Chill",
"Sprint_Burst",
"StakeOut",
"Streetwise",
"TacticianBlastMine_Calamari",
"TacticianWireTap_Calamari",
"Technician",
"Tenacity",
"TheMettleOfMan",
"This_Is_Not_Happening", "This_Is_Not_Happening",
"Tinkerer", "Up_The_Ante",
"Unnerving_Presence", "Urban_Evasion",
"Unrelenting", "Vigil",
"Visionary",
"WakeUp",
"WellMakeIt", "WellMakeIt",
"Whispers", "WereGonnaLiveForever",
"K22P01", "WindowsOfOpportunity"
"K22P02", ]
"K22P03", }
"K26P01",
"K26P02",
"K26P03",
"SpiritFury",
"Hex_HauntedGround",
"Rancor",
"BoonDestroyer",
"Gearhead",
"DeadMansSwitch",
"HexRetribution",
"Coulrophobia",
"pop_goes_the_weasel",
"Bamboozle",
"DragonsGrip",
"HexUndying",
"HexBloodFavor"
]
+10
View File
@@ -0,0 +1,10 @@
public static class Constants
{
public static readonly string MappingURL = "https://git.neru.rip/neru/UnlockedByDaylight/raw/branch/main/res/mappings/latest-xbox.usmap";
public static readonly string PackageName = "BehaviourInteractive.DeadbyDaylightWindows";
public static readonly string AESKey = "0x22B1639B548124925CF7B9CBAA09F9AC295FCF0324586D6B37EE1D42670B39B3";
public static readonly string[] BlacklistedCustomizationItems = ["NK_Torso01_Crew01Kraken"];
}
+40
View File
@@ -0,0 +1,40 @@
public enum EItemAvailability : byte
{
Available,
Disabled,
Retired
}
public enum ECustomizationCategory : byte
{
None,
SurvivorHead,
SurvivorTorso,
SurvivorLegs,
KillerHead,
KillerBody,
KillerWeapon,
Outfits,
Charm,
Badge,
Banner,
PortraitBackground
}
public enum EPlayerRole : byte
{
VE_None,
VE_Slasher,
VE_Camper,
VE_Observer
}
public struct AvailabilityStruct
{
public EItemAvailability itemAvailability;
public string DLCId;
public string[] AdditionalDlcIds;
public Int32 CloudInventoryId;
public string CommunityId;
public bool _isLicensed;
}
+404
View File
@@ -0,0 +1,404 @@
using CUE4Parse.Compression;
using CUE4Parse.Encryption.Aes;
using CUE4Parse.FileProvider;
using CUE4Parse.MappingsProvider;
using CUE4Parse.UE4.Assets.Exports;
using CUE4Parse.UE4.Assets.Exports.Actor;
using CUE4Parse.UE4.Assets.Exports.Engine;
using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects;
using CUE4Parse.UE4.Assets.Objects.Properties;
using CUE4Parse.UE4.Objects.Core.Misc;
using CUE4Parse.UE4.Versions;
using CUE4Parse.UE4.VirtualFileSystem;
using CUE4Parse.UE4.Wwise.Plugins.MasteringSuite;
using Microsoft.Win32;
using Newtonsoft.Json;
using System.Reflection;
class Dumper
{
private DefaultFileProvider? _provider = null;
private IAesVfsReader? _dataPak = null;
public async Task<bool> InitAsync()
{
/*
* ensure mapping
*/
string mappingPath = Path.Combine(Path.GetTempPath(), "DeadByDaylight.usmap");
bool hasDownloadedMapping = await DownloadMappingFileAsync(Constants.MappingURL, mappingPath);
if (!hasDownloadedMapping)
return false;
/*
* compression setup
*/
ZlibHelper.Initialize();
var oodlePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, OodleHelper.OodleFileName);
OodleHelper.Initialize(oodlePath);
/*
* game localization
*/
var gamePath = getGamePath();
if (gamePath == null) return false;
var pakDir = gamePath + "\\DeadByDaylight\\Content\\Paks";
if (!Directory.Exists(pakDir))
{
Console.WriteLine("PAK dir does not exist. (Invalid install?)");
return false;
}
/*
* provider setup
*/
var version = new VersionContainer(EGame.GAME_DeadByDaylight, ETexturePlatform.DesktopMobile);
_provider = new DefaultFileProvider(pakDir, SearchOption.TopDirectoryOnly, version);
_provider.MappingsContainer = new FileUsmapTypeMappingsProvider(mappingPath);
_provider.Initialize();
_provider.SubmitKey(new FGuid(), new FAesKey(Constants.AESKey));
_provider.Mount();
/*
* load db pak
*/
bool hasDataPak = _provider.TryGetArchive("pakchunk4-WinGDK.utoc", out _dataPak);
if (!hasDataPak)
{
Console.WriteLine("Failed to load pakchunk4-WinGDK.utoc");
return false;
}
return true;
}
public string? DumpCustomizationItems()
{
if (_dataPak == null || _provider == null) return null;
var searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/CustomizationItemDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var characterItems = new List<string>();
var outfits = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? categoryProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Category");
if (categoryProp == null || categoryProp.Tag == null) continue;
FPropertyTag? availabilityProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Availability");
if (availabilityProp == null || availabilityProp.Tag == null) continue;
FStructFallback? availabilityFallback = availabilityProp.Tag.GetValue<FStructFallback>();
if (availabilityFallback == null) continue;
/*
* real data
*/
string itemName = row.Key.Text;
AvailabilityStruct availability = availabilityFallback.MapToStruct<AvailabilityStruct>();
ECustomizationCategory category = categoryProp.Tag.GetValue<ECustomizationCategory>();
/*
* sketchy item filtering
*/
if (availability.DLCId == "development") continue;
if (category < ECustomizationCategory.SurvivorHead || category > ECustomizationCategory.KillerWeapon) continue;
if (Constants.BlacklistedCustomizationItems.Contains(itemName)) continue;
/*
* storing
*/
characterItems.Add(itemName);
}
}
}
searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/OutfitDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? availabilityProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Availability");
if (availabilityProp == null || availabilityProp.Tag == null) continue;
FStructFallback? availabilityFallback = availabilityProp.Tag.GetValue<FStructFallback>();
if (availabilityFallback == null) continue;
/*
* real data
*/
string outfitName = row.Key.Text;
AvailabilityStruct availability = availabilityFallback.MapToStruct<AvailabilityStruct>();
if (availability.DLCId == "development")
continue;
outfits.Add(outfitName);
}
}
}
var customizationsSerialized = new
{
Items = characterItems.OrderBy(x => x).ToList(),
Outfits = outfits.OrderBy(x => x).ToList()
};
return JsonConvert.SerializeObject(customizationsSerialized, Formatting.Indented);
}
public string? DumpItems()
{
if (_dataPak == null || _provider == null) return null;
var searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/ItemDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var camperItems = new List<string>();
//var slasherPowers = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? roleProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Role");
if (roleProp == null || roleProp.Tag == null) continue;
//FPropertyTag? typeProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Type");
//if (typeProp == null || typeProp.Tag == null) continue;
/*
* real data
*/
string itemName = row.Key.Text;
EPlayerRole role = roleProp.Tag.GetValue<EPlayerRole>();
if (role == EPlayerRole.VE_Camper)
camperItems.Add(itemName);
//else
// slasherPowers.Add(itemName);
}
}
}
var itemsSerialized = new
{
Campers = camperItems.OrderBy(x => x).ToList()
};
return JsonConvert.SerializeObject(itemsSerialized, Formatting.Indented);
}
public string? DumpAddons()
{
if (_dataPak == null || _provider == null) return null;
var searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/ItemAddonDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var camperAddons = new List<string>();
var slasherAddons = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? roleProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Role");
if (roleProp == null || roleProp.Tag == null) continue;
/*
* real data
*/
string itemName = row.Key.Text;
EPlayerRole role = roleProp.Tag.GetValue<EPlayerRole>();
if (role == EPlayerRole.VE_Camper)
camperAddons.Add(itemName);
else
slasherAddons.Add(itemName);
}
}
}
var addonsSerialized = new
{
Slashers = slasherAddons.OrderBy(x => x).ToList(),
Campers = camperAddons.OrderBy(x => x).ToList()
};
return JsonConvert.SerializeObject(addonsSerialized, Formatting.Indented);
}
public string? DumpOfferings()
{
if (_dataPak == null || _provider == null) return null;
var searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/OfferingDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var globalOfferings = new List<string>();
var camperOfferings = new List<string>();
var slasherOfferings = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? roleProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Role");
if (roleProp == null || roleProp.Tag == null) continue;
/*
* real data
*/
string itemName = row.Key.Text;
EPlayerRole role = roleProp.Tag.GetValue<EPlayerRole>();
if (role == EPlayerRole.VE_Camper)
camperOfferings.Add(itemName);
else if (role == EPlayerRole.VE_Slasher)
slasherOfferings.Add(itemName);
else
globalOfferings.Add(itemName);
}
}
}
var offeringsSerialized = new
{
Slashers = slasherOfferings.OrderBy(x => x).ToList(),
Campers = camperOfferings.OrderBy(x => x).ToList(),
All = globalOfferings.OrderBy(x => x).ToList()
};
return JsonConvert.SerializeObject(offeringsSerialized, Formatting.Indented);
}
public string? DumpPerks()
{
if (_dataPak == null || _provider == null) return null;
var searchPaths = _dataPak.Files.Keys.Where(x => x.Contains($"/PerkDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var camperPerks = new List<string>();
var slasherPerks = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (_provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
foreach (var row in dataTable.RowMap)
{
/*
* props
*/
var props = row.Value.Properties;
FPropertyTag? roleProp = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Role");
if (roleProp == null || roleProp.Tag == null) continue;
/*
* real data
*/
string itemName = row.Key.Text;
EPlayerRole role = roleProp.Tag.GetValue<EPlayerRole>();
if (role == EPlayerRole.VE_Camper)
camperPerks.Add(itemName);
else
slasherPerks.Add(itemName);
}
}
}
var perksSerialized = new
{
Slashers = slasherPerks.OrderBy(x => x).ToList(),
Campers = camperPerks.OrderBy(x => x).ToList()
};
return JsonConvert.SerializeObject(perksSerialized, Formatting.Indented);
}
private string? getGamePath()
{
const string packagesPath = @"Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages";
using var key = Registry.CurrentUser.OpenSubKey(packagesPath);
if (key == null) return null;
string? matchingKeyName = key.GetSubKeyNames()
.FirstOrDefault(name => name.StartsWith(Constants.PackageName, StringComparison.OrdinalIgnoreCase));
if (matchingKeyName != null)
{
using (RegistryKey? subKey = key.OpenSubKey(matchingKeyName))
return subKey?.GetValue("PackageRootFolder")?.ToString();
}
Console.WriteLine("Failed to find game install dir");
return null;
}
private async Task<bool> DownloadMappingFileAsync(string url, string outPath)
{
try
{
using (var httpClient = new HttpClient())
{
var bytes = await httpClient.GetByteArrayAsync(url);
Console.WriteLine("Downloading mapping file...");
await File.WriteAllBytesAsync(outPath, bytes);
Console.WriteLine($"Mapping file downloaded to: {outPath}");
return true;
}
}
catch (Exception ex)
{
Console.WriteLine($"Error occured while downloading mapping: {ex.Message}");
}
return false;
}
}
+69 -185
View File
@@ -1,188 +1,72 @@
using CUE4Parse.Compression; using CUE4Parse.UE4.Assets.Exports.CustomizableObject;
using CUE4Parse.Encryption.Aes;
using CUE4Parse.FileProvider;
using CUE4Parse.MappingsProvider;
using CUE4Parse.UE4.Assets.Exports.Engine;
using CUE4Parse.UE4.Assets.Exports.Texture;
using CUE4Parse.UE4.Assets.Objects.Properties;
using CUE4Parse.UE4.Objects.Core.Misc;
using CUE4Parse.UE4.Objects.UObject;
using CUE4Parse.UE4.Versions;
using Newtonsoft.Json;
class DumpByDaylight int displayError(string err)
{ {
private const string _pakDir = "E:\\Program Files (x86)\\Steam\\steamapps\\common\\Dead by Daylight\\DeadByDaylight\\Content\\Paks"; Console.WriteLine($"Dumper error: {err}");
private const string _aesKey = "0x22B1639B548124925CF7B9CBAA09F9AC295FCF0324586D6B37EE1D42670B39B3"; Console.WriteLine("Press any key to exit");
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"; Console.ReadKey();
return 1;
public static async Task<string?> DownloadMappingFileAsync(string url, string savePath)
{
try
{
using (var httpClient = new HttpClient())
{
Console.WriteLine("downloading mapping file...");
var bytes = await httpClient.GetByteArrayAsync(url);
await File.WriteAllBytesAsync(savePath, bytes);
Console.WriteLine($"mapping file downloaded to: {savePath}");
return savePath;
}
}
catch (Exception ex)
{
Console.WriteLine($"failed to download mapping: {ex.Message}");
return null;
}
}
static async Task Main(string[] args)
{
// mapping
string mappingPath = Path.Combine(Path.GetTempPath(), "DeadByDaylight.usmap");
string? downloadedMapping = await DownloadMappingFileAsync(_mappingURL, mappingPath);
if (string.IsNullOrEmpty(downloadedMapping))
{
Console.WriteLine("failed to download mapping file, press any key to exit");
Console.ReadKey();
return;
}
ZlibHelper.Initialize();
var oodlePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, OodleHelper.OodleFileName);
OodleHelper.Initialize(oodlePath);
// parsing setup
var version = new VersionContainer(EGame.GAME_DeadByDaylight, ETexturePlatform.DesktopMobile);
var provider = new DefaultFileProvider(_pakDir, SearchOption.TopDirectoryOnly, version);
provider.MappingsContainer = new FileUsmapTypeMappingsProvider(downloadedMapping);
provider.Initialize();
provider.SubmitKey(new FGuid(), new FAesKey(_aesKey));
provider.Mount();
Console.WriteLine("\nProvider Initialized. Extracting Databases...");
var dataPak = provider.GetArchive("pakchunk4-Windows.utoc");
/*
* itemdb dump
*/
var searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/ItemDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var items = new List<string>();
var powers = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
Console.WriteLine($"getting items / powers from {Path.GetFileName(path)}");
foreach (var row in dataTable.RowMap)
{
var typeProperty = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Type");
if (typeProperty?.Tag is EnumProperty enumProp)
{
string typeName = enumProp.Value.ToString() ?? "null";
if (typeName == "EInventoryItemType::Power")
powers.Add(row.Key.Text);
else if (typeName == "EInventoryItemType::Item")
items.Add(row.Key.Text);
}
}
}
}
var itemsSerialized = new
{
Items = items.OrderBy(x => x).ToList(),
Powers = powers.OrderBy(x => x).ToList()
};
File.WriteAllText("items.json", JsonConvert.SerializeObject(itemsSerialized, Formatting.Indented));
/*
* addon dump
*/
searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/ItemAddonDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var itemAddons = new List<string>();
var powerAddons = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
Console.WriteLine($"getting item / power addons from {Path.GetFileName(path)}");
foreach (var row in dataTable.RowMap)
{
var typeProperty = row.Value.Properties.FirstOrDefault(p => p.Name.Text == "Type");
if (typeProperty?.Tag is EnumProperty enumProp)
{
string typeName = enumProp.Value.ToString() ?? "null";
if (typeName == "EInventoryItemType::ItemAddOn")
itemAddons.Add(row.Key.Text);
else if (typeName == "EInventoryItemType::PowerAddOn")
powerAddons.Add(row.Key.Text);
}
}
}
}
var addonsSerialized = new
{
Items = itemAddons.OrderBy(x => x).ToList(),
Powers = powerAddons.OrderBy(x => x).ToList()
};
File.WriteAllText("addons.json", JsonConvert.SerializeObject(addonsSerialized, Formatting.Indented));
/*
* offerings
*/
searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/OfferingDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var offerings = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
Console.WriteLine($"getting offerings from {Path.GetFileName(path)}");
foreach (var row in dataTable.RowMap)
offerings.Add(row.Key.Text);
}
}
File.WriteAllText("offerings.json", JsonConvert.SerializeObject(offerings, Formatting.Indented));
/*
* perks
*/
searchPaths = dataPak.Files.Keys.Where(x => x.Contains($"/PerkDB.uasset", StringComparison.OrdinalIgnoreCase)).ToList();
var perks = new List<string>();
foreach (var path in searchPaths)
{
var cleanPath = path.Contains('.') ? path.Substring(0, path.LastIndexOf('.')) : path;
if (provider.TryLoadPackageObject<UDataTable>(cleanPath, out var dataTable))
{
Console.WriteLine($"getting perks from {Path.GetFileName(path)}");
foreach (var row in dataTable.RowMap)
perks.Add(row.Key.Text);
}
}
File.WriteAllText("perks.json", JsonConvert.SerializeObject(perks, Formatting.Indented));
Console.WriteLine("\nAll dumper operations finished. Press any key to Close.");
Console.ReadKey();
}
} }
Console.WriteLine("Dumper start");
var dumper = new Dumper();
bool hasInitialized = await dumper.InitAsync();
if (!hasInitialized) return displayError("Dumper.InitAsync failed");
Console.WriteLine("Dumper initialized");
string? customizationItemsJSON = dumper.DumpCustomizationItems();
if (customizationItemsJSON != null)
{
File.WriteAllText("customizations.json", customizationItemsJSON);
}
else
{
Console.WriteLine("Failed to dump customizations");
}
string? itemsJSON = dumper.DumpItems();
if (itemsJSON != null)
{
File.WriteAllText("items.json", itemsJSON);
}
else
{
Console.WriteLine("Failed to dump items");
}
string? addonsJSON = dumper.DumpAddons();
if (addonsJSON != null)
{
File.WriteAllText("addons.json", addonsJSON);
}
else
{
Console.WriteLine("Failed to dump addons");
}
string? offeringsJSON = dumper.DumpOfferings();
if (offeringsJSON != null)
{
File.WriteAllText("offerings.json", offeringsJSON);
}
else
{
Console.WriteLine("Failed to dump offerings");
}
string? perksJSON = dumper.DumpPerks();
if (perksJSON != null)
{
File.WriteAllText("perks.json", perksJSON);
}
else
{
Console.WriteLine("Failed to dump perks");
}
Console.WriteLine("Dumper finished");
return 0;
+39
View File
@@ -0,0 +1,39 @@
using CUE4Parse.UE4.Assets.Objects;
using System.Reflection;
public static class StructMapper
{
public static T MapToStruct<T>(this FStructFallback fallback) where T : struct
{
object result = new T();
var fields = typeof(T).GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
foreach (var field in fields)
{
try
{
var method = typeof(CUE4Parse.UE4.Assets.Exports.AbstractPropertyHolder)
.GetMethods()
.FirstOrDefault(m => m.Name == "GetOrDefault" && m.GetGenericArguments().Length == 1);
if (method != null)
{
var genericMethod = method.MakeGenericMethod(field.FieldType);
var value = genericMethod.Invoke(fallback, new object[] { field.Name, null!, StringComparison.Ordinal });
if (value != null)
{
field.SetValue(result, value);
}
}
}
catch (Exception ex)
{
Console.WriteLine($"Mapping failed for {field.Name}: {ex.Message}");
}
}
return (T)result;
}
}
+129
View File
@@ -0,0 +1,129 @@
#include "cachecleaner.h"
#include <nerutils/log.h>
#include <filesystem>
#include <unordered_set>
#include <windows.h>
#include <shlobj.h>
#include <tlhelp32.h>
CacheCleaner::CacheCleaner() : _running(false), _monitorThread(nullptr) {}
CacheCleaner::~CacheCleaner()
{
shutdown();
}
void CacheCleaner::init()
{
std::string localAppData = getLocalAppDataPath();
if (localAppData == "") return Log::error("Failed to get LocalAppData?");
_cacheDir = localAppData + "\\DeadByDaylight\\Saved\\PersistentDownloadDir";
// this is pointless but just in case
std::filesystem::create_directories(_cacheDir);
clearFolder(_cacheDir);
_running = true;
//_monitorThread = std::make_unique<std::thread>(&CacheCleaner::monitorLoop, this);
}
void CacheCleaner::shutdown()
{
if (!_running) return;
_running = false;
if (_monitorThread && _monitorThread->joinable()) _monitorThread->join();
}
std::string CacheCleaner::getLocalAppDataPath()
{
char buffer[MAX_PATH];
if (SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, buffer) == S_OK)
{
return std::string(buffer);
}
return "";
}
void CacheCleaner::clearFolder(std::string& path)
{
try
{
for (const auto& entry : std::filesystem::directory_iterator(path))
{
std::filesystem::remove_all(entry.path());
}
}
catch (...)
{
}
}
void CacheCleaner::monitorLoop()
{
HANDLE changeHandle = FindFirstChangeNotificationA(_cacheDir.c_str(), TRUE,
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME |
FILE_NOTIFY_CHANGE_LAST_WRITE);
if (changeHandle == INVALID_HANDLE_VALUE)
{
Log::error("Failed to create change notification");
_running = false;
return;
}
Log::verbose("Cache cleaner monitoring started");
std::unordered_set<DWORD> previousPids;
while (_running)
{
// Wait 2 seconds between checks
for (int i = 0; i < 20 && _running; i++)
Sleep(100);
if (!_running) break;
// Take snapshot and check for new processes in one pass
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapshot == INVALID_HANDLE_VALUE) continue;
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(PROCESSENTRY32);
std::unordered_set<DWORD> currentPids;
if (Process32First(hSnapshot, &pe32))
{
do
{
DWORD pid = pe32.th32ProcessID;
currentPids.insert(pid);
if (previousPids.find(pid) == previousPids.end())
{
std::string processName(pe32.szExeFile);
for (char& c : processName)
c = static_cast<char>(tolower(c));
if (processName.find("deadbydaylight") != std::string::npos)
{
Log::verbose("New DeadByDaylight process detected (PID: {}), clearing cache", pid);
clearFolder(_cacheDir);
}
}
} while (Process32Next(hSnapshot, &pe32));
}
CloseHandle(hSnapshot);
previousPids = std::move(currentPids);
}
FindCloseChangeNotification(changeHandle);
}
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <string>
#include <atomic>
#include <thread>
class CacheCleaner
{
public:
CacheCleaner();
~CacheCleaner();
void init();
void shutdown();
private:
std::string getLocalAppDataPath();
void clearFolder(std::string& path);
void monitorLoop();
std::atomic<bool> _running;
std::unique_ptr<std::thread> _monitorThread;
std::string _cacheDir;
};
-218
View File
@@ -1,218 +0,0 @@
#include "cert_manager.h"
#include <nerutils/log.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/ssl.h>
#include <cstdlib>
#include <ctime>
#include <processthreadsapi.h>
std::string randomizeString(size_t length)
{
const char charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
std::string result;
result.resize(length);
for (size_t i = 0; i < length; ++i)
result[i] = charset[rand() % (sizeof(charset) - 1)];
return result;
}
CertManager::CertManager() : _sessionPkey(nullptr) {}
CertManager::~CertManager()
{
if (_caPkey) EVP_PKEY_free(_caPkey);
if (_caCert) X509_free(_caCert);
if (_sessionPkey) EVP_PKEY_free(_sessionPkey);
for (auto& pair : _hostContexts)
SSL_CTX_free(pair.second);
}
bool CertManager::Init()
{
EVP_PKEY_CTX* pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr);
if (pctx)
{
EVP_PKEY_keygen_init(pctx);
EVP_PKEY_CTX_set_rsa_keygen_bits(pctx, 2048);
EVP_PKEY_keygen(pctx, &_sessionPkey);
EVP_PKEY_CTX_free(pctx);
}
if (LoadCA())
{
Log::verbose("Loaded existing CA certificate.");
return true;
}
Log::verbose("No CA found. Generating new CA certificate.");
return GenerateCA();
}
bool CertManager::LoadCA()
{
BIO* keyBio = BIO_new_file("ca_key.pem", "r");
if (!keyBio) return false;
_caPkey = PEM_read_bio_PrivateKey(keyBio, nullptr, nullptr, nullptr);
BIO_free(keyBio);
if (!_caPkey) return false;
BIO* certBio = BIO_new_file("ca_cert.pem", "r");
if (!certBio) return false;
_caCert = PEM_read_bio_X509(certBio, nullptr, nullptr, nullptr);
BIO_free(certBio);
if (!_caCert) return false;
return true;
}
bool CertManager::GenerateCA()
{
srand(static_cast<unsigned int>(time(nullptr)));
EVP_PKEY_CTX* pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr);
if (!pctx) return false;
EVP_PKEY_keygen_init(pctx);
EVP_PKEY_CTX_set_rsa_keygen_bits(pctx, 2048);
EVP_PKEY_keygen(pctx, &_caPkey);
EVP_PKEY_CTX_free(pctx);
_caCert = X509_new();
X509_set_version(_caCert, 2);
ASN1_INTEGER_set(X509_get_serialNumber(_caCert), 1);
X509_gmtime_adj(X509_get_notBefore(_caCert), 0);
X509_gmtime_adj(X509_get_notAfter(_caCert), 31536000L); // 1 year
std::string org = randomizeString(16);
std::string cn = randomizeString(16);
X509_NAME* name = X509_get_subject_name(_caCert);
X509_NAME_add_entry_by_txt(name, "C", MBSTRING_ASC, (unsigned char*)"US", -1, -1, 0);
X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, (unsigned char*)org.c_str(), -1, -1, 0);
X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char*)cn.c_str(), -1, -1, 0);
X509_set_issuer_name(_caCert, name);
X509_set_pubkey(_caCert, _caPkey);
X509V3_CTX ctxV3;
X509V3_set_ctx_nodb(&ctxV3);
X509V3_set_ctx(&ctxV3, _caCert, _caCert, nullptr, nullptr, 0);
X509_EXTENSION* extCA = X509V3_EXT_conf_nid(nullptr, &ctxV3, NID_basic_constraints, "critical,CA:TRUE");
if (extCA)
{
X509_add_ext(_caCert, extCA, -1);
X509_EXTENSION_free(extCA);
}
X509_sign(_caCert, _caPkey, EVP_sha256());
BIO* keyBioOut = BIO_new_file("ca_key.pem", "w");
if (keyBioOut)
{
PEM_write_bio_PrivateKey(keyBioOut, _caPkey, nullptr, nullptr, 0, nullptr, nullptr);
BIO_free(keyBioOut);
}
BIO* certBioOut = BIO_new_file("ca_cert.pem", "w");
if (certBioOut)
{
PEM_write_bio_X509(certBioOut, _caCert);
BIO_free(certBioOut);
}
Log::info("Generated new CA key and certificate files. Installing to Windows Root CA store automatically...");
STARTUPINFOA si = {sizeof(si)};
PROCESS_INFORMATION pi;
char cmd[] = "certutil.exe -user -addstore root ca_cert.pem";
if (CreateProcessA(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
return true;
}
SSL_CTX* CertManager::CreateHostContext(const std::string& host)
{
std::lock_guard<std::mutex> lock(_mutex);
auto it = _hostContexts.find(host);
if (it != _hostContexts.end())
{
return it->second;
}
EVP_PKEY* pkey = _sessionPkey;
if (!pkey) return nullptr;
X509* cert = X509_new();
X509_set_version(cert, 2);
ASN1_INTEGER_set(X509_get_serialNumber(cert), static_cast<long>(std::hash<std::string>{}(host) & 0x7FFFFFFF));
X509_gmtime_adj(X509_get_notBefore(cert), 0);
X509_gmtime_adj(X509_get_notAfter(cert), 31536000L);
std::string dynamicOrg = randomizeString(16);
X509_NAME* name = X509_get_subject_name(cert);
X509_NAME_add_entry_by_txt(name, "C", MBSTRING_ASC, (unsigned char*)"US", -1, -1, 0);
X509_NAME_add_entry_by_txt(name, "O", MBSTRING_ASC, (unsigned char*)dynamicOrg.c_str(), -1, -1, 0);
X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char*)(host.c_str()), -1, -1, 0);
X509_set_issuer_name(cert, X509_get_subject_name(_caCert));
X509_set_pubkey(cert, pkey);
X509V3_CTX ctxV3;
X509V3_set_ctx_nodb(&ctxV3);
X509V3_set_ctx(&ctxV3, _caCert, cert, nullptr, nullptr, 0);
std::string san = "DNS:" + host;
X509_EXTENSION* extSAN = X509V3_EXT_conf_nid(nullptr, &ctxV3, NID_subject_alt_name, san.c_str());
if (extSAN)
{
X509_add_ext(cert, extSAN, -1);
X509_EXTENSION_free(extSAN);
}
X509_sign(cert, _caPkey, EVP_sha256());
SSL_CTX* ctx = SSL_CTX_new(TLS_server_method());
SSL_CTX_set_alpn_select_cb(
ctx,
[](SSL* ssl, const unsigned char** out, unsigned char* outlen, const unsigned char* in, unsigned int inlen,
void* arg) -> int {
for (unsigned int i = 0; i < inlen;)
{
unsigned int len = in[i];
if (len == 8 && memcmp(&in[i + 1], "http/1.1", 8) == 0)
{
*out = &in[i + 1];
*outlen = (unsigned char)len;
return SSL_TLSEXT_ERR_OK;
}
i += len + 1;
}
return SSL_TLSEXT_ERR_NOACK;
},
nullptr);
SSL_CTX_use_certificate(ctx, cert);
SSL_CTX_use_PrivateKey(ctx, pkey);
X509_free(cert);
_hostContexts[host] = ctx;
return ctx;
}
-27
View File
@@ -1,27 +0,0 @@
#pragma once
#include <string>
#include <unordered_map>
#include <mutex>
#include <openssl/ssl.h>
class CertManager
{
public:
CertManager();
~CertManager();
bool Init();
SSL_CTX* CreateHostContext(const std::string& host);
private:
bool GenerateCA();
bool LoadCA();
EVP_PKEY* _caPkey = nullptr;
X509* _caCert = nullptr;
EVP_PKEY* _sessionPkey = nullptr;
std::mutex _mutex;
std::unordered_map<std::string, SSL_CTX*> _hostContexts;
};
+474
View File
@@ -0,0 +1,474 @@
#include "dbdcrypt.h"
#include <nerutils/log.h>
#include <algorithm>
#include <cstring>
#include <zlib.h>
#include <openssl/types.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
std::string DBDCrypt::decrypt(const std::string& data, const std::string& accessKey, PayloadType* outType)
{
if (outType) *outType = NONE;
if (data.starts_with("DbdDAQEB"))
{
if (outType && *outType == NONE) *outType = TYPE_1;
return decType1(data, accessKey, outType);
}
if (data.starts_with("DbdDAgAC"))
{
if (outType && *outType == NONE) *outType = TYPE_2;
return decType2(data, accessKey, outType);
}
if (data.starts_with("DbdDAwAC"))
{
if (outType && *outType == NONE) *outType = TYPE_3;
return decType3(data, accessKey, outType);
}
Log::warning("Attempted to decrypt non encrypted string");
return data;
}
std::string DBDCrypt::encrypt(const std::string& data, const std::string& accessKey, PayloadType type,
std::string keyId)
{
if (type == TYPE_1)
{
auto compressed = zLibCompress(data); // Type 1 is UTF-8
if (compressed.empty()) return "";
uint32_t rawSize = (uint32_t)data.size();
std::vector<uint8_t> fullPayload(4);
std::memcpy(fullPayload.data(), &rawSize, 4);
fullPayload.insert(fullPayload.end(), compressed.begin(), compressed.end());
return "DbdDAQEB" + b64Enc(fullPayload);
}
if (type == TYPE_2)
{
auto transformedKey = transformCDNKey(CDN_KEY_BASE64);
std::string utf16Data = utf8ToUtf16(data);
for (char& c : utf16Data)
c = (char)((unsigned char)c - 1);
std::vector<uint8_t> padded(utf16Data.begin(), utf16Data.end());
int padLen = 16 - (padded.size() % 16);
if (padLen < 16) padded.insert(padded.end(), padLen, 0);
auto encryptedBody = aesECBEncrypt(padded, transformedKey);
if (encryptedBody.empty()) return "";
std::vector<uint8_t> fullPayload(encryptedBody.begin(), encryptedBody.end());
return "DbdDAgAC" + b64Enc(fullPayload);
}
if (type == TYPE_3)
{
auto decodedKey = b64Dec(accessKey);
if (decodedKey.empty()) return "";
std::string utf16Data = utf8ToUtf16(data);
for (char& c : utf16Data)
c = (char)((unsigned char)c - 1);
std::vector<uint8_t> padded(utf16Data.begin(), utf16Data.end());
int padLen = 16 - (padded.size() % 16);
if (padLen < 16) padded.insert(padded.end(), padLen, 0);
auto encryptedBody = aesECBEncrypt(padded, decodedKey);
if (encryptedBody.empty()) return "";
std::string shiftedId = shiftKeyID(keyId, -1);
std::vector<uint8_t> fullData(shiftedId.begin(), shiftedId.end());
fullData.push_back(0); // Null terminator
fullData.insert(fullData.end(), (uint8_t*)encryptedBody.data(),
(uint8_t*)encryptedBody.data() + encryptedBody.size());
return "DbdDAwAC" + b64Enc(fullData);
}
return std::string();
}
std::string DBDCrypt::decType1(const std::string& data, const std::string& key, PayloadType* outType)
{
if (data.length() < 8) return data;
auto decoded = b64Dec(data.substr(8));
if (decoded.size() < 4)
{
Log::error("Type 1 base64 too short ({})", decoded.size());
return "";
}
std::vector<uint8_t> body(decoded.begin() + 4, decoded.end());
std::string decompressed = zlibDecompress(body);
if (decompressed.length() >= 2 && decompressed[1] == '\0') decompressed = utf16ToUtf8(decompressed);
if (decompressed.starts_with("DbdD")) return decrypt(decompressed, key, outType);
return decompressed;
}
std::string DBDCrypt::decType2(const std::string& data, const std::string& key, PayloadType* outType)
{
if (data.length() < 8) return data;
auto decoded = b64Dec(data.substr(8));
if (decoded.empty()) return "";
std::vector<uint8_t> body = decoded;
auto transformedKey = transformCDNKey(CDN_KEY_BASE64);
std::string decrypted = aesECBDecrypt(body, transformedKey);
if (decrypted.empty()) return "";
for (char& c : decrypted)
c = (char)((unsigned char)c + 1);
if (decrypted.length() >= 2 && decrypted[1] == '\0') decrypted = utf16ToUtf8(decrypted);
decrypted.erase(std::remove(decrypted.begin(), decrypted.end(), (char)0x01), decrypted.end());
decrypted.erase(std::remove(decrypted.begin(), decrypted.end(), (char)0x00), decrypted.end());
for (size_t offset : {0ULL, 4ULL})
{
if (offset + 1 < decrypted.size() && (unsigned char)decrypted[offset] == 0x78)
{
std::vector<uint8_t> zlibPart((uint8_t*)decrypted.data() + offset,
(uint8_t*)decrypted.data() + decrypted.size());
std::string decompressed = zlibDecompress(zlibPart);
if (!decompressed.empty()) return decompressed;
}
}
if (decrypted.starts_with("DbdD")) return decrypt(decrypted, key, outType);
return decrypted;
}
std::string DBDCrypt::decType3(const std::string& data, const std::string& key, PayloadType* outType)
{
if (data.length() < 8) return data;
auto rawKey = b64Dec(key);
auto decoded = b64Dec(data.substr(8));
if (decoded.empty()) return "";
auto it = std::find(decoded.begin(), decoded.end(), 0);
if (it == decoded.end()) return "";
std::vector<uint8_t> body(it + 1, decoded.end());
std::string decrypted = aesECBDecrypt(body, rawKey);
if (decrypted.empty())
{
Log::error("AES decryption failed (body size: {})", body.size());
return "";
}
for (char& c : decrypted)
c = (char)((unsigned char)c + 1);
if (decrypted.length() >= 2 && decrypted.at(1) == '\0') decrypted = utf16ToUtf8(decrypted);
decrypted.erase(std::remove(decrypted.begin(), decrypted.end(), (char)0x01), decrypted.end());
decrypted.erase(std::remove(decrypted.begin(), decrypted.end(), (char)0x00), decrypted.end());
for (size_t offset : {0ULL, 4ULL})
{
if (offset + 1 < decrypted.size() && (unsigned char)decrypted[offset] == 0x78)
{
//Log::verbose("nested zlib at offset {}", offset);
std::vector<uint8_t> zlibPart((uint8_t*)decrypted.data() + offset,
(uint8_t*)decrypted.data() + decrypted.size());
std::string decompressed = zlibDecompress(zlibPart);
if (!decompressed.empty())
{
//Log::verbose("nested zlib decompressed, size: {}", decompressed.length());
return decompressed;
}
}
}
if (decrypted.starts_with("DbdD")) return decrypt(decrypted, key, outType);
return decrypted;
}
std::string DBDCrypt::aesECBDecrypt(const std::vector<uint8_t>& cipherText, const std::vector<uint8_t>& key)
{
if (key.size() < 32) return "";
EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
EVP_DecryptInit_ex(ctx, EVP_aes_256_ecb(), NULL, key.data(), NULL);
EVP_CIPHER_CTX_set_padding(ctx, 0);
std::string plaintext;
plaintext.resize(cipherText.size());
int len = 0;
if (EVP_DecryptUpdate(ctx, (unsigned char*)plaintext.data(), &len, cipherText.data(), (int)cipherText.size()) != 1)
{
EVP_CIPHER_CTX_free(ctx);
return "";
}
int outLen = len;
int finalLen = 0;
if (EVP_DecryptFinal_ex(ctx, (unsigned char*)plaintext.data() + len, &finalLen) != 1)
{
// ignore?
}
outLen += finalLen;
EVP_CIPHER_CTX_free(ctx);
plaintext.resize(outLen);
return plaintext;
}
std::string DBDCrypt::aesECBEncrypt(const std::vector<uint8_t>& plainText, const std::vector<uint8_t>& key)
{
if (key.size() < 32) return "";
EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();
EVP_EncryptInit_ex(ctx, EVP_aes_256_ecb(), NULL, key.data(), NULL);
EVP_CIPHER_CTX_set_padding(ctx, 0);
std::string ciphertext;
ciphertext.resize(plainText.size() + 16);
int len = 0;
if (EVP_EncryptUpdate(ctx, (unsigned char*)ciphertext.data(), &len, plainText.data(), (int)plainText.size()) != 1)
{
EVP_CIPHER_CTX_free(ctx);
return "";
}
int outLen = len;
int finalLen = 0;
if (EVP_EncryptFinal_ex(ctx, (unsigned char*)ciphertext.data() + outLen, &finalLen) == 1)
{
outLen += finalLen;
}
EVP_CIPHER_CTX_free(ctx);
ciphertext.resize(outLen);
return ciphertext;
}
std::vector<uint8_t> DBDCrypt::b64Dec(const std::string& input)
{
std::string in = input;
std::replace(in.begin(), in.end(), '-', '+');
std::replace(in.begin(), in.end(), '_', '/');
BIO *bio, *b64;
int decodeLen = (int)in.length();
std::vector<uint8_t> buffer(decodeLen);
bio = BIO_new_mem_buf(in.data(), decodeLen);
b64 = BIO_new(BIO_f_base64());
bio = BIO_push(b64, bio);
BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
int len = BIO_read(bio, buffer.data(), decodeLen);
BIO_free_all(bio);
if (len < 0) return {};
buffer.resize(len);
return buffer;
}
std::string DBDCrypt::b64Enc(const std::vector<uint8_t>& input)
{
if (input.empty()) return "";
BIO *bio, *b64;
BUF_MEM* bufferPtr;
b64 = BIO_new(BIO_f_base64());
bio = BIO_new(BIO_s_mem());
bio = BIO_push(b64, bio);
BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
BIO_write(bio, input.data(), (int)input.size());
BIO_flush(bio);
BIO_get_mem_ptr(bio, &bufferPtr);
std::string result(bufferPtr->data, bufferPtr->length);
BIO_free_all(bio);
return result;
}
std::string DBDCrypt::zlibDecompress(const std::vector<uint8_t>& compressed)
{
if (compressed.empty()) return "";
z_stream strm;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
strm.avail_in = (uInt)compressed.size();
strm.next_in = (Bytef*)compressed.data();
if (inflateInit(&strm) != Z_OK) return "";
std::string result;
char buffer[32768];
do
{
strm.avail_out = sizeof(buffer);
strm.next_out = (Bytef*)buffer;
int ret = inflate(&strm, Z_NO_FLUSH);
if (ret != Z_OK && ret != Z_STREAM_END)
{
inflateEnd(&strm);
return "";
}
result.append(buffer, sizeof(buffer) - strm.avail_out);
} while (strm.avail_out == 0);
inflateEnd(&strm);
return result;
}
std::vector<uint8_t> DBDCrypt::zLibCompress(const std::string& data)
{
if (data.empty()) return {};
z_stream strm;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
strm.opaque = Z_NULL;
if (deflateInit(&strm, Z_DEFAULT_COMPRESSION) != Z_OK) return {};
strm.avail_in = (uInt)data.size();
strm.next_in = (Bytef*)data.data();
std::vector<uint8_t> result;
uint8_t buffer[32768];
do
{
strm.avail_out = sizeof(buffer);
strm.next_out = (Bytef*)buffer;
deflate(&strm, Z_FINISH);
result.insert(result.end(), buffer, buffer + (sizeof(buffer) - strm.avail_out));
} while (strm.avail_out == 0);
deflateEnd(&strm);
return result;
}
std::vector<uint8_t> DBDCrypt::transformCDNKey(const std::string& b64CDNKey)
{
auto encryptedKey = b64Dec(b64CDNKey);
std::vector<uint8_t> uuidKey(32, 0);
std::memcpy(uuidKey.data(), CDN_UUID, std::min((size_t)32, strlen(CDN_UUID)));
std::string decrypted = aesECBDecrypt(encryptedKey, uuidKey);
std::vector<uint8_t> finalKey(decrypted.begin(), decrypted.end());
if (finalKey.size() > 32)
finalKey.resize(32);
else if (finalKey.size() < 32)
finalKey.resize(32, 0);
return finalKey;
}
std::string DBDCrypt::shiftKeyID(const std::string& id, int shift)
{
std::string res = id;
for (char& c : res)
c = (char)((unsigned char)c + shift);
return res;
}
std::string DBDCrypt::utf16ToUtf8(const std::string& utf16)
{
if (utf16.empty()) return "";
std::string utf8;
for (size_t i = 0; i < utf16.length(); i += 2)
{
uint16_t cp = *(uint16_t*)(utf16.data() + i);
if (cp == 0) break;
if (cp < 0x80)
utf8 += (char)cp;
else if (cp < 0x800)
{
utf8 += (char)(0xC0 | (cp >> 6));
utf8 += (char)(0x80 | (cp & 0x3F));
}
else
{
utf8 += (char)(0xE0 | (cp >> 12));
utf8 += (char)(0x80 | ((cp >> 6) & 0x3F));
utf8 += (char)(0x80 | (cp & 0x3F));
}
}
return utf8;
}
std::string DBDCrypt::utf8ToUtf16(const std::string& utf8)
{
if (utf8.empty()) return "";
std::string utf16;
for (size_t i = 0; i < utf8.length();)
{
uint32_t cp = 0;
unsigned char c = utf8[i];
if (c < 0x80)
{
cp = c;
i += 1;
}
else if (c < 0xE0)
{
cp = ((c & 0x1F) << 6) | (utf8[i + 1] & 0x3F);
i += 2;
}
else if (c < 0xF0)
{
cp = ((c & 0x0F) << 12) | ((utf8[i + 1] & 0x3F) << 6) | (utf8[i + 2] & 0x3F);
i += 3;
}
else
{
cp = ((c & 0x07) << 18) | ((utf8[i + 1] & 0x3F) << 12) | ((utf8[i + 2] & 0x3F) << 6) | (utf8[i + 3] & 0x3F);
i += 4;
}
if (cp < 0x10000)
{
utf16.push_back((char)(cp & 0xFF));
utf16.push_back((char)(cp >> 8));
}
else
{
cp -= 0x10000;
uint16_t high = (uint16_t)(0xD800 | (cp >> 10));
uint16_t low = (uint16_t)(0xDC00 | (cp & 0x3FF));
utf16.push_back((char)(high & 0xFF));
utf16.push_back((char)(high >> 8));
utf16.push_back((char)(low & 0xFF));
utf16.push_back((char)(low >> 8));
}
}
return utf16;
}
+52
View File
@@ -0,0 +1,52 @@
#pragma once
#include <string>
#include <vector>
#include <cstdint>
// 9.5.2_live
#define ACCESS_KEY "BGz7nwlRX8QP__fzvqrgpNRVqrlEyuY54vuGVAqDO_g="
#define KEY_ID "9.5.2_live"
/*
hardcoded variables (they have been the same since like 2017)
*/
#define CDN_KEY_BASE64 "lEQWeCt51ET+MIuxdTs7Ig/gzVZP2vdkVZA1BDfz+L0="
#define CDN_UUID "6EF35759-454D-4EBC-8041-9A94CB99FD5D"
class DBDCrypt
{
public:
enum PayloadType
{
NONE = 0,
TYPE_1, // compressed
TYPE_2, // CDN
TYPE_3 // dyn / accesskey
};
static std::string decrypt(const std::string& data, const std::string& accessKey,
PayloadType* outType = nullptr);
static std::string encrypt(const std::string& data, const std::string& accessKey, PayloadType type,
std::string keyId);
private:
static std::string decType1(const std::string& data, const std::string& key, PayloadType* outType);
static std::string decType2(const std::string& data, const std::string& key, PayloadType* outType);
static std::string decType3(const std::string& data, const std::string& key, PayloadType* outType);
static std::string aesECBDecrypt(const std::vector<uint8_t>& cipherText, const std::vector<uint8_t>& key);
static std::string aesECBEncrypt(const std::vector<uint8_t>& plainText, const std::vector<uint8_t>& key);
static std::vector<uint8_t> b64Dec(const std::string& input);
static std::string b64Enc(const std::vector<uint8_t>& input);
static std::string zlibDecompress(const std::vector<uint8_t>& compressed);
static std::vector<uint8_t> zLibCompress(const std::string& data);
static std::vector<uint8_t> transformCDNKey(const std::string& b64CDNKey);
static std::string shiftKeyID(const std::string& id, int shift);
static std::string utf16ToUtf8(const std::string& utf16);
static std::string utf8ToUtf16(const std::string& utf8);
};
+52 -373
View File
@@ -1,58 +1,50 @@
#include "proxy.h" #include "proxy.h"
#include "spoofing.h"
#include "cachecleaner.h"
#include <nerutils/log.h> #include <nerutils/log.h>
#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 <ctime>
#include <regex>
#include <unordered_set>
#include <simdjson.h>
std::string getExeDir() bool setProxyAddress(bool enable, const std::string& proxyAddr)
{
char buffer[MAX_PATH];
GetModuleFileNameA(NULL, buffer, MAX_PATH);
std::string path(buffer);
size_t pos = path.find_last_of("\\/");
if (pos != std::string::npos) return path.substr(0, pos + 1);
return "";
}
bool setProxy(bool enable, const std::string& proxyAddr)
{ {
INTERNET_PER_CONN_OPTION_LIST list; INTERNET_PER_CONN_OPTION_LIST list;
INTERNET_PER_CONN_OPTION options[3]; INTERNET_PER_CONN_OPTION options[3];
unsigned long listSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
ZeroMemory(&list, sizeof(list));
ZeroMemory(options, sizeof(options));
options[0].dwOption = INTERNET_PER_CONN_FLAGS; options[0].dwOption = INTERNET_PER_CONN_FLAGS;
if (enable) if (enable)
{
if (proxyAddr.empty()) return false;
options[0].Value.dwValue = PROXY_TYPE_PROXY | PROXY_TYPE_DIRECT; options[0].Value.dwValue = PROXY_TYPE_PROXY | PROXY_TYPE_DIRECT;
options[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER;
options[1].Value.pszValue = const_cast<char*>(proxyAddr.c_str());
options[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;
options[2].Value.pszValue = (char*)"<local>";
list.dwOptionCount = 3;
}
else else
{
options[0].Value.dwValue = PROXY_TYPE_DIRECT; options[0].Value.dwValue = PROXY_TYPE_DIRECT;
list.dwOptionCount = 1;
options[1].dwOption = INTERNET_PER_CONN_PROXY_SERVER; }
options[1].Value.pszValue = const_cast<char*>(proxyAddr.c_str());
options[2].dwOption = INTERNET_PER_CONN_PROXY_BYPASS;
options[2].Value.pszValue = const_cast<char*>("<local>");
list.dwSize = sizeof(INTERNET_PER_CONN_OPTION_LIST); list.dwSize = sizeof(INTERNET_PER_CONN_OPTION_LIST);
list.pszConnection = NULL; list.pszConnection = NULL;
list.dwOptionCount = 3;
list.dwOptionError = 0;
list.pOptions = options; list.pOptions = options;
if (!InternetSetOptionA(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, listSize)) if (!InternetSetOption(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION, &list, sizeof(list)))
{ {
Log::error("Failed to set proxy options, Err: {}", GetLastError()); Log::error("Failed to set proxy options - error: {}", GetLastError());
return false; return false;
} }
@@ -62,8 +54,9 @@ bool setProxy(bool enable, const std::string& proxyAddr)
return true; return true;
} }
Proxy* g_proxy = nullptr;
bool running = true; bool running = true;
Proxy* proxy = nullptr;
CacheCleaner* cleaner = nullptr;
void cleanup() void cleanup()
{ {
@@ -73,14 +66,20 @@ void cleanup()
if (cleaned) return; if (cleaned) return;
cleaned = true; cleaned = true;
if (g_proxy) Log::info("Restoring system proxy settings");
setProxyAddress(false, "");
if (proxy)
{ {
Log::info("Shutting down proxy"); Log::info("Shutting down proxy");
g_proxy->Shutdown(); proxy->shutdown();
} }
Log::info("Restoring system proxy settings"); if (cleaner)
setProxy(false, ""); {
Log::info("Shutting down cache cleaner");
cleaner->shutdown();
}
} }
BOOL WINAPI consoleHandler(DWORD dwType) BOOL WINAPI consoleHandler(DWORD dwType)
@@ -91,367 +90,47 @@ BOOL WINAPI consoleHandler(DWORD dwType)
running = false; running = false;
cleanup(); cleanup();
exit(0); exit(0);
return TRUE;
} }
return FALSE; return FALSE;
} }
std::mutex g_dataMutex;
std::vector<std::string> g_allObjectIds;
std::vector<std::string> g_allCharacterIds;
std::vector<std::string> g_stackableItems;
std::vector<std::string> g_uniqueItems;
std::vector<std::string> g_perks;
void loadDictDump(const std::string& path, std::vector<std::string>& outStackable, std::vector<std::string>& outUnique)
{
simdjson::dom::parser parser;
simdjson::dom::element doc;
auto error = parser.load(path).get(doc);
if (error)
{
Log::warning("Failed to open or parse dict dump {}: {}", path, simdjson::error_message(error));
return;
}
simdjson::dom::array itemsArr;
if (doc.at_key("Items").get(itemsArr) == simdjson::SUCCESS)
{
for (auto item : itemsArr)
{
std::string_view id;
if (item.get(id) == simdjson::SUCCESS) outStackable.push_back(std::string(id));
}
}
simdjson::dom::array powersArr;
if (doc.at_key("Powers").get(powersArr) == simdjson::SUCCESS)
{
for (auto item : powersArr)
{
std::string_view id;
if (item.get(id) == simdjson::SUCCESS) outUnique.push_back(std::string(id));
}
}
}
void loadArrayDump(const std::string& path, std::vector<std::string>& outList)
{
simdjson::dom::parser parser;
simdjson::dom::element doc;
auto error = parser.load(path).get(doc);
if (error)
{
Log::warning("Failed to open or parse array dump {}: {}", path, simdjson::error_message(error));
return;
}
simdjson::dom::array arr;
if (doc.get(arr) == simdjson::SUCCESS)
{
for (auto item : arr)
{
std::string_view id;
if (item.get(id) == simdjson::SUCCESS) outList.push_back(std::string(id));
}
}
}
void loadAllCustomItems()
{
std::lock_guard<std::mutex> lock(g_dataMutex);
g_stackableItems.clear();
g_uniqueItems.clear();
g_perks.clear();
loadDictDump(getExeDir() + "addons.json", g_stackableItems, g_stackableItems);
loadDictDump(getExeDir() + "items.json", g_stackableItems, g_uniqueItems);
loadArrayDump(getExeDir() + "offerings.json", g_stackableItems);
loadArrayDump(getExeDir() + "perks.json", g_perks);
Log::info("Loaded {} stackable, {} unique (powers), and {} perk items from dumps", g_stackableItems.size(),
g_uniqueItems.size(), g_perks.size());
}
void parseCatalog(const std::string& data)
{
try
{
simdjson::ondemand::parser parser;
simdjson::padded_string json(data);
auto doc = parser.iterate(json);
std::vector<std::string> newObjectIds;
std::vector<std::string> newCharacterIds;
auto items_data = doc["data"];
for (auto item : items_data["character"]["items"])
{
std::string_view id;
if (item.get_string().get(id) == simdjson::SUCCESS)
{
newCharacterIds.push_back(std::string(id));
newObjectIds.push_back(std::string(id));
}
}
for (auto item : items_data["shrine"]["items"])
{
std::string_view id;
if (item.get_string().get(id) == simdjson::SUCCESS)
{
newObjectIds.push_back(std::string(id));
}
}
for (auto item : items_data["item"]["items"])
{
std::string_view id;
if (item.get_string().get(id) == simdjson::SUCCESS)
{
if (id.find("cell") == std::string_view::npos && id.find("Pack") == std::string_view::npos)
{
newObjectIds.push_back(std::string(id));
}
}
}
for (auto item : items_data["outfit"]["items"])
{
std::string_view id;
if (item.get_string().get(id) == simdjson::SUCCESS)
{
newObjectIds.push_back(std::string(id));
}
}
std::lock_guard<std::mutex> lock(g_dataMutex);
g_allObjectIds = std::move(newObjectIds);
g_allCharacterIds = std::move(newCharacterIds);
Log::info("Catalog parsed: {} items, {} characters", g_allObjectIds.size(), g_allCharacterIds.size());
}
catch (const std::exception& e)
{
Log::error("Failed to parse catalog: {}", e.what());
}
}
void updateCatalog(const std::string& data)
{
std::string path = getExeDir() + "catalog_dump.json";
std::ofstream file(path);
file << data;
file.close();
Log::info("Raw catalog saved to {}", path);
parseCatalog(data);
}
void loadCatalogOnStartup()
{
std::string path = getExeDir() + "catalog_dump.json";
std::ifstream file(path);
if (file.is_open())
{
Log::info("Found catalog_dump.json - re-parsing raw dump with current filters...");
std::string content((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
parseCatalog(content);
}
else
Log::warning("No catalog_dump.json found. Start the game and visit the store once to initialise the unlocker.");
}
int main() int main()
{ {
srand(static_cast<unsigned int>(time(NULL)));
Log::createConsole(); Log::createConsole();
SetConsoleCtrlHandler(consoleHandler, TRUE); SetConsoleCtrlHandler(consoleHandler, TRUE);
atexit(cleanup); atexit(cleanup);
Log::info("Init"); Log::info("Init");
loadCatalogOnStartup();
loadAllCustomItems();
/* /*
proxy setup proxy setup
*/ */
Log::info("Starting proxy"); Log::info("Starting proxy");
g_proxy = new Proxy(); proxy = new Proxy();
if (!g_proxy->Init()) if (!proxy->init())
{ {
Log::error("Proxy failed to start"); Log::error("Proxy failed to start");
return 1; return 1;
} }
setProxy(true, std::format("127.0.0.1:{}", PROXY_PORT)); proxy->addWhitelistDomain("bhvrdbd.com");
setProxyAddress(true, std::format("127.0.0.1:{}", PROXY_PORT));
/* /*
listeners Spoofer setup
*/ */
g_proxy->OnServerResponse.addListener([](const std::string& url, std::string& data) { Log::info("Spoofer init");
#ifdef _DEBUG Spoofer* spoofer = new Spoofer();
if (url.find("bhvrdbd.com") != std::string::npos) Log::verbose("BHVR api res: {}", url);
#endif
if (url.find("api/v1/extensions/store/getCatalogItems") != std::string::npos) spoofer->init(proxy);
updateCatalog(data);
else if (url.find("api/v1/dbd-inventories/all") != std::string::npos)
{
std::lock_guard<std::mutex> lock(g_dataMutex);
if (!g_allObjectIds.empty())
{
Log::info("Merging catalog and dumped items into real inventory response");
size_t closePos = data.rfind("]}"); /*
if (closePos != std::string::npos) cache cleaner setup
{ */
uint64_t now = time(nullptr); Log::info("Cache cleaner init");
std::string injected; cleaner = new CacheCleaner();
injected.reserve((g_allObjectIds.size() + g_stackableItems.size()) * 80); cleaner->init();
std::unordered_set<std::string> seenIds;
size_t pos = 0;
while ((pos = data.find("\"objectId\":\"", pos)) != std::string::npos)
{
pos += 12;
size_t end = data.find("\"", pos);
if (end != std::string::npos)
{
seenIds.insert(data.substr(pos, end - pos));
pos = end;
}
}
auto injectItem = [&](const std::string& id, int qty) {
if (id.empty() || seenIds.count(id)) return;
injected += std::format(",{{\"lastUpdateAt\":{},\"quantity\":{},\"objectId\":\"{}\"}}", now, qty, id);
seenIds.insert(id);
};
for (const auto& id : g_allObjectIds) injectItem(id, 1);
for (const auto& id : g_stackableItems) injectItem(id, 100);
for (const auto& id : g_uniqueItems) injectItem(id, 1);
for (const auto& id : g_perks) injectItem(id, 3);
if (!injected.empty()) data.insert(closePos, injected);
Log::info("Injected {} items into global inventory",
std::count(injected.begin(), injected.end(), '{'));
}
}
else
Log::warning("No catalog data available to inject into global inventory yet!");
}
else if (url.find("api/v1/dbd-character-data/") != std::string::npos)
{
std::vector<std::string> localStackable;
std::vector<std::string> localUnique;
std::vector<std::string> localPerks;
{
std::lock_guard<std::mutex> lock(g_dataMutex);
localStackable = g_stackableItems;
localUnique = g_uniqueItems;
localPerks = g_perks;
}
if (!localStackable.empty() || !localUnique.empty() || !localPerks.empty())
{
std::unordered_set<std::string> perkSet(localPerks.begin(), localPerks.end());
std::unordered_set<std::string> uniqueSet(localUnique.begin(), localUnique.end());
std::regex qtyRegex(R"("quantity"\s*:\s*\d+)");
const char* targetArrays[] = {"\"characterItems\":[", "\"inventory\":[", "\"bloodwebRewards\":[",
"\"prestigeRewards\":["};
bool isBloodweb = url.find("/bloodweb") != std::string::npos;
size_t arraysModified = 0;
for (const char* arrayKey : targetArrays)
{
size_t pos = 0;
while ((pos = data.find(arrayKey, pos)) != std::string::npos)
{
pos += strlen(arrayKey);
size_t endPos = data.find("]", pos);
if (endPos == std::string::npos) break;
std::string currentItems = data.substr(pos, endPos - pos);
std::unordered_set<std::string> seenIds;
std::unordered_set<std::string> stackableSet(localStackable.begin(), localStackable.end());
size_t itemPos = 0;
while ((itemPos = currentItems.find("\"itemId\":\"", itemPos)) != std::string::npos)
{
size_t idStart = itemPos + 10;
size_t idEnd = currentItems.find("\"", idStart);
if (idEnd == std::string::npos) break;
std::string id = currentItems.substr(idStart, idEnd - idStart);
seenIds.insert(id);
int qty = -1;
if (perkSet.count(id))
qty = 3;
else if (uniqueSet.count(id))
qty = 1;
else if (stackableSet.count(id))
qty = 100;
if (qty != -1)
{
size_t objStart = currentItems.rfind("{", itemPos);
size_t objEnd = currentItems.find("}", itemPos);
if (objStart != std::string::npos && objEnd != std::string::npos && objStart < objEnd)
{
std::string objStr = currentItems.substr(objStart, objEnd - objStart + 1);
if (std::regex_search(objStr, qtyRegex))
objStr =
std::regex_replace(objStr, qtyRegex, "\"quantity\":" + std::to_string(qty));
else
objStr.insert(objStr.length() - 1, ",\"quantity\":" + std::to_string(qty));
currentItems.replace(objStart, objEnd - objStart + 1, objStr);
itemPos = objStart + objStr.length();
}
else
itemPos = idEnd;
}
else
itemPos = idEnd;
}
auto injectIfMissing = [&](const std::vector<std::string>& list, int qty) {
for (const auto& id : list)
{
if (seenIds.find(id) == seenIds.end())
{
if (!currentItems.empty() && currentItems.back() != ',') currentItems += ",";
currentItems +=
"{\"itemId\":\"" + id + "\",\"quantity\":" + std::to_string(qty) + "}";
seenIds.insert(id);
}
}
};
if (!isBloodweb && (std::string_view(arrayKey) == "\"characterItems\":[" ||
std::string_view(arrayKey) == "\"inventory\":["))
{
injectIfMissing(localStackable, 100);
injectIfMissing(localUnique, 1);
injectIfMissing(localPerks, 3);
}
data.replace(pos, endPos - pos, currentItems);
pos += currentItems.length();
arraysModified++;
}
}
Log::info("Spoofed items in {} character data arrays across response", arraysModified);
}
else
Log::warning("No custom dumped items available to inject into character data!");
}
});
/* /*
pause pause
+692 -514
View File
File diff suppressed because it is too large Load Diff
+19 -5
View File
@@ -3,9 +3,13 @@
#include <thread> #include <thread>
#include <atomic> #include <atomic>
#include <string> #include <string>
#include <vector>
#include <queue>
#include <mutex>
#include <condition_variable>
#include <openssl/ssl.h> #include <openssl/ssl.h>
#include <openssl/err.h> #include <openssl/err.h>
#include "cert_manager.h" #include "ssl.h"
#include <nerutils/callback.h> #include <nerutils/callback.h>
/* /*
@@ -13,6 +17,7 @@
use random port, test availability use random port, test availability
*/ */
#define PROXY_PORT 58421 #define PROXY_PORT 58421
#define PROXY_THREAD_COUNT 256
typedef unsigned __int64 SOCKET; typedef unsigned __int64 SOCKET;
@@ -22,11 +27,13 @@ class Proxy
Proxy(); Proxy();
~Proxy(); ~Proxy();
bool Init(); bool init();
void Shutdown(); void shutdown();
CallbackEvent<const std::string&, std::string&> OnClientRequest; CallbackEvent<const std::string&, std::string&, std::string&> OnClientRequest;
CallbackEvent<const std::string&, std::string&> OnServerResponse; CallbackEvent<const std::string&, std::string&, std::string&> OnServerResponse;
void addWhitelistDomain(const std::string& domain);
private: private:
void loop(); void loop();
@@ -39,6 +46,13 @@ class Proxy
std::thread _workerThread; std::thread _workerThread;
std::atomic<bool> _running = false; std::atomic<bool> _running = false;
std::vector<std::thread> _poolThreads;
std::queue<SOCKET> _clientQueue;
std::mutex _queueMutex;
std::condition_variable _queueCond;
CertManager _certManager; CertManager _certManager;
SSL_CTX* _clientCtx = nullptr; SSL_CTX* _clientCtx = nullptr;
std::vector<std::string> _whitelistDomains;
}; };
+782
View File
@@ -0,0 +1,782 @@
#include "spoofing.h"
#include "utils.h"
#include <string>
#include <fstream>
#include <random>
#include <vector>
#include <regex>
#include <thread>
#include <time.h>
#include <nerutils/log.h>
#include <nlohmann/json.hpp>
#define PLACEHOLDER_ITEMID "Anniversary2025Offering"
using json = nlohmann::json;
static std::random_device rd;
static std::mt19937 gen(rd());
/*
utils
*/
std::unordered_set<std::string> slasherNames = {
"Chuckles", "Bob", "HillBilly", "Nurse", "Shape", "Witch", "Killer07", "Cannibal", "Bear",
"Nightmare", "Pig", "Clown", "Spirit", "Plague", "Ghostface", "Demogorgon", "Oni", "Gunslinger"};
bool isSlasher(std::string name)
{
if (slasherNames.contains(name) || (name.length() == 3 && name[0] == 'K')) return true;
return false;
}
/*
setup / init
*/
void Spoofer::init(Proxy* proxy)
{
registerListeners(proxy);
loadData();
loadConfig();
}
void Spoofer::registerListeners(Proxy* proxy)
{
Log::info("Registering Proxy event listeners for spoofer");
proxy->OnServerResponse.addListener([this](const std::string& url, std::string& body, std::string& respHeaders) {
this->serverResponseHandler(url, body, respHeaders);
});
proxy->OnClientRequest.addListener([this](const std::string& url, std::string& body, std::string& reqHeaders) {
this->clientRequestHandler(url, body, reqHeaders);
});
}
void Spoofer::loadData()
{
Log::info("Loading data");
/*
stackables
*/
static auto loadData = [this](const char* fileName, std::unordered_set<std::string>* camperSet,
std::unordered_set<std::string>* slasherSet,
std::unordered_set<std::string>* globalSet, const char* errorMsg) {
std::ifstream file(utils::getExePath() + fileName);
if (file.is_open())
{
std::stringstream buff;
buff << file.rdbuf();
if (!parseStackable(buff.str(), camperSet, slasherSet, globalSet))
return Log::error("Failed to parse {} - {}", fileName, errorMsg);
else
Log::verbose("Loaded {}", fileName);
}
else
Log::warning("Missing file: {} - {}", fileName, errorMsg);
};
loadData("items.json", &_camperItemIds, 0, 0, "Items wont be added");
loadData("offerings.json", &_camperOfferingIds, &_slasherOfferingIds, &_globalOfferingIds,
"Offerings won't be added");
loadData("addons.json", &_camperAddonIds, &_slasherAddonIds, 0, "Offerings won't be added");
loadData("perks.json", &_camperPerkIds, &_slasherPerkIds, 0, "Offerings won't be added");
/*
catalog items
*/
std::ifstream customizationsFile(utils::getExePath() + "customizations.json");
if (customizationsFile.is_open())
{
std::stringstream buff;
buff << customizationsFile.rdbuf();
if (!parseCustomizations(buff.str()))
Log::warning("Failed to parse customizations.json - Outfits and character items won't be added");
else
Log::verbose("Loaded customizations.json");
}
/*
characters
*/
std::ifstream characterFile(utils::getExePath() + "characters.json");
if (characterFile.is_open())
{
std::stringstream buff;
buff << characterFile.rdbuf();
json doc = json::parse(buff.str(), nullptr, false);
if (doc.is_discarded())
Log::error("Failed to parse characters.json");
else
{
for (const auto& character : doc)
{
if (character.is_string()) _characterList.insert(character.get<std::string>());
}
}
}
/*
dlcs
*/
std::ifstream dlcFile(utils::getExePath() + "dlcs.json");
if (dlcFile.is_open())
{
std::stringstream buff;
buff << dlcFile.rdbuf();
json doc = json::parse(buff.str(), nullptr, false);
if (doc.is_discarded())
Log::error("Failed to parse dlcs.json");
else
{
for (const auto& dlc : doc)
{
if (dlc.contains("grdk")) _dlcListGRDK.insert(dlc["grdk"].get<std::string>());
if (dlc.contains("egs")) _dlcListEGS.insert(dlc["egs"].get<std::string>());
}
}
}
Log::verbose("Finished loading data");
Log::verbose("Items - {} camper", _camperItemIds.size());
Log::verbose("Offerings - {} camper | {} slasher | {} global", _camperOfferingIds.size(),
_slasherOfferingIds.size(), _globalOfferingIds.size());
Log::verbose("Addons - {} camper | {} slasher ", _camperAddonIds.size(), _slasherAddonIds.size());
Log::verbose("Perks - {} camper | {} slasher ", _camperPerkIds.size(), _slasherPerkIds.size());
Log::verbose("Catalog - {} outfits | {} items", _catalogOutfitIds.size(), _catalogItemIds.size());
Log::verbose("Characters - {}", _characterList.size());
Log::verbose("DLCs - GRDK {} - EGS: {}", _dlcListGRDK.size(), _dlcListEGS.size());
}
void Spoofer::loadConfig()
{
std::string configPath = utils::getExePath() + "config.json";
std::ifstream configFile(configPath);
if (configFile.is_open())
{
try
{
json configJson = json::parse(configFile);
_config.spoofCharacterOwnership =
configJson.value("spoofCharacterOwnership", _config.spoofCharacterOwnership);
_config.spoofInventory = configJson.value("spoofInventory", _config.spoofInventory);
_config.spoofCustomization = configJson.value("spoofCustomization", _config.spoofCustomization);
_config.accessKey = configJson.value("accessKey", _config.accessKey);
_config.keyId = configJson.value("keyId", _config.keyId);
}
catch (...)
{
Log::error("Failed to parse config.json, using defaults");
}
}
else
{
Log::info("config.json not found, using default settings");
json defaultConfig = {{"spoofCharacterOwnership", _config.spoofCharacterOwnership},
{"spoofInventory", _config.spoofInventory},
{"spoofCustomization", _config.spoofCustomization},
{"accessKey", _config.accessKey},
{"keyId", _config.keyId}};
std::ofstream out(configPath);
out << defaultConfig.dump(4);
}
Log::info("Loaded config: Ownership={}, Inventory={}, Customization={}, AccessKey={}, keyId={}",
_config.spoofCharacterOwnership, _config.spoofInventory, _config.spoofCustomization, _config.accessKey,
_config.keyId);
}
/*
data parsing
*/
bool Spoofer::parseStackable(std::string data, std::unordered_set<std::string>* camperSet,
std::unordered_set<std::string>* slasherSet, std::unordered_set<std::string>* globalSet)
{
json doc = json::parse(data, nullptr, false);
if (doc.is_discarded())
{
Log::error("JSON parse error @ parseStackable");
return false;
}
auto populate = [&](const std::string& key, std::unordered_set<std::string>* targetSet) {
if (doc.contains(key) && doc[key].is_array())
for (const auto& item : doc[key])
{
if (item.is_string()) targetSet->insert(item.get<std::string>());
}
else
Log::warning("Missing stackables array ({})", key);
};
if (camperSet) populate("Campers", camperSet);
if (slasherSet) populate("Slashers", slasherSet);
if (globalSet) populate("All", globalSet);
return true;
}
bool Spoofer::parseCustomizations(std::string data)
{
json doc = json::parse(data, nullptr, false);
if (doc.is_discarded())
{
Log::error("JSON parse error @ parseCustomizations");
return false;
}
if (doc.contains("Items"))
{
for (const auto& item : doc["Items"])
{
if (item.is_string()) _catalogItemIds.insert(item.get<std::string>());
}
}
if (doc.contains("Outfits"))
{
for (const auto& outfit : doc["Outfits"])
{
if (outfit.is_string()) _catalogOutfitIds.insert(outfit.get<std::string>());
}
}
return true;
}
/*
misc functions
*/
std::string Spoofer::getRandomItem()
{
std::vector<const std::unordered_set<std::string>*> allSets = {
&_camperItemIds, &_camperOfferingIds, &_slasherOfferingIds, &_camperAddonIds,
&_slasherAddonIds, &_camperPerkIds, &_slasherPerkIds};
std::vector<const std::unordered_set<std::string>*> validSets;
for (auto* s : allSets)
if (!s->empty()) validSets.push_back(s);
if (validSets.empty()) return PLACEHOLDER_ITEMID;
std::uniform_int_distribution<> setDist(0, static_cast<int>(validSets.size()) - 1);
const auto& selectedSet = *validSets[setDist(gen)];
std::uniform_int_distribution<> itemDist(0, static_cast<int>(selectedSet.size()) - 1);
auto it = selectedSet.begin();
std::advance(it, itemDist(gen));
return *it;
}
int Spoofer::getRandomQuantity()
{
std::uniform_int_distribution<> dist(64, 97);
return dist(gen);
}
void Spoofer::generateBloodweb(nlohmann::json& js)
{
if (!js.is_object()) js = json::object();
std::vector<std::string> paths;
json ringDataArray = json::array();
ringDataArray.push_back({{"nodeData", {{{"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()));
std::string parentId = prevRingNodes[(std::min)(parentIndex, (int)prevRingNodes.size() - 1)];
paths.push_back(parentId + "_" + childId);
std::string item = getRandomItem();
if (item.empty()) item = "Spring2024Offering";
nodeDataArray.push_back({{"nodeId", childId}, {"state", "Collected"}, {"contentId", item}});
}
ringDataArray.push_back({{"nodeData", nodeDataArray}});
prevRingNodes = std::move(currentRingNodes);
}
js["paths"] = paths;
js["ringData"] = ringDataArray;
}
/*
data modification
*/
void Spoofer::modifyCharacterData(json& js)
{
if (!js.contains("characterName") || !js["characterName"].is_string())
{
Log::verbose("attempted to modify invalid char");
return;
}
std::string name = js["characterName"];
if (_config.spoofCharacterOwnership)
{
bool needsSpoofing = false;
if (js.value("isEntitled", false) == false)
{
_unownedCharacters.insert(name);
js["isEntitled"] = true;
js["purchaseInfo"] = {{"quantity", 1},
{"origin", "PlayerInventory"},
{"reason", "Item(s) added via Purchase"},
{"lastUpdateAt", std::time(nullptr)},
{"objectId", name}};
needsSpoofing = true;
}
else if (_unownedCharacters.contains(name))
needsSpoofing = true;
/*
modifications for unowned characters (spoof level and fake bloodweb)
*/
if (needsSpoofing)
{
if (js.contains("bloodWebLevel") && js["bloodWebLevel"].is_number() && js["bloodWebLevel"] <= 15)
if (!js.contains("prestigeLevel") || (js["prestigeLevel"].is_number() && js["prestigeLevel"] <= 0))
js["bloodWebLevel"] = 16;
if (js.contains("bloodWebData")) generateBloodweb(js["bloodWebData"]);
}
}
/*
item spoofing
*/
if (_config.spoofInventory)
{
bool slasher = isSlasher(js["characterName"]);
if (js.contains("characterItems") && js["characterItems"].is_array())
{
std::unordered_set<std::string> existingItemIds;
std::unordered_set<std::string> stackableIds;
stackableIds.insert(_camperItemIds.begin(), _camperItemIds.end());
stackableIds.insert(_camperOfferingIds.begin(), _camperOfferingIds.end());
stackableIds.insert(_globalOfferingIds.begin(), _globalOfferingIds.end());
stackableIds.insert(_camperAddonIds.begin(), _camperAddonIds.end());
stackableIds.insert(_slasherAddonIds.begin(), _slasherAddonIds.end());
stackableIds.insert(_slasherOfferingIds.begin(), _slasherOfferingIds.end());
for (auto& item : js["characterItems"])
{
/*
set existing items to rnd number
*/
if (item.contains("itemId") && item["itemId"].is_string())
{
std::string itemId = item["itemId"];
existingItemIds.insert(itemId);
if (stackableIds.contains(itemId)) item["quantity"] = getRandomQuantity();
}
}
auto appendItems = [&](const std::unordered_set<std::string>& idList, bool isPerk) {
for (const auto& itemId : idList)
if (existingItemIds.find(itemId) == existingItemIds.end())
js["characterItems"].push_back(
{{"itemId", itemId}, {"quantity", isPerk ? 3 : getRandomQuantity()}});
};
if (!slasher)
{
appendItems(_camperItemIds, false);
appendItems(_camperAddonIds, false);
appendItems(_camperOfferingIds, false);
appendItems(_camperPerkIds, true);
}
else
{
appendItems(_slasherAddonIds, false);
appendItems(_slasherOfferingIds, false);
appendItems(_slasherPerkIds, true);
}
appendItems(_globalOfferingIds, false);
}
}
#ifdef _DEBUG
Log::verbose("Spoofed data for character {}", name);
#endif
}
void Spoofer::onGetAllClient(std::string& body)
{
if (!_config.spoofCharacterOwnership) return;
json doc = json::parse(body, nullptr, false);
if (doc.is_discarded()) return Log::error("JSON parse error for dbd-inventories/all (client)");
if (doc.contains("ownedCharacters") && doc["ownedCharacters"].is_array())
{
auto& jsonList = doc["ownedCharacters"];
for (const std::string& charName : _characterList)
{
if (charName == "K25") continue;
if (std::find(jsonList.begin(), jsonList.end(), charName) == jsonList.end()) jsonList.push_back(charName);
}
body = doc.dump();
}
}
/*
endpoint handlers
*/
void Spoofer::onGetAll(std::string& body)
{
json doc = json::parse(body, nullptr, false);
if (doc.is_discarded()) return Log::error("JSON parse error for dbd-character-data/get-all");
if (!doc.contains("list") || !doc["list"].is_array())
return Log::error("Invalid json for dbd-character-data/get-all");
for (auto& charData : doc["list"])
modifyCharacterData(charData);
body = doc.dump();
}
void Spoofer::onInventoryAll(std::string& body)
{
json doc = json::parse(body, nullptr, false);
if (doc.is_discarded()) return Log::error("JSON parse error for dbd-inventories/all");
if (!doc.contains("inventoryItems") || !doc["inventoryItems"].is_array())
return Log::error("Invalid json for JSON parse error for dbd-inventories/all");
auto& itemsArr = doc["inventoryItems"];
std::unordered_set<std::string> existingIds;
int64_t now = std::time(nullptr);
/*
item updates
*/
struct Category
{
const std::unordered_set<std::string>& source;
int quantity;
};
std::vector<Category> categories;
if (_config.spoofInventory)
{
categories.push_back({_camperPerkIds, 3});
categories.push_back({_slasherPerkIds, 3});
categories.push_back({_camperOfferingIds, -1});
categories.push_back({_slasherOfferingIds, -1});
categories.push_back({_camperItemIds, -1});
categories.push_back({_camperAddonIds, -1});
categories.push_back({_slasherAddonIds, -1});
}
if (_config.spoofCustomization)
{
categories.push_back({_catalogOutfitIds, 1});
categories.push_back({_catalogItemIds, 1});
}
for (auto& item : itemsArr)
{
std::string id = item.value("objectId", "");
if (id.empty()) continue;
existingIds.insert(id);
for (const auto& cat : categories)
{
if (cat.source.contains(id))
{
item["quantity"] = (cat.quantity == -1) ? getRandomQuantity() : cat.quantity;
break;
}
}
}
/*
item inserts
*/
for (const auto& cat : categories)
{
for (const std::string& id : cat.source)
{
if (!existingIds.contains(id))
{
int qty = (cat.quantity == -1) ? getRandomQuantity() : cat.quantity;
itemsArr.push_back({{"objectId", id}, {"quantity", qty}, {"lastUpdateAt", now}});
existingIds.insert(id);
}
}
}
body = doc.dump();
Log::verbose("Inventory spoofed");
}
void Spoofer::onMessageList(std::string& body)
{
json doc = json::parse(body, nullptr, false);
if (doc.is_discarded()) return Log::error("JSON parse error for dbd-messages/listV2");
auto now = std::chrono::system_clock::now();
auto now_seconds = std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count();
auto now_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
json msg;
/*
msg base
*/
msg["allowedPlatforms"] = json::array({"egs", "grdk", "ps4", "ps5", "steam", "xbox", "xsx"});
msg["flag"] = "READ";
msg["gameSpecificData"] = {};
msg["read"] = false;
msg["tag"] = json::array({"inbox"});
msg["expireAt"] = now_seconds + (1337 * 24 * 60 * 60);
msg["received"] = now_milliseconds;
msg["recipientId"] = "system";
/*
msg content
*/
json bodyContent;
bodyContent["sections"] = json::array();
bodyContent["sections"].push_back(
{{"type", "text"},
{"text", "Japan is turning footsteps into electricity!<br><br>Using piezoelectric tiles, every step "
"you take generates a small amount of energy. Millions of steps together can power LED "
"lights and displays in busy places like Shibuya Station.<br><br>A brilliant way to create a "
"sustainable and smart city — turning movement into clean, renewable energy."}});
bodyContent["image"] = {
{"packagedPath", "/Game/UI/UMGAssets/Icons/ItemAddons/iconAddon_powerBulb.iconAddon_powerBulb"},
{"contentVersion", "ccc3f02b0a671fe19a0017d6a69293876a465fd9"},
{"uri", ""}};
bodyContent["sections"].push_back(
{{"type", "itemshowcase"},
{"rewards", json::array({{{"type", "inventory"}, {"id", "ADDON_flashlight_oddbulb"}, {"amount", 1}}})}});
msg["message"] = {};
msg["message"]["title"] = "Japan is turning footsteps into electricity";
msg["message"]["body"] = bodyContent.dump();
doc["messages"].push_back(msg);
body = doc.dump();
#ifdef _DEBUG
Log::verbose("Spoofed message list");
#endif
}
void Spoofer::onBloodwebClient(std::string& body)
{
json req = json::parse(body, nullptr, false);
if (req.is_discarded()) return Log::error("JSON parse error for bloodweb request handler");
if (req.contains("characterName")) this->_lastBloodWebChar = req["characterName"];
}
void Spoofer::onBloodweb(std::string& body, std::string& respHeaders)
{
json doc = json::parse(body, nullptr, false);
if (doc.is_discarded()) return Log::error("JSON parse error for bloodweb response");
/*
return fake bloodweb data
*/
if (_config.spoofCharacterOwnership)
{
if (body.find("NotAllowedException") != std::string::npos && body.find("not owned") != std::string::npos)
{
Log::info("Spoofing bloodweb error for unowned character");
json mock;
mock["bloodWebLevelChanged"] = false;
mock["updatedWallets"] = json::array();
mock["bloodWebLevel"] = 16;
mock["prestigeLevel"] = 0;
mock["bloodWebData"] = json::object();
mock["characterItems"] = json::array();
mock["characterName"] = this->_lastBloodWebChar;
mock["isEntitled"] = true;
mock["purchaseInfo"] = {{"quantity", 1},
{"origin", "PlayerInventory"},
{"reason", "Item(s) added via Purchase"},
{"lastUpdateAt", std::time(nullptr)},
{"objectId", this->_lastBloodWebChar}};
_unownedCharacters.insert(this->_lastBloodWebChar); // probably not needed but just in case
modifyCharacterData(mock);
std::regex statusRegex(R"(HTTP\/\d\.\d\s+403)");
respHeaders = std::regex_replace(respHeaders, statusRegex, "HTTP/1.1 200");
body = mock.dump();
#ifdef _DEBUG
Log::verbose("Spoofed bloodweb request for unowned character.");
#endif
return;
}
}
/*
bloodweb fixup for perks
(if all perks are unlocked, the game will interpret bloodwebs with perks as invalid so perks will be replaced with PLACEHOLDER_ITEMID)
*/
if (_config.spoofInventory)
{
if (doc.contains("bloodWebData") && doc["bloodWebData"].contains("ringData"))
{
for (auto& ring : doc["bloodWebData"]["ringData"])
{
if (!ring.contains("nodeData")) continue;
for (auto& node : ring["nodeData"])
{
if (!node.contains("contentId")) continue;
std::string contentId = node["contentId"];
if (_camperPerkIds.contains(contentId) || _slasherPerkIds.contains(contentId))
node["contentId"] = PLACEHOLDER_ITEMID;
}
}
}
}
/*
prevent bloodweb reqs from overriding inventory values
*/
modifyCharacterData(doc);
body = doc.dump();
#ifdef _DEBUG
Log::verbose("Spoofed bloodweb items for owned character");
#endif
}
void Spoofer::onUpdateEntitlements(const std::string& url, std::string& body)
{
if (!_config.spoofCharacterOwnership) return;
json js = json::parse(body, nullptr, false);
if (js.is_discarded()) return Log::error("JSON parse error for get-update-entitlements");
if (js.contains("entitlements"))
{
auto& jsonList = js["entitlements"];
std::unordered_set<std::string>* list = nullptr;
if (url.starts_with("https://grdk.live.bhvrdbd.com/"))
list = &_dlcListGRDK;
else if (url.starts_with("https://egs.live.bhvrdbd.com/"))
list = &_dlcListEGS;
else
return Log::error("Invalid url?");
if (list == nullptr) return;
for (const std::string& dlcId : *list)
{
if (std::find(jsonList.begin(), jsonList.end(), dlcId) == jsonList.end()) jsonList.push_back(dlcId);
}
}
body = js.dump();
}
void Spoofer::onUpdateEntitlementsClient(const std::string& url, std::string& body)
{
if (!_config.spoofCharacterOwnership) return;
json js = json::parse(body, nullptr, false);
if (js.is_discarded()) return Log::error("JSON parse error for get-update-entitlements");
if (js.contains("clientEntitlementIds"))
{
auto& jsonList = js["clientEntitlementIds"];
std::unordered_set<std::string>* list = nullptr;
if (url.starts_with("https://grdk.live.bhvrdbd.com/"))
list = &_dlcListGRDK;
else if (url.starts_with("https://egs.live.bhvrdbd.com/"))
list = &_dlcListEGS;
else
return Log::error("Invalid url?");
if (list == nullptr) return;
for (const std::string& dlcId : *list)
{
if (std::find(jsonList.begin(), jsonList.end(), dlcId) == jsonList.end()) jsonList.push_back(dlcId);
}
}
body = js.dump();
}
/*
event handlers
*/
void Spoofer::serverResponseHandler(const std::string& url, std::string& body, std::string& respHeaders)
{
if (url.find("bhvrdbd.com") == std::string::npos) return;
std::lock_guard<std::mutex> lock(_mtx);
#ifdef _DEBUG
Log::verbose("BHVR api res @ {}", url);
#endif
if (url.ends_with("api/v1/dbd-inventories/all")) return onInventoryAll(body);
if (url.find("api/v1/messages/listV2") != std::string::npos) return onMessageList(body);
if (url.ends_with("api/v1/dbd-character-data/get-all")) return onGetAll(body);
if (url.ends_with("api/v1/dbd-character-data/bloodweb") ||
url.ends_with("api/v1/dbd-character-data/bulk-spending-bloodweb"))
return onBloodweb(body, respHeaders);
if (url.ends_with("api/v1/owned-products/get-update-entitlements")) return onUpdateEntitlements(url, body);
}
void Spoofer::clientRequestHandler(const std::string& url, std::string& body, std::string& /*reqHeaders*/)
{
if (url.find("bhvrdbd.com") == std::string::npos) return;
std::lock_guard<std::mutex> lock(_mtx);
if (url.ends_with("api/v1/dbd-character-data/get-all")) return onGetAllClient(body);
if (url.ends_with("api/v1/dbd-character-data/bloodweb") ||
url.ends_with("api/v1/dbd-character-data/bulk-spending-bloodweb"))
return onBloodwebClient(body);
if (url.ends_with("api/v1/owned-products/get-update-entitlements")) return onUpdateEntitlementsClient(url, body);
}
+82
View File
@@ -0,0 +1,82 @@
#pragma once
#include "proxy.h"
#include <unordered_set>
#include <string>
#include <mutex>
#include <nlohmann/json_fwd.hpp>
#include "dbdcrypt.h"
struct SpooferConfig
{
bool spoofCharacterOwnership = true;
bool spoofInventory = true;
bool spoofCustomization = true;
std::string accessKey = ACCESS_KEY;
std::string keyId = KEY_ID;
};
class Spoofer
{
public:
void init(Proxy* proxy);
private:
void registerListeners(Proxy* proxy);
void loadData();
void loadConfig();
bool parseStackable(std::string data, std::unordered_set<std::string>* camperSet,
std::unordered_set<std::string>* slasherSet, std::unordered_set<std::string>* globalSet);
bool parseCustomizations(std::string data);
std::string getRandomItem();
int getRandomQuantity();
void generateBloodweb(nlohmann::json& data);
void modifyCharacterData(nlohmann::json& js);
void onGetAll(std::string& body);
void onInventoryAll(std::string& body);
void onMessageList(std::string& body);
void onBloodweb(std::string& body, std::string& respHeaders);
void onGameConfigs(std::string& body);
void onUpdateEntitlements(const std::string& url, std::string& body);
void onGetAllClient(std::string& body);
void onBloodwebClient(std::string& body);
void onUpdateEntitlementsClient(const std::string& url, std::string& body);
void serverResponseHandler(const std::string& url, std::string& body, std::string& respHeaders);
void clientRequestHandler(const std::string& url, std::string& body, std::string& reqHeaders);
SpooferConfig _config;
std::unordered_set<std::string> _camperItemIds;
std::unordered_set<std::string> _camperOfferingIds;
std::unordered_set<std::string> _slasherOfferingIds;
std::unordered_set<std::string> _globalOfferingIds;
std::unordered_set<std::string> _camperAddonIds;
std::unordered_set<std::string> _slasherAddonIds;
std::unordered_set<std::string> _camperPerkIds;
std::unordered_set<std::string> _slasherPerkIds;
std::unordered_set<std::string> _catalogOutfitIds;
std::unordered_set<std::string> _catalogItemIds;
std::unordered_set<std::string> _unownedCharacters;
std::unordered_set<std::string> _characterList;
std::unordered_set<std::string> _dlcListGRDK;
std::unordered_set<std::string> _dlcListEGS;
std::string _lastBloodWebChar = "";
std::mutex _mtx;
};
+232
View File
@@ -0,0 +1,232 @@
#include "ssl.h"
#include "utils.h"
#include <nerutils/log.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/bn.h>
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/ssl.h>
#include <random>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <wincrypt.h>
#include <processthreadsapi.h>
template <typename T, void (*f)(T*)> struct Deleter
{
void operator()(T* p) const { f(p); }
};
using EVP_PKEY_ptr = std::unique_ptr<EVP_PKEY, Deleter<EVP_PKEY, EVP_PKEY_free>>;
using X509_ptr = std::unique_ptr<X509, Deleter<X509, X509_free>>;
using SSL_CTX_ptr = std::unique_ptr<SSL_CTX, Deleter<SSL_CTX, SSL_CTX_free>>;
using BIO_ptr = std::unique_ptr<BIO, Deleter<BIO, BIO_vfree>>;
CertManager::CertManager() : _caPkey(nullptr), _caCert(nullptr), _sessionPkey(nullptr) {}
CertManager::~CertManager()
{
if (_caPkey) EVP_PKEY_free(_caPkey);
if (_caCert) X509_free(_caCert);
if (_sessionPkey) EVP_PKEY_free(_sessionPkey);
for (auto& pair : _hostContexts)
SSL_CTX_free(pair.second);
}
bool CertManager::init()
{
EVP_PKEY_CTX* pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr);
if (!pctx) return false;
EVP_PKEY_keygen_init(pctx);
EVP_PKEY_CTX_set_rsa_keygen_bits(pctx, 2048);
EVP_PKEY* rawPkey = nullptr;
if (EVP_PKEY_keygen(pctx, &rawPkey) <= 0)
{
Log::error("Failed to generate session key");
EVP_PKEY_CTX_free(pctx);
return false;
}
_sessionPkey = rawPkey;
EVP_PKEY_CTX_free(pctx);
if (loadCA())
{
Log::verbose("Loaded existing CA certificate");
return true;
}
Log::verbose("No CA found, generating");
return generateCA();
}
bool CertManager::loadCA()
{
std::string path = utils::getExePath();
BIO_ptr keyBio(BIO_new_file((path + "/key.pem").c_str(), "r"));
if (!keyBio) return false;
_caPkey = PEM_read_bio_PrivateKey(keyBio.get(), nullptr, nullptr, nullptr);
BIO_ptr certBio(BIO_new_file((path + "/cert.pem").c_str(), "r"));
if (!certBio) return false;
_caCert = PEM_read_bio_X509(certBio.get(), nullptr, nullptr, nullptr);
return (_caPkey && _caCert);
}
void CertManager::installCert(X509* cert)
{
if (!cert) return;
/*
X509 to DER
*/
int derLen = i2d_X509(cert, nullptr);
if (derLen < 0) return;
unsigned char* derBuf = new unsigned char[derLen];
unsigned char* p = derBuf;
i2d_X509(cert, &p);
PCCERT_CONTEXT certCtx = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, derBuf, derLen);
if (certCtx)
{
HCERTSTORE rootStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, L"Root");
if (rootStore)
{
BOOL success = CertAddCertificateContextToStore(rootStore, certCtx, CERT_STORE_ADD_REPLACE_EXISTING, NULL);
if (success)
Log::info("CA certificate installed");
else
Log::error("Failed to install CA certificate");
CertCloseStore(rootStore, 0);
}
CertFreeCertificateContext(certCtx);
}
delete[] derBuf;
}
bool CertManager::generateCA()
{
std::random_device rd;
std::mt19937 gen(rd());
/*
key
*/
EVP_PKEY_CTX* pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, nullptr);
EVP_PKEY_keygen_init(pctx);
EVP_PKEY_CTX_set_rsa_keygen_bits(pctx, 2048);
EVP_PKEY* rawCaKey = nullptr;
EVP_PKEY_keygen(pctx, &rawCaKey);
_caPkey = rawCaKey;
EVP_PKEY_CTX_free(pctx);
/*
cert
*/
X509_ptr cert(X509_new());
X509_set_version(cert.get(), 2);
ASN1_INTEGER_set(X509_get_serialNumber(cert.get()), 1);
X509_gmtime_adj(X509_get_notBefore(cert.get()), 0);
X509_gmtime_adj(X509_get_notAfter(cert.get()), 31536000L); // 1 year
X509_name_st* subjName = X509_get_subject_name(cert.get());
std::string randomCN = utils::randomizeString(16);
X509_NAME_add_entry_by_txt(subjName, "CN", MBSTRING_ASC, (unsigned char*)randomCN.c_str(), -1, -1, 0);
X509_set_issuer_name(cert.get(), subjName);
X509_set_pubkey(cert.get(), _caPkey);
/*
CA constraints
*/
X509V3_CTX v3ctx;
X509V3_set_ctx(&v3ctx, cert.get(), cert.get(), nullptr, nullptr, 0);
X509_EXTENSION* ext = X509V3_EXT_conf_nid(nullptr, &v3ctx, NID_basic_constraints, "critical,CA:TRUE");
X509_add_ext(cert.get(), ext, -1);
X509_EXTENSION_free(ext);
if (X509_sign(cert.get(), _caPkey, EVP_sha256()) <= 0) return false;
/*
out
*/
std::string path = utils::getExePath();
BIO_ptr kOut(BIO_new_file((path + "/key.pem").c_str(), "w"));
PEM_write_bio_PrivateKey(kOut.get(), _caPkey, nullptr, nullptr, 0, nullptr, nullptr);
BIO_ptr cOut(BIO_new_file((path + "/cert.pem").c_str(), "w"));
PEM_write_bio_X509(cOut.get(), cert.get());
/*
install and release
*/
installCert(cert.get());
_caCert = cert.release();
return true;
}
SSL_CTX* CertManager::createHostContext(const std::string& host)
{
std::lock_guard<std::mutex> lock(_mutex);
if (_hostContexts.count(host)) return _hostContexts[host];
/*
cert base
*/
X509_ptr cert(X509_new());
X509_set_version(cert.get(), 2);
ASN1_INTEGER_set(X509_get_serialNumber(cert.get()), static_cast<long>(std::hash<std::string>{}(host) & 0x7FFFFFFF));
X509_gmtime_adj(X509_get_notBefore(cert.get()), 0);
X509_gmtime_adj(X509_get_notAfter(cert.get()), 31536000L);
X509_name_st* subjName = X509_get_subject_name(cert.get());
X509_NAME_add_entry_by_txt(subjName, "CN", MBSTRING_ASC, (unsigned char*)host.c_str(), -1, -1, 0);
X509_set_issuer_name(cert.get(), X509_get_subject_name(_caCert));
X509_set_pubkey(cert.get(), _sessionPkey);
/*
SAN
*/
X509V3_CTX v3ctx;
X509V3_set_ctx(&v3ctx, _caCert, cert.get(), nullptr, nullptr, 0);
std::string altName = "DNS:" + host;
X509_EXTENSION* ext = X509V3_EXT_conf_nid(nullptr, &v3ctx, NID_subject_alt_name, altName.c_str());
X509_add_ext(cert.get(), ext, -1);
X509_EXTENSION_free(ext);
/*
sign & ctx load
*/
if (X509_sign(cert.get(), _caPkey, EVP_sha256()) <= 0) return nullptr;
SSL_CTX* ctx = SSL_CTX_new(TLS_server_method());
if (!ctx) return nullptr;
if (SSL_CTX_use_certificate(ctx, cert.get()) <= 0 || SSL_CTX_use_PrivateKey(ctx, _sessionPkey) <= 0)
{
SSL_CTX_free(ctx);
return nullptr;
}
_hostContexts[host] = ctx;
return ctx;
}
+39
View File
@@ -0,0 +1,39 @@
#pragma once
#include <string>
#include <unordered_map>
#include <mutex>
struct x509_st;
struct X509_name_st;
struct ssl_st;
struct ssl_ctx_st;
struct evp_pkey_st;
typedef struct x509_st X509;
typedef struct ssl_st SSL;
typedef struct ssl_ctx_st SSL_CTX;
typedef struct evp_pkey_st EVP_PKEY;
class CertManager
{
public:
CertManager();
~CertManager();
bool init();
SSL_CTX* createHostContext(const std::string& host);
private:
bool generateCA();
bool loadCA();
void installCert(X509* cert);
EVP_PKEY* _caPkey = nullptr;
X509* _caCert = nullptr;
EVP_PKEY* _sessionPkey = nullptr;
std::mutex _mutex;
std::unordered_map<std::string, SSL_CTX*> _hostContexts;
};
+24
View File
@@ -0,0 +1,24 @@
#include "utils.h"
#include <minwindef.h>
#include <libloaderapi.h>
std::string utils::getExePath()
{
char buffer[MAX_PATH];
GetModuleFileNameA(NULL, buffer, MAX_PATH);
std::string path(buffer);
size_t pos = path.find_last_of("\\/");
if (pos != std::string::npos) return path.substr(0, pos + 1);
return "";
}
std::string utils::randomizeString(size_t length)
{
const char charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
std::string result;
result.resize(length);
for (size_t i = 0; i < length; ++i)
result[i] = charset[rand() % (sizeof(charset) - 1)];
return result;
}
+9
View File
@@ -0,0 +1,9 @@
#pragma once
#include <string>
namespace utils
{
std::string getExePath();
std::string randomizeString(size_t length);
} // namespace utils
+7 -1
View File
@@ -1,2 +1,8 @@
add_subdirectory(nerutils) add_subdirectory(nerutils)
add_subdirectory(simdjson) add_subdirectory(json)
set(ZLIB_BUILD_TESTING OFF)
set(ZLIB_BUILD_STATIC ON)
set(ZLIB_BUILD_SHARED OFF)
set(ZLIB_INSTALL OFF)
add_subdirectory(zlib)
Vendored Submodule
+1
Submodule vendor/json added at eba0a92bfb
-1
Submodule vendor/simdjson deleted from 5395aacb8b
Vendored Submodule
+1
Submodule vendor/zlib added at f9dd6009be