• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Newbie
      Learning to hack games!
       
      Hacking
       
      TheBigWiggie's Avatar
      Join Date
      Jun 2017
      Posts
      5
      Thanks (-->)
      0
      Thanks (<--)
      0

      Unhappy Issue when attempting to write to address C#

      How to Call Game Functions
      I am attempting "easy chams" and i am able to read the proper address however something is wrong with my attempt to write to it. Any help would be appreciated.

      These are my imports :
      Code:
       [DllImport("kernel32.dll", SetLastError = true)]
              private static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint dwSize, out IntPtr lpNumberOfBytesRead);
      
              [DllImport("kernel32.dll")]
              public static extern bool WriteProcessMemory(int hProcess, int lpBaseAddress, byte[] lpBuffer, uint nSize, out IntPtr lpNumberOfBytesWritten);

      This is my write method:
      Code:
      public void WriteByteArray(long address, byte[] value)
              {
                  
                  IntPtr bytesWritten;
                  try
                  {   
                      WriteProcessMemory((int)hProc, (int)address, value, (uint)value.Length, out bytesWritten);
                     
                  }
                  catch
                  {
                      MessageBox.Show("Failed");
                  }
              
              }
      And this is how its called. I can read the byte array from the address fine like i said for what ever reason i cannot seem to figure out what i'm doing wrong when trying to write to it.
      Code:
        Byte[] Red = { 255, 15, 15, 255 };
                              Engine.Wmem.WriteByteArray((Engine.enemy[i].BASE + 0x70), Red);
      
                              Byte[] GlowStuff = Engine.mem.ReadByteArray((Engine.enemy[i].BASE + 0x70),4);
      Donate  

    2. #2
      Global Moderator
      Certified Asshole
       
      CodenzHub
       
      Traxin's Avatar
      Join Date
      Aug 2015
      Posts
      679
      Thanks (-->)
      139
      Thanks (<--)
      209
      Well WPM returns a bool so it shouldn't ever throw an exception so you're probably never going to hit the failed msgbox. Just use an if statement.

    3. #3
      Newbie
      Learning to hack games!
       
      Hacking
       
      TheBigWiggie's Avatar
      Join Date
      Jun 2017
      Posts
      5
      Thanks (-->)
      0
      Thanks (<--)
      0
      I am now using an if statement and it is giving me the failed message box however I already knew it was failing because when I read the address after trying to write the byte array it showed the array had not changed. I'm clearly missing something.

    4. #4
      Global Moderator
      Certified Asshole
       
      CodenzHub
       
      Traxin's Avatar
      Join Date
      Aug 2015
      Posts
      679
      Thanks (-->)
      139
      Thanks (<--)
      209
      place a breakpoint on the wpm call and add GetLastError() to the watch list, then look up the code that gets set.

    5. #5
      Newbie
      Learning to hack games!
       
      Hacking
       
      TheBigWiggie's Avatar
      Join Date
      Jun 2017
      Posts
      5
      Thanks (-->)
      0
      Thanks (<--)
      0
      Advertise on GuidedHacking
      I figured it out Thanks!

    Similar Game Hacker Threads

    1. [Help] Attempting to detour a Kernel32 function
      By Paga in forum C/C++
      Replies: 2
      Last Post: 08-06-2017, 03:51 PM
    2. [Help] Issue with player name.
      By SubJectioN in forum CS:GO Hacks Help
      Replies: 8
      Last Post: 03-14-2017, 01:13 PM
    3. [Help] hi i seem to have a issue with a part of my code the issue is with do
      By tocogames in forum GH Tutorials Help
      Replies: 11
      Last Post: 06-02-2016, 03:43 AM
    4. Replies: 6
      Last Post: 05-23-2016, 08:33 AM
    5. [Help] DLL Compiling issue
      By maxibaby in forum C/C++
      Replies: 5
      Last Post: 10-25-2015, 12:19 PM

    Tags for this Thread