jk2ffa.freeforums.org

JKII 1.02 FFA Community
It is currently Wed May 24, 2017 3:38 pm

All times are UTC + 1 hour [ DST ]


Welcome
Welcome to jk2ffa

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: cvarhack idea
PostPosted: Thu Jan 17, 2013 3:00 pm 
Offline

Joined: Sun Jan 13, 2013 6:48 pm
Posts: 2
An idea how a cvarhack works:
Code:
BOOL main(VOID) {
   BYTE bBuffer;
   CHAR szBuffer[7];
   DWORD dwProcessId;
   HANDLE hProcess;
   HWND hWindow;
   PSTR pText;

   bBuffer = 0x7D; //JGE
   if(hWindow = FindWindowA("jk2mp winconsole", 0)) {
      GetWindowThreadProcessId(hWindow, &dwProcessId);
      if(hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, dwProcessId)) {
         ReadProcessMemory(hProcess, 0x004EF697, &szBuffer, sizeof(szBuffer), 0);
         if(!lstrcmpA(szBuffer, "v1.02a")) {
            if(WriteProcessMemory(hProcess, 0x42ACA1, &bBuffer, sizeof(bBuffer), 0)) {
               pText = "cheat-protected cvars are no longer cheat-protected";
            } else {
               pText = "failed to de-cheat cheat-protected cvars";
            }
         } else {
            pText = "wrong jk2 version";
         }
         CloseHandle(hProcess);
      } else {
         pText = "failed to open jk2";
      }
   } else {
      pText = "could not find jk2";
   }
   MessageBoxA(0, pText, "cvarhack", 0);

   return EXIT_SUCCESS;
}


Report this post
Top
 Profile  
 
 
 Post subject: Re: cvarhack idea
PostPosted: Thu Jan 17, 2013 8:10 pm 
Offline
Site Admin
User avatar

Joined: Sat Sep 17, 2011 3:14 am
Posts: 1113
Image

_________________
Spoiler:
ImageImageImage
Like my Father Before Me, I am An Assassin. http://youtu.be/JbldtyLgkEA
ImageImageImage


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Donate Now
Donate Now


Hosted by © 2017 FreeForums.org | Create a free forum | Powered by phpBB
About FreeForums | Legal | Advertise Here | Investors | Contact FreeForums.org
Report Violation
suspicion-preferred