Compare commits
2 Commits
2c795a335f
...
v0.1.26
| Author | SHA1 | Date | |
|---|---|---|---|
| 623542046a | |||
| 90a6ab1ba8 |
@@ -1,9 +1,10 @@
|
||||
#include "spoofing.h"
|
||||
#include "spoofing.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <unordered_set>
|
||||
#include <random>
|
||||
#include <chrono>
|
||||
|
||||
#include <minwindef.h>
|
||||
|
||||
@@ -256,7 +257,8 @@ void Spoofer::modifyCharacterData(json& js)
|
||||
|
||||
int parentIndex = (i - 1) / (numNodes / static_cast<int>(prevRingNodes.size()));
|
||||
|
||||
if (parentIndex >= prevRingNodes.size()) parentIndex = static_cast<int>(prevRingNodes.size()) - 1;
|
||||
if (parentIndex >= static_cast<int>(prevRingNodes.size()))
|
||||
parentIndex = static_cast<int>(prevRingNodes.size()) - 1;
|
||||
|
||||
std::string parentId = prevRingNodes[parentIndex];
|
||||
paths.push_back(parentId + "_" + childId);
|
||||
@@ -334,6 +336,69 @@ void Spoofer::serverResponseHandler(const std::string& url, std::string& body, s
|
||||
|
||||
if (url.find("api/v1/extensions/store/getCatalogItems") != std::string::npos) return parseAndDumpCatalog(body);
|
||||
|
||||
if (url.find("/api/v1/messages/listV2") != std::string::npos)
|
||||
{
|
||||
try
|
||||
{
|
||||
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 doc = json::parse(body);
|
||||
if (!doc.contains("messages")) return;
|
||||
|
||||
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();
|
||||
|
||||
return;
|
||||
}
|
||||
catch (const json::parse_error& /*e*/)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (url.find("api/v1/dbd-inventories/all") != std::string::npos)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user