| View previous topic :: View next topic |
| Author |
Message |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 4:23 am Post subject: [C++] How do i freeze an address? |
|
|
I tried to freeze the time at Vista´s Minesweeper.
But i think this is not the best way..
How would you do it?
| Code: | #include <cstdlib>
#include <iostream>
#include <windows.h>
using namespace std;
int main(int argc, char *argv[])
{
HWND hWnd;
DWORD processId;
HANDLE hGame;
bool off = 0;
int value = 0;
printf("Searching for minesweeper.exe...\n");
while(1)
{
Sleep(50);
if(hWnd = FindWindow(0, TEXT("Minesweeper")))
break;
}
system("cls");
printf("Minesweeper Time Freezer\n");
printf("Press F6");
GetWindowThreadProcessId(hWnd, &processId);
hGame = OpenProcess(PROCESS_ALL_ACCESS, false, processId);
while(1)
{
Sleep(50);
if(GetAsyncKeyState(VK_F6) & 1)
{
ReadProcessMemory(hGame, (LPVOID) 0x2011BC4, &value, sizeof(value), 0);
while(1)
{
value -= 1;
WriteProcessMemory(hGame, (LPVOID) 0x2011BC4, &value, sizeof(value), 0);
Sleep(1000);
}
}
}
return 0;
}
|
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Tue Mar 31, 2009 4:28 am Post subject: |
|
|
| More effective way: hook the function writing to the address. |
|
| Back to top |
|
 |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 5:00 am Post subject: |
|
|
XD
And how would you write that as a code? |
|
| Back to top |
|
 |
SliderMan Expert Cheater
Reputation: 0
Joined: 17 May 2006 Posts: 138
|
Posted: Tue Mar 31, 2009 5:57 am Post subject: |
|
|
there is no way of "freezing address" you need to constantly set it to the value of your choice with while(); _________________
[qoute]
Edit: Server Maintenance will be extended for infinite hours and will end at the end of time. Thank you and go fuck yourself.
[/qoute] |
|
| Back to top |
|
 |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 6:15 am Post subject: |
|
|
Like this?
| Code: | while(1)
{
Sleep(50);
if(GetAsyncKeyState(VK_F6) & 1)
{
ReadProcessMemory(hGame, (LPVOID) 0x2011BC4, &time, sizeof(time), 0);
value = time;
while(1)
{
WriteProcessMemory(hGame, (LPVOID) 0x2011BC4, &value, sizeof(value), 0);
}
}
} |
The value changes sometimes 1 up and again 1 down :( |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Mar 31, 2009 6:33 am Post subject: |
|
|
| what the hell.. what is with that & 1 ? reading a memory value, assigning it to a variable and re-writing that variable ?!?!?! learn the language before trying crap like that ^ |
|
| Back to top |
|
 |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 6:58 am Post subject: |
|
|
| Slugsnack wrote: | | what the hell.. what is with that & 1 ? reading a memory value, assigning it to a variable and re-writing that variable ?!?!?! learn the language before trying crap like that ^ |
omg shut up.
Why are you afraid to post your freezing code???
I bet you cant do it self. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Mar 31, 2009 8:02 am Post subject: |
|
|
| how about you post an EDIT MEMORY code and i'll tell you how to freeze.. |
|
| Back to top |
|
 |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 9:57 am Post subject: |
|
|
first post?
idiot.. |
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Tue Mar 31, 2009 10:19 am Post subject: |
|
|
| Silent Storm wrote: | XD :?:
And how would you write that as a code? | There are so many ways. First experiment with CE, then move to coding your own hook proggy. That way the value won't go anywhere unless you unhook the function. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Mar 31, 2009 1:22 pm Post subject: |
|
|
Set a breakpoint on your address and find where it pops. Edit the instruction(s) as you see fit.
Just keep track of the bytes that actually make up the opcodes, as you can write those later for your changes. |
|
| Back to top |
|
 |
BanMe Master Cheater
Reputation: 0
Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
|
Posted: Tue Mar 31, 2009 1:31 pm Post subject: |
|
|
ok after looking into this i found a better solution for 64 bit users..
VirtualQuery address we want to watch ..add MEM_WRITE_WATCH to the area of memory want to watch..
use GetWriteWatch to pick up write to that memory area...
but for 32 bit it says GetWriteWatch isnt supported.. but after looking at olly and looking up both GetWriteWatch and ResetWriteWatch they seem to both be there..though they probably dont function correctly.. but msdn also says 32 bit users can use the MEM_WRITE_WATCH flag with VirtualAlloc after windows 2000 .. my question is if this functionality is working on XP 32 bit where is GetWriteWatch Getting its information from..(ie where is it stored) so that i can access it without GetWriteWatch.. :}
kind regards BanMe
information obtained from MSDN(microsoft delevoper network)..and my brain.. _________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you.
Last edited by BanMe on Tue Mar 31, 2009 5:03 pm; edited 1 time in total |
|
| Back to top |
|
 |
Silent Storm Advanced Cheater
Reputation: 0
Joined: 03 Jan 2008 Posts: 61 Location: registry
|
Posted: Tue Mar 31, 2009 4:53 pm Post subject: |
|
|
| Where did you get this information? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25859 Location: The netherlands
|
Posted: Tue Mar 31, 2009 5:04 pm Post subject: |
|
|
From what I understand getwritewatch just checks if the dirty flag of a page has been set. (Just like the accessed flag)
You could probably just implement this yourself by setting the page table's dirty bit to 0 and then check when it changes to 1 (using a driver)
Of course, I doubt this will bring any extra efficiency, and you won't get notified as soon as it happen, only when you request an update.
I'd say just writing, the value is better. _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|