Results 1 to 13 of 13
  1. #1
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed

    [help]How to change the value

    Ok, so how do i change the value of an address? Well, more clearly, when i am using WriteProcessMemory(), i don't know what to do. Like from cheat engine i got the address, and the value in hexadecimal form. Just show me how to input the info. Like here is some info: adress: 0x01564F9 value: 0x2165482

    How do i put those in the parmeters of WriteProcessMemory(), thanks in advance.

  2. #2
    lilneo's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Canada
    Posts
    217
    Reputation
    8
    Thanks
    28
    The address and the value are in hex format?

    Anyways, to use writeprocessmemory first thing you need to do is get the Window Handle for the target
    Code:
    HWND hwnd = FindWindow(NULL,"Name of Window");
    secondly you need the process id to find the process handle. For this we use
    Code:
    DWORD pid;
    GetWindowThreadProcessId(hwnd, &pid);
    Lastly we use the process id to find the process handle, we can pass that to WriteProcessMemory
    Code:
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS,false,pid);
    Now, hProc is our process handle so we can do:
    Code:
    WriteProcessMemory(hProc,(LPVOID)0x01564F9,(LPCVOID)<value you are writing>,sizeof(int),NULL);
    You will need to include windows.h now if you can't figure out how to put this into a proper hack you should be reading a book.
    ~lilneo

  3. The Following User Says Thank You to lilneo For This Useful Post:

    258456 (08-29-2010)

  4. #3
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    Lol lilneo thanks I already knew all that stuff but the writeprocess memory helped thanks a lot man.

    Just another question for the third parameter which is the value I want to write should it be a hex or normal number?
    Last edited by 258456; 08-29-2010 at 03:05 PM.

  5. #4
    r_arraz's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Your desktop h4x1n up your compooter
    Posts
    370
    Reputation
    16
    Thanks
    76
    My Mood
    Cool
    MSDN is your friend when your coding.
    [IMG]https://lh4.ggph*****m/_-aCmMp6G0AQ/S4-phW7LRvI/AAAAAAAAALc/3cpKkpjIgUM/s400/display.php.png[/IMG]




  6. The Following User Says Thank You to r_arraz For This Useful Post:

    258456 (08-30-2010)

  7. #5
    Kallisti Version 2.0's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    44
    Reputation
    9
    Thanks
    3
    My Mood
    Amused
    Quote Originally Posted by r_arraz View Post
    MSDN is your friend when your coding.
    This post contains massive amounts of help.

  8. The Following User Says Thank You to Kallisti Version 2.0 For This Useful Post:

    258456 (08-30-2010)

  9. #6
    Lonely Tedy Bear's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Location
    Utah,Salt Lake Posts: 5,371 ►►►►Lonely-Tedy◄◄◄◄
    Posts
    1,541
    Reputation
    -151
    Thanks
    321
    My Mood
    Lonely
    Quote Originally Posted by 258456 View Post
    Lol lilneo thanks I already knew all that stuff but the writeprocess memory helped thanks a lot man.

    Just another question for the third parameter which is the value I want to write should it be a hex or normal number?
    / why would you set hex as the value ? why not just use float,byte or 4byte /
             

  10. The Following User Says Thank You to Lonely Tedy Bear For This Useful Post:

    258456 (08-30-2010)

  11. #7
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    You can write it in anything you want. It's just a number/data.

  12. The Following User Says Thank You to Void For This Useful Post:

    258456 (08-30-2010)

  13. #8
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    nvrmind thanks for your help guys

  14. #9
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    here is my code, it won't write the memory and idk wat's wrong.

    Code:
    #include <iostream>
    #include <Windows.h>
    int main()
    {
    	HWND game = FindWindow(NULL, TEXT("Catapult Madness | Armor Games - Windows Internet Explorer"));
    	DWORD pid;
    	
    	GetWindowThreadProcessId(game, &pid);
    	
    	HANDLE hproc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
    	std::cout<<pid<<std::endl;
    	
    	if(WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) 0, sizeof(4), NULL)){
    		MessageBox(NULL, TEXT("Memory Copied."), TEXT("Hack"), NULL);
    	}
    	if(!WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) 0, sizeof(4), NULL)){
    		MessageBox(NULL, TEXT("Failure"), TEXT("Hack"), NULL);
    	}
    	
    	std::cin.get();
    	return 0;
    }

  15. #10
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    Code:
    #include <iostream>
    #include <Windows.h>
    int main()
    {
    	HWND game = FindWindow(NULL, TEXT("Catapult Madness | Armor Games - Windows Internet Explorer"));
    	DWORD pid;
    	
    	GetWindowThreadProcessId(game, &pid);
    	
    	HANDLE hproc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
    	std::cout<<pid<<std::endl;
    
            int Zero = 0;
    	
    	if(WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) &Zero, sizeof(int), NULL)){
    		MessageBox(NULL, TEXT("Memory Copied."), TEXT("Hack"), NULL);
    	}
    	if(!WriteProcessMemory(hproc, (LPVOID) 0x0EBF071C, (LPCVOID) &Zero, sizeof(int), NULL)){
    		MessageBox(NULL, TEXT("Failure"), TEXT("Hack"), NULL);
    	}
    	
    	std::cin.get();
    	return 0;
    }

  16. #11
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    thanks i will see if it works and get back to you

    EDIT: __________________________________________________ ___--
    ok, so i tried that code and it didn't work, it's basically like my code, idk y it's not writing to the address. Has anybody had a problem like this? I am running Win7
    Last edited by 258456; 08-30-2010 at 11:59 AM.

  17. #12
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    OpenProcess error in Windows XP?

    [php]
    HANDLE hProc = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE,0,ProcessId);
    [/php]

  18. The Following 2 Users Say Thank You to Void For This Useful Post:

    258456 (09-25-2010),Hell_Demon (08-31-2010)

  19. #13
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    void, thanks so much it worked!!!

Similar Threads

  1. How to Change the Start-Bar in Windows XP
    By Jackal in forum General
    Replies: 31
    Last Post: 05-31-2015, 08:29 PM
  2. How to change the cham colors??
    By DontBanMe in forum Combat Arms Hacks & Cheats
    Replies: 41
    Last Post: 09-02-2008, 11:04 PM
  3. [TuT] How to change the BGM to whatever you want!
    By jerry0 in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 08-13-2008, 12:26 AM
  4. How To Change The Color On Command Prompt
    By mostwanted in forum Programming Tutorials
    Replies: 2
    Last Post: 07-21-2008, 06:43 AM
  5. Help? how to bypass the updater ?
    By abdullah305 in forum WarRock - International Hacks
    Replies: 10
    Last Post: 12-12-2007, 03:16 PM