
Parent commenter can toggle ^NSFW or ^delete. Interesting: Buffer ^overflow | ^PaX | Exec ^Shield | Hardened ^Gentoo In order to prevent an attacker from reliably jumping to a particular exploited function in memory (for example), ASLR involves randomly arranging the positions of key data areas of a program, including the base of the executable and the positions of the stack, heap, and ( (computer_science)), in a ( (computer_science)) address space.
SUPER HEXAGON BOT CODE
If anyone knows a way to do this in python please let me know, or maybe some short C, C++, C# code that could called from python.Īddress space layout randomization ( ASLR) is a computer security technique involved in protection from buffer overflow attacks. This is not the case in my issue since I'm trying to get the base memory address from an outside process. I found this Stackoverflow page about getting the base memory address, but that only works if the process that is calling the win32api.GetModuleHandle() function also loaded the module in question. I had the assumption that pointers were some kind of global thing that every program could access but I now understand that you need to get the processes imagebase/base memory address and then apply the relative address offsets.
SUPER HEXAGON BOT HOW TO
So I'm now a bit lost as to how to find the memory locations of the other variables since some of them might be pretty difficult to scan for since I wouldn't know the current value of them.ĮDIT: I did some research on memory and pointers and was able to figure out what I was doing wrong. I assume the game has been updated since the bot was written which has changed the memory offsets, but I'm wondering how the person who wrote it was able to find them in the first place. When I finally found it, it was located at an address of: 0x3A69574Īnd not the expected BasePointer + NumSlots offset.

I used cheatengine to scan memory for one of the variables I know (NumSlots) because I can tell its value from watching the game. When I try to access these it fails to do so. The Github bot I found lists the memory locations for information as this: BasePointer = 0圆94B00, I found this Stackoverflow page which shows how to read memory from a specific address, but this is where I'm encountering my issue. Which reads the information it needs directly from memory. I've now decided to try an approach similar to this:

I first tried to use SimpleCV to parse the objects and use that to control the game, but SimpleCV was only able to complete the actions at 6 FPS which is not fast enough to keep up with Super Hexagon. I decided to create a python bot to attempt to complete the game, however I'm having a bit of trouble. I've been playing Super Hexagon recently and I've beaten the first few levels, but I have quickly determined that the remaining levels are beyond my abilities.
