Created
April 9, 2020 22:48
-
-
Save ChaitanyaHaritash/45a9bef97f580930f8ab098a1dbec4e2 to your computer and use it in GitHub Desktop.
Simple Hack for DragonKombat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Windows.h" | |
#include <TlHelp32.h> | |
#include "psapi.h" | |
#include <iostream> | |
#pragma (lib , "psapi.lib") | |
/* | |
~ DragonKombat Game is developed by @OsandaMalith | |
~ Simple hack!=Hack is written by @bofheaded :P | |
~ Project : https://github.com/OsandaMalith/DragonKombat/releases | |
*/ | |
//Win32Api Parameters Definations | |
HANDLE openProc; | |
DWORD pid; | |
unsigned long n; | |
//Memory Addresses | |
DWORD score = 0x0058D480; | |
DWORD eggs = 0x0058D490; | |
//Dynamic Values | |
int _score = 5000; | |
int _eggs = 16; | |
//Change Score | |
int ChangeScore() { | |
if (!WriteProcessMemory(openProc, LPVOID(score), &_score, sizeof(_score), 0)) { | |
printf("\nFailed To Change Score : %d\n", GetLastError()); | |
} | |
printf("\nScore is set to :%d ", _score); | |
return 0; | |
} | |
//Change egg counts | |
int ChangeEggs() { | |
if (!WriteProcessMemory(openProc, LPVOID(eggs), &_eggs, sizeof(_eggs), 0)) { | |
printf("\nFailed To Change Eggs Counts : %d\n", GetLastError()); | |
} | |
printf("\nEggs is set to :%d ", _eggs); | |
return 0; | |
} | |
int main() { | |
HWND handle = FindWindow(0, L"DragonKombat"); | |
if (handle == NULL) { | |
printf("\n[-] Window is not Valid\n"); | |
ExitProcess(0); | |
} | |
printf("[+] Got Window!\n"); | |
GetWindowThreadProcessId(handle, &pid); | |
openProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); | |
ChangeScore(); | |
ChangeEggs(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment