Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C# Memory hackin'

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ghosting
Advanced Cheater
Reputation: 0

Joined: 05 Feb 2016
Posts: 54
Location: 127.0.0.1

PostPosted: Sat Oct 29, 2016 12:54 am    Post subject: C# Memory hackin' Reply with quote

How would I get be able to read from a static pointer, pastebin .com/raw/ZZxVmsPx , is my code (I'm pretty new just playing around with things)
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Oct 29, 2016 6:59 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=422516
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Ghosting
Advanced Cheater
Reputation: 0

Joined: 05 Feb 2016
Posts: 54
Location: 127.0.0.1

PostPosted: Sat Oct 29, 2016 7:08 am    Post subject: Reply with quote

ParkourPenguin wrote:
http://forum.cheatengine.org/viewtopic.php?t=422516


I get the concept, I think the flaw is somewhere in my program which I cannot find.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Oct 29, 2016 7:14 am    Post subject: Reply with quote

You aren't adding any offsets to anything.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Ghosting
Advanced Cheater
Reputation: 0

Joined: 05 Feb 2016
Posts: 54
Location: 127.0.0.1

PostPosted: Sat Oct 29, 2016 7:17 am    Post subject: Reply with quote

ParkourPenguin wrote:
You aren't adding any offsets to anything.


Big mistake on my part, ive updated the code since I posted this and still not working
pastebin . com/raw/kFgHrS4v

Edit: address & offsets may not be the same but I still need help with this...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Oct 29, 2016 7:32 am    Post subject: Reply with quote

You don't get the concept.
Code:
adress = 0x01BADC0C + 0x0 + 0x3ac + 0x60 + 0x18 + 0x38

I'm guessing 1BADC0C is the offset into game.exe that the base pointer resides at. You have the offsets in the right order (bottom ones come first), but you aren't dereferencing them as you traverse the pointer path.

Dark Byte wrote:
you have a pointer where people say : 0048123C+10C , first off, this notation is wrong, the actual notation should be [0048123C]+10C, anyhow,
to get to the real address you have to READ the "4 BYTES" at 0048123C as a value, and add the value 10C to it. (Don't forget that the notation I use is in hexadecimal, even for offsets)
Now interpret this new value as an address, and you have the address that actually contains the address you need. Using this address you can now Write or Read from the specific item the pointer points to.

You're not reading memory at all. You're just adding numbers with numbers. 0x01BADC0C + 0x0 + 0x3ac + 0x60 + 0x18 + 0x38, for all intents and purposes, is equivalent to 0x01BAE068. You aren't correctly using the offsets.

Search for examples; this has been discussed numerous times before.
e.g.: http://forum.cheatengine.org/viewtopic.php?t=579907

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Ghosting
Advanced Cheater
Reputation: 0

Joined: 05 Feb 2016
Posts: 54
Location: 127.0.0.1

PostPosted: Sat Oct 29, 2016 8:16 am    Post subject: Reply with quote

int test = address + 0x400000;



int gameResult = vam.ReadInt32((IntPtr)test);
int testThree = gameResult + address + 0x0 + 0x440 + 0x60 + 0x18 + 0x38;
float testone = vam.ReadFloat((IntPtr)testThree);

Something like this? (doesn't work)
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Sat Oct 29, 2016 8:27 am    Post subject: Reply with quote

You're still just adding numbers with numbers.

There is plenty of information on the web that explains what pointers are. With that knowledge, you should be capable of using logic to figure out how to traverse a pointer path, but even if you can't, there is example source code in many languages (including C#) that show how to traverse a pointer path.

I'm not going to give you the answer. If someone else wants to, that's their business, but for the most part, I'm done here. I've linked plenty of information to you, it's up to you to read it and understand it.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Ghosting
Advanced Cheater
Reputation: 0

Joined: 05 Feb 2016
Posts: 54
Location: 127.0.0.1

PostPosted: Sat Oct 29, 2016 8:41 am    Post subject: Reply with quote

alright thanks for you hel....
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Glumi
How do I cheat?
Reputation: 0

Joined: 27 Dec 2016
Posts: 3

PostPosted: Tue Dec 27, 2016 6:58 am    Post subject: Reply with quote

Here is a Codesnippet that i written for my Project.

Im using this to create a Pointer.


Code:

        public static long GetPointer(IntPtr pointer, int[] offsets)
        {

            int bytesRead = 0;
            IntPtr pointedto = pointer;
            foreach (int offset in offsets)
            {
                IntPtr tmpPointed = (IntPtr)(Memory.Read((long)pointedto, 4, bytesRead));
                pointedto = IntPtr.Add(tmpPointed, offset);
            }

            return (long)pointedto;
        }



Memory.Read((long)pointedto, 4, bytesRead)
Just reads the 4-Byte Value of an Address (You should have this functionality in your Program already)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites