Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBarii committed Jul 31, 2024
1 parent 7115a55 commit d8acf37
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
9 changes: 7 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ DWORD WINAPI init(HMODULE real)
std::cerr << "Invalid or missing 'lastbeat' for player: " << player.key() << std::endl;
continue;
}
ModuleManager::onlineUsers.push_back(Utils::removeNonAlphanumeric(player.key()));

std::string name2 = Utils::removeNonAlphanumeric(player.key());
name2 = replaceAll(name2, "", "");
ModuleManager::onlineUsers.push_back(name2);
} catch (const std::exception& e) {
std::cerr << "Error processing player: " << player.key() << " - " << e.what() << std::endl;
continue;
Expand All @@ -92,6 +95,8 @@ DWORD WINAPI init(HMODULE real)
if(SDK::clientInstance->getLocalPlayer() != nullptr)
if (module->isEnabled()) {
name = Utils::removeNonAlphanumeric(Utils::removeColorCodes(NickListener::original));
name = replaceAll(name, "", "");

}
// send thing
std::cout << DownloadString(std::format("https://api.flarial.synthetix.host/heartbeat/{}/{}",Utils::removeColorCodes(name),ipToSend)) << std::endl;
Expand Down Expand Up @@ -157,7 +162,7 @@ BOOL APIENTRY DllMain(HMODULE instance, DWORD ul_reason_for_call, LPVOID lpReser
}

std::string DownloadString(std::string URL) {
HINTERNET interwebs = InternetOpenA("Samsung Smart Fridge", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);
HINTERNET interwebs = InternetOpenA("holyshitplsdonthurtme", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);
HINTERNET urlFile;
std::string rtn;
if (interwebs) {
Expand Down
22 changes: 11 additions & 11 deletions src/Client/Hook/Hooks/Render/SwapchainHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ HRESULT SwapchainHook::swapchainCallback(IDXGISwapChain3 *pSwapChain, UINT syncI
std::chrono::duration<float> elapsed = std::chrono::high_resolution_clock::now() - start;
MC::frames += 1;

if (Client::settings.getSettingByName<bool>("killdx")->value) {
ID3D12Device5 *d3d12device3;

if (SUCCEEDED(pSwapChain->GetDevice(IID_PPV_ARGS(&d3d12device3)))) {
Logger::debug("[SwapChain] Removed d3d12 device");
pSwapChain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
d3d12device3->RemoveDevice();

return funcOriginal(pSwapChain, syncInterval, flags);
}
}

if (elapsed.count() >= 0.5f) {
// Calculate frame rate based on elapsed time
Expand All @@ -118,17 +129,6 @@ HRESULT SwapchainHook::swapchainCallback(IDXGISwapChain3 *pSwapChain, UINT syncI
FlarialGUI::frameFactor = std::min(FlarialGUI::frameFactor, 1.0f);

if (!SwapchainHook::init) {
if (Client::settings.getSettingByName<bool>("killdx")->value) {
ID3D12Device5 *d3d12device3;

if (SUCCEEDED(pSwapChain->GetDevice(IID_PPV_ARGS(&d3d12device3)))) {
Logger::debug("[SwapChain] Removed d3d12 device");
pSwapChain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
d3d12device3->RemoveDevice();

return funcOriginal(pSwapChain, syncInterval, flags);
}
}

if(SwapchainHook::queue == nullptr) {

Expand Down
3 changes: 1 addition & 2 deletions src/Utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ std::string Utils::removeColorCodes(const std::string &input) {
std::string Utils::removeNonAlphanumeric(const std::string &input) {
std::string result;
std::copy_if(input.begin(), input.end(), std::back_inserter(result), [](char c) {
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_' || c == ' ' ||
c == '-' || c == NULL || c == '';
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_' || c == ' ';
});
return result;
}
Expand Down

0 comments on commit d8acf37

Please sign in to comment.