ACKCREWZ

Wednesday, 9 May 2012

MAT Automaton Making Frame


This tutorial for FRAME only and code for MAT automaton

I am going to try to explain why "injecting" Python does not make any sense.

Let's begin with some basics. When a programmer develops software, they do so in a human readable language. This human readable code cannot directly be executed by a CPU. If it is a compiled language, this human readable code is then compiled by a compiler into machine code for the architecture of the CPU it will ultimately be executed on. In this case the concept of "injection" does make sense. Specially crafted compiled code can be written to the address space of a running game to alter the behaviour of the game adding functionality (cheats).

However, Python is not a compiled language. Python is an interpreted language. In the case of Python, the human readable Python code written by a programmer is first transformed into Python byte code. Unlike a compiled language, where compiled code is being directly executed by a CPU, the Python interpreter is running for the lifetime of the program and executing each byte code instruction. 

So first of all, it certainly doesn't make sense to inject the human readable Python code. Recall that a CPU executes machine code specific to the architecture of the CPU. It also doesn't make sense to inject Python byte code. This code is unrecognizable by a CPU, it only means anything to a running Python interpreter which can actually take those byte code instructions and perform their required operations.

So how does MAT Automaton execute Python code? The MAT Automaton core, a complicated piece of software consisting of many thousands of lines of C++ code, is compiled and "injected" into the game. This core includes the Python interpreter. But the core has many other components too. The most important one is Pyreal. This component binds Unreal Engine to the Python interpreter. In other words, it allows Python code to interact with the game. There is also a GUI and a console. And there is a sophisticated loader which resolves the imports from Unreal Engine in the MAT Automaton import table at runtime for static builds of Unreal engine. 

Let me put it this way, the Python scripts developed for MAT Automaton only make sense to MAT Automaton. The scripts on their own without the core are completely useless.

1 comment: