feat: add config
This commit is contained in:
@@ -14,6 +14,23 @@ namespace seallib
|
||||
class Logger;
|
||||
}
|
||||
|
||||
struct SpooferConfig
|
||||
{
|
||||
std::unordered_map<std::string, int> camperItems;
|
||||
std::unordered_map<std::string, int> camperAddons;
|
||||
std::unordered_map<std::string, int> slasherAddons;
|
||||
std::unordered_map<std::string, int> camperOfferings;
|
||||
std::unordered_map<std::string, int> slasherOfferings;
|
||||
std::unordered_map<std::string, int> globalOfferings;
|
||||
std::unordered_set<std::string> camperPerks;
|
||||
std::unordered_set<std::string> slasherPerks;
|
||||
std::unordered_set<std::string> catalogItemIds;
|
||||
std::unordered_set<std::string> dlcListGRDK;
|
||||
std::unordered_set<std::string> dlcListEGS;
|
||||
std::unordered_set<std::string> dlcListSteam;
|
||||
std::unordered_set<std::string> unlockedCharacters;
|
||||
};
|
||||
|
||||
class Spoofer
|
||||
{
|
||||
public:
|
||||
@@ -23,12 +40,43 @@ class Spoofer
|
||||
void registerListeners(TinyMITMProxy* proxy);
|
||||
|
||||
private:
|
||||
/*
|
||||
local config handlers
|
||||
*/
|
||||
void loadConfig();
|
||||
void saveConfig();
|
||||
/*
|
||||
proxy handlers
|
||||
*/
|
||||
void serverResponseHandler(const std::string& url, std::string& body, std::string& headers,
|
||||
bool& blockOutgoing);
|
||||
void clientRequestHandler(const std::string& url, std::string& body, std::string& headers, bool wasBlocked);
|
||||
|
||||
/*
|
||||
config
|
||||
*/
|
||||
bool _spoofItems = false;
|
||||
bool _spoofPerks = false;
|
||||
bool _spoofCatalog = false;
|
||||
bool _spoofDLCs = false;
|
||||
|
||||
std::unordered_map<std::string, int> _camperItems;
|
||||
std::unordered_map<std::string, int> _camperAddons;
|
||||
std::unordered_map<std::string, int> _slasherAddons;
|
||||
std::unordered_map<std::string, int> _camperOfferings;
|
||||
std::unordered_map<std::string, int> _slasherOfferings;
|
||||
std::unordered_map<std::string, int> _globalOfferings;
|
||||
|
||||
std::unordered_set<std::string> _camperPerks;
|
||||
std::unordered_set<std::string> _slasherPerks;
|
||||
|
||||
std::unordered_set<std::string> _catalogItemIds;
|
||||
|
||||
std::unordered_set<std::string> _dlcListGRDK;
|
||||
std::unordered_set<std::string> _dlcListEGS;
|
||||
std::unordered_set<std::string> _dlcListSteam;
|
||||
|
||||
std::unordered_set<std::string> _unlockedCharacters;
|
||||
seallib::Logger* _log = nullptr;
|
||||
std::mutex _mutex;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user