Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    3rw1n's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Location
    Germany
    Posts
    7
    Reputation
    10
    Thanks
    23
    My Mood
    Busy

    [C#] Complete Roadmap to your first hack or: How to start hacking | Part 1-3

    Abstract
    Nowadays, due to countless Forums and Youtube-Tutorials, it has never been easier to make your first steps in game hacking. Many of you start very enthusiastic about creating your own hacks - and many of you get discouraged sooner or later due to lacking the basics. The purpose of this mammoth of a guide is to show you a more or less complete sample road you can go, when you want to create your first own hacks at CS:GO. This guide starts with the fundamentals of programming, introduces the most important data structures and gives an introduction to object-oriented programming. This guide will contain if-clauses, linked lists, methods, classes, interfaces, events, ReadProcessMemory, offsets, pattern scans and of course how to create your own external hack (radar hack, aimlock, ray tracing, and more) for CS:GO using the beginner friendly language C#. When finished with all the things mentioned above, we will provide something clearly new to the cheat scene. But first, let’s repeat and teach what every cheat coder at a beginning level should know.

    Sincerely,
    3rw1n & $n00ze

    Credits to the following people (due to a variety of reasons): Doug Confere, ko1n, 'Bruno, Adolfmay, Why06, NextGen1, gigagiga

    Note: The chapters 1 to 3 are posted in the general coding section of this board, and the CS:GO specific parts 4 to 7 will be released in the CS:GO section. The two documents will be linked, as soon as both are created. Additionally we will subsequently link to useful threads, which go into more detail as we do, at some point.

    Synopsis
    Step 1: Learn to program
    Step 2: Data structures
    Step 3: Programming language C#
    Step 4: Game Hacking in CS:GO External with C# - Theoretical
    Step 5: Hacking in CS:GO External with C# - Practical noob level
    Step 6: Hacking in CS:GO External with C# - Practical beginner level
    Step 7: Hacking in CS:GO External with C# - Practical advanced level

     

    Step 2: Learn about data structures and others
    - Int, float, double, char, string, bool
    - Array
    - Linked list
    - Generics
    - Enumeration
    - Struct
    - Pointer
    - Class
    - Object
    - Method (call by value / reference, stack, heap)
    - Interface
    - Event

    Step 3: Learn about the actual language C#
    Since it is hard to explain data structures without showing code, most of this chapter has been shown in chapter 2 already. But this will extend the knowledge by some hack specific needs as shown below.
    - Hello World program
    - Console Input/Output
    - Textfile Input/Output
    - ReadProcessMemory / WriteProcessMemory (Handler)
    - Project 0: Write your own memory class and your own vector class for C#

    Step 4: Game Hacking in CS:GO External with C# - Theoretical
    - How does CS:GO save variables
    - What are offsets
    - Using CheatEngine to get Offsets
    - What are pattern scans
    - How to get offsets
    - Dll injection
    - Protecting your code from decompiling

    Step 5: Hacking in CS:GO External with C# - Practical noob level
    - Project 1: Read the HP of every player
    - Project 2: Radarhack
    - Project 3: BunnyHop
    - Project 4: Let all Players Glow (aka “Wallhack” / ESP)
    - Project 5: Lets get the Position of the enemies / their bones
    - Project 6: Triggerbot
    - Project 7: AimLock
    - Project 8: AimBot

    Step 6: Hacking in CS:GO External with C# - Practical beginner level
    - Project 9: Understanding BSP files
    - Project 10: ray-tracing as visibility check
    - Project 11: D3D menu and ESP

    Step 7: Hacking in CS:GO External with C# - Practical advanced level
    - Project X: How to check if you see an enemy (or teammate) without any kind of ReadProcessMemory, and without the need of an open Handler and without going internal. Or what we call it: the undetectable. (Yes we know, what we are talking about, and yes, no one of you here uses this method, and yes we will give an introduction of what we are talking about, when we start with Step 6)


    Introduction
    To understand the following handbook / guide / tutorial it would be beneficial to have been present in your maths courses back in school both physically and mentally. To be successful at game hacking (not copy & pasting ) you should know the following:

    - Basic geometry (calculate the area of a triangle, Pythagoras, sine, cosine, tangent, unit circle, radian measure)
    - Basic analysis (to derive functions, integrate functions)
    - Basic vector algebra (what is a vector, dot product, cross product, absolute value of a vector)
    - Basic knowledge about logic, sets and boolean operations
    - Different coordinate systems (karthesian, polar coordinate system, angle normalization)
    - Basic physics (acceleration, velocity, 1-D kinematics problems like Ball Thrown Straight Up)

    Latter is especially important if you want to kill an enemy with a rocket launcher in games like TF2 or with a sniper at long range in games like BF4, where bullets do not travel laser-like in a straight line, like in CS. When you do not meet the requirements mentioned above, you will be able to get the enemies to glow, of course. BUT you won't be able to create your own methods of a smooth aimbot or hitting with a rocket launcher without googling and asking. Not to mention things like ray tracing (later steps). Furthermore we can only show the milestones of learning. This guide cannot replace a course of programming, a 500 pages fat textbook and most important: your own practice. Good health and experience can’t be replaced. When we write something about memory addresses and you don’t get it: google is your friend. We see you as our student. It’s a word derived from the Latin word “studiosus” which verb is “studere” which literally means to endeavor. So it is up to you to try and fail and try again. Parallel, or more likely after this guide, we will supply you with source codes and releases of the hacks discussed in this document. Moreover we plan to make YouTube tutorials, which are strongly related to this topic. So if you like the idea of all these, or have any questions, see typos, feel free to leave a comment or write a personal message. One question will surely be asked by many of you: Why C# and not C++ which seems to be more suitable? Since we know C++ very well, and are “inexperienced” with C#, this is a way refresh our “not used in daily life” C# knowledge. When we write “we”, we mean $n00ze and I (3rw1n) who are two coworkers and friends. We are software & medical engineers from Germany, who share the passion of playing Counter-Strike and game hacking. We are quite old and haven’t been in public, yet. But since I became a lecturer at a local University, I have the free time and developed the urge to share my experiences. Our journey of game hacking externals with CS:GO, or the road we think you can / should go nowadays is what we want to share with you. For the next months, our focus lies on this project. After it is finished we will take our time to be an active part of this community, by helping you to find solutions to your specific problems. But until then, we have to apologize, that we will only write back or post solutions now and then. Moreover, this guide is evolving and only comprises the first chapters, yet. So if you already know about the basics of programming and want to start creating your first hack, you have to be patient. These sections will be created over the next weeks and months.

    Parallel to this guide, you (afterwards, simultaneously) should read the following guides to get a more complete package:

    Adolfmay | Beginning C++ | https://www.mpgh.net/forum/showthread.php?t=48195
    Why06 | Beginner Concepts of Game Hacking | https://www.mpgh.net/forum/showthread.php?t=87303
    NextGen1 et. Al. | [Collection]Snippets Vault[C#] | https://www.mpgh.net/forum/showthread.php?t=201972
    'Bruno | How to start into Game Hacking | https://www.mpgh.net/forum/showthread.php?t=496928

    Step 1: Learn to program
    When you want to solve problems, you need to know how to do so. Most has to do with logic and common sense. This chapter briefly shows the most important principles of programming, without focusing on the habits of the specific language C#.

    Creating Variables and how to perform some basic things
     

    Let’s start out simple. Whatever you do or store is written into your RAM (Random Access Memory). E.g. you want to store your monthly salary into a variable, that you can use later on, you will find this salaryvariable in your RAM.
    Lets say you have 4GB of RAM than you can store 2^32 = 4,294,967,296 bytes theoretically. When you want to store a number like your salary, generally you need 4 bytes to store that number into your memory. So, when you declare and initialize something like:
    Code:
    int salary = 2000;         (1) <- this ”(1)“is not part of the code, it is to refer to this line / equation later on
    "int" means, that "salary" will be an integer. There is a variable called "salary" and moreover it has the value of 2000 until you change it somehow. Generally you have to tell your computer, whether your "salary" is an integer or a decimal like 2013.21. Later you cannot set your "salary" to a decimal, after you have decided, that salary is an integer. You would have to declare something like "float anotherSalary = 2345.67". There are languages, where you can do so, but in C, C++, C# you cannot. An overview of other types of numbers can be found in Step 2. Note: C# is case sensitive. That means, that salaray and Salary are two different variables.

    Okay, when you write the code (1), then Visual Studio writes this value into an arbitrary address of memory. E.g. if every part of your RAM was empty (which is impossible, due to your running Operating System and other things), Visual Studio / Your program could have taken the memory addresses 0x0000000001 to 0x0000000004. The 0x… just means, that the number is written as a hexadecimal. So 0xABCFDEF would be a valid address, too. So whenever your program asks “what is my salary”, it reads the 4 bytes at the address from 0x0000000001 to 0x0000000004. This kind of “detailed explanation” is useful for later memory manipulation, yet it is still incomplete.

    Let's move on to our first problem. How can I switch the values of two integers?
    Code:
    int mySalary = 2000; (1)
    int  bossSalary = 6000; (2)
    int  temporary; (3)
    
    temporary = mySalary; (4)
    mySalary = bossSalary; (5)
    bossSalary = mySalary; (6)
    Here, I will go through every line, but later i wil preferably comment things on code. Comments can be made in c++ and c# by the following:
    - Single lined comments are introduced with a double slash
    - Multi linied comments begin with /* and end with */
    Code:
    // This is a single line comment
    /* This comment here
        takes two rows */
    Although this section is about programming in general, I will try to stick to the syntax of C#. So some part of this section actually is about the fundamentals of the language. In (1) I initialized the variable "mySalary" to the value of 2000. Moreover it is an integer and can only be treated like this kind of number. We can never add 0.1323 to the salary. In (2) we do almost the same. (3) declares a new variable called temporary, which will help us to solve the problem of switching the values of "mySalary" and "bossSalary". It is very important to write

    Code:
    int mySalary = 2000;
    and not:
    Code:
    2000 = int mySalary;
    You always put what is on the right side, into what stands on the left. Not vice versa. Oh and by the way, at the end of each operation there is generally a “;”. That’s the syntax of C++ and C#. So with the “what stands right, goes to the left rule”, we hopefully can understand what happens in (4) to (6). In (4) we copy the value of 2000 into an auxiliary variable "temporary". So at this point "temporary" equals 2000, "mySalary" equals 2000, and "bossSalary" still equals 6000. In (5) we override the value "mySalary" to the value which is stored in "bossSalary". So at the end of (5) mySalary equals 6000. The value of 2000 would be lost, if we didn’t save it into "temporary". So we can use "temporary" in (6) to set the "bossSalary" to 2000. At the end of the code "mySalary" equals 6000 and "bossSalary" 2000. First problem solved!

    Since we know how to switch variables, we can do many other operations, too, like increasing the value of a number by 2:

    Code:
    int I = 99;
    I = I +2;
    The following chart (taken by a presentation made for my students) shows how this will be done. Maybe this would be a good time to explain the words “stack” and “heap”? No. I think my kind of tutorial is very hard in comparison to others. So if you read until here, you can wait until I explain the difference between "call by value" and "call by reference" (Don’t worry, you don’t need to know what I just said by now).



    Well, although this is a tutorial about C#, I have to talk about the assembler language. While C# is a very user friendly programming language, assembler or assembly has been used for decades and is also known as symbolic machine code. This language syntax is heavily linked to the computer architecture and its code instructions. What does that mean? A computer only knows of zeros and ones (bits). Eight of them together form a byte. This bytes are stored in memory as shown in the figure above and mentioned at the beginning of this chapter. The image below shows how this could be done in assembly. First you would move what is stored at the memory address 50 (assuming, that there is our variable I) to an auxiliary variable. Second you add to this variable the value 2, and last you overwrite the content of the variable A to the memory address 50. For creating cheats, writing in assembly is not necessarily needed. But if you want to understand, how other codes work (or maybe VAC) you can disassembly (reversing machine code to assembly code) an executable or any kind of windows program library with third party software, and with a lot of patience and experience you can understand the way how the investigated program works. This is called reversed engineering. Nowadays, third party program are able to translate the machine code inte pseudo code, where you can “easily” read through the code, as if you had the source in front of you. Everyone who has at least a minimal skill in reverse engineering knows, what a terrible liar I am at the moment. One thing you have to keep in mind: If you create your cheats in Visual C# and publish it, even you would be able to reverse engineer your own code at the end of this tutorial, without me describing how to do so. Luckily there is another kind of third party programs which “protects” your executables from being disassemblied. Mostly, your new “pimped” executable will be recognized as a virus, due to the fact, that this “protection” is mostly used by those bad people who create software to harm other people. If you take your time to google this topic you will get the basic idea of how to protect your code, but you'll see a lot of bullshit like “If you rename your variable “HealthPoints” to “as5ddas1dsd12s” nobody can reverse engineere your code. And it has another signature” (whatever a signature might be)… this naivety always makes me smile. Ok, lets go on. You will recognize during this tutorial, that I like to give additional information here and there, which potentially will confuse you more than it helps you, but I always want to remind you, that there is a lot more out there, than I could write in one file.



    Making decisions or: the if-clause
     

    Let's imagine you apply for a new job and only want to accept the job offer if you get more than 50000€ per year as your salary. How can you do it?
    Well, just take a pencil and draw something like this:


    Wow, what is that? In Germany we call this a “Struktogramm” and in English it is called a structure chart. Generally, before you start coding, analyze the problem and think about how you want to solve the problem via pen and paper. Brain.exe should be running. As seen in the code examples above, code reads from top to bottom in a kind of “linear path”. The compiler first executes line 1, then 2, then 3 etc. So the First thing you need to know is the offered yearly salary. I called it “Listen to the job offer”. Now some kind of a triangle symbol follows which says “if the offer is bigger than 50000”. This is the symbol within a structure chart to make clear, that now there is a decision to make. Either, if the statement “offer bigger than 50000” is a true statement or a false statement. This is some kind of basic logic. Simplified: A statement can be true or false. “Ten is a bigger number than nine” is a true statement for example. So the “linear path” now divides. When the statement is true, the program follows the left “true” path and you accept the job. If the company only offers you 40000, the statement “offer is bigger than 50000” is a false statement and then you follow the right “false” path and deny the offer.

    Now let’s say you want to react differently depending on how low the offered salary is. If the offer is below 20000 you just don’t say goodbye but you want to yell “R U serious?” and then leave. What would the structure chart look like? I’ll show you.

    This kind of expansion can be done infinitely like the Russian Matryoshka doll. So, when we are in the first false tree, we make a new check, if the offer is smaller than 20000. If so “yell”, if not “goodbye”. Well, you could have solved the problem differently, in the first place. You could have checked if the salary is less or equal 50000. If the statement “salary is less or equal 50000” is false, you would have said “I am your man”. Furthermore, you could have asked if the offer is greater than or equal to 20000 than you would have said “bye”… So, the choice is yours.

    How would the above examples look in C# (and C++) code?
    Code:
    int offer = 40000;
    if ( offer > 50000)  
     {
      Say(“I am your man”);
     }
    else
     {
      Say(“time to say goodbye”);
     }
    Honestly C# and C++ do not know how to talk / speak / say something. So this code would cause errors, unless you write your own procedure / method / function “say”, which make your computer talk – or at least make a console output. But this will be described later on. Within the if-statement you see (offer > 50000 == true). This means, that the program checks, if the offer > 50000 is a true statement. If so, do whatever is written in the curly brackets below. In every other case (so, the statement is false), do what is in the curly brackets after the else line of code. Note: After the program either executed the if or the else path and reaches the }, the program “jumps” to the end the whole if-else-statement and continues the line after the elses closing curly bracket. As you should know by the structure chart, you can have an if-statement within an if-statement. The second example would look like this.
    Code:
    int offer = 40000;
    
    if ( offer > 50000)  
     {
      Say(“I am your man”);
     }
    else
     {
      if ( offer < 20000)  
      {
       Say(“R U serious”);
      }
      else
      {
       Say(“time to say goodbye”);
      }
    }
    Next to the "if" and "else", there is the statement "else if" in C#. Maybe you see a girl and you want to sleazily compliment her about her eyes. In cases with no clearly defined color you don't know what to say you search for other bodyparts to compliment. (Never trust tips of men with technical diploma in terms of women - NEVER!) So how could you do it. First, you already can do it. Just sequentially repeat some if clauses. But another way would be to do it as the following:

    Note: The syntax of the else-if statement is C#. The code within is just pseudocode.
    Code:
    if (eyecolor == “blue”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “green”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “brown”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “red”)
     {
      RunForYourLifeItsAVampire();
     }
    else
     {
      DoWhatIsSaidInTheTextAbove();
     }
    You will notice, that there must be two different types of operators. When we say something like salary = 20000 the equal sign is an arithemtic operator, witch basicially assigns the variable. Here we write eyecolor == “red”. Here the two equal signs have the function of the comparison operator "equal to". Keep in mind: If you want to set a variable to a value use =, if you want to compare two values use ==. This is specific to the C- family, java, php and others.

    The general structure would be like this:

    Another possibility to decide what to do, is the switch-command. And here would be a task for you. Get to know this kind of decision procedure by yourself. Microsoft has a good online support. https://msdn.microsof*****m/de-de/library/06tc147t.aspx

    I don’t want to withhold the structure chart symbol for this. It is the same as the one for the else-if case above. Why? Read and implement something with case differentiation by yourself and you will find out. If not: Continue a few more years in school and try again. If you still don’t understand, stop here and copy and paste code or download precompiled public cheat. I can promise: They won’t get you VAC banned. Am I too cruel? Maybe. But its my passion to write this guide, and I am writing as if I am holding a lecture. Why? I want to entertain you, I want you to imagine an imperious lecturer in front of you, who wants you to become good. Nevermind, let's continue.

    You now should be able to create a structure chart (or even a program if you invest 10 minutes of how to compile a program like "hello world"), which could solve following problems:
    • You were driving through the streets. The cops are behind you. You notice “maybe I was too fast”. When I was 10 km/h too fast, I have to pay x Euro. When I was 15 km/h too fast, I have to pay y Euro… And so on. I Think you get it, what I mean.
    • You wrote an exam. You scored 76 points of 100. You want to know if it is a 1,3 or a 2,7 or or or (German system).
    • You see a player in your crosshair. If he is an enemy and he is not lying dead on the floor, then shoot.


    Of course, you are not able get the information about how many health points this person has, but that will follow.


    Counting to 100000: or looping (for, while, do)
     

    Well, you’re now able to make decisions based on your information, but you can imagine, that some tasks have to been done several times. How can you make the computer write all numbers from 1 to 100. Well you initialize a variable like "int I = 1"; then you print it into a console for example with Console.WriteLine(i); then you increment your I with "I = I + 1". Then you would display the new output (2) with Console.WriteLine(i); now you increment again and so on… These 200 lines of code would look terrible. Luckyly there are many ways to achieve a better solution. If you know how many times you want to repeat this kind of increment and output-thing the so called “for-loop” is the way to go. The structure looks like this.



    The command block, displaying your value is embraced by a count-controlled condition at the beginning of each step. What does it do? The first time the program encounters this structure, the index I is set to its start value of 1. Then the command block is executed (display the value of i). After that, the value of I is incremented by 1 and the program “goes back to the beginning”. Now, the index I is 2. There is a hidden if-clause which asks “is the current value of I (2) smaller or equal than the end-value (100)”. When this statement is true, the command block is executed again. If not, the program jumps to the line after the for loop. How would it look like in c#?


    Code:
    for(i=1; i <= 100; i++)
     {
      Console.WriteLine( i );
     }
    This will display you all numbers from 1 to 100 in a separate line.
    Note: i++ is the same as I = I + 1. Something useful, since incrementing things is very commonly used.

    Ok. Let’s say, you want to sum up all natural numbers from 1 to 100. How do you do this without a computer? Well you calculate 1+2+3+4+….+100, right? WRONG! It would take you forever. You are an intelligent human being and would find a more complex but faster way to obtain the solution. At least that is what Gauss (1777 – 1855, German mathematician) did 200 years ago. You just multiply 50 by 101 and get the solution of 5050. You also could have multiplied 100 by 50 and add 50. It’s the same – it’s mathemagic. But luckily a computer can compute basic arithmetic operations much faster than your brain, so there would not be no need to invent this fancy algorithm. Well, I want to show you something new. How can you sum up all numbers from 1 to 100 then? First you have the number one. To this number you add the next bigger number (two). The sum is now three. Now you add a number, which is one bigger than the two, (which is three) and add it to your number you already have (three). Now you have six. To this number you add a number which is one bigger than three (which is four). Now you have 10 as a sum. Now you add 5. Then six.. and so on. Sounds complicated, right? If you see the code, you’ll understand!

    Code:
    int sum = 0;
    for(i=1; i <= 100; i++)
     {
      Sum = Sum + i;
     }
    So try out yourself. After the first step sum = 1. After the second (since I became 2) it is 3. And so on.

    But what if, you don’t know how many times you have to repeat an action? Like: You will have to continue shooting at an enemy, as long as he is alive. You can do it in two different ways. On the one hand you shoot first, and then you check if he is still alive, and if so, shoot and check again. I call this the Wild-West-Way (first shoot the bad guy, then interrogate him). On the other hand, you can first check if he is alive, and if so, then shoot. Check again and shoot (or not). Both are so called condition-controlled loops. The second is called a while-loop and is a so called pre-test loop, because it tests a condition before executing the command block. The first is a do-while-loop, which runs the command block no matter what, and then checks, if it should be run again. The while loop can be drawn as the following.


    Wow? It looks pretty much the same as the for-loop, right? The for loop is just a special case of this one, where you increment your index in the head of the loop. A while loop is more flexible. Lets see how the “shoot living enemy” example could look like.
    Code:
    while ( enemyHP > 0)
     {
      Shoot();
     }
    As for the if-statement within the round brackets, it will be checked, if the statement is a true statement. So if the value of enemyHP is greater than zero, the command block will be executed. The Shoot() method may contain many lines of code, like moving your mouse to the head, simulate a mouse click and refresh the variable enemyHP (very important). After the procedure of Shoot() is finished, the program jumps back to the condition and checks if the enemyHP is still greater than zero. If so. Execute the command block again. If the Enemy is immortal, this would be an infinite loop. Oh by the way, if you want to create an infinite loop you can write something like that:

    Code:
    while (true)
     {
      DoSomething();
     }
    This loop will never be exited, because “true” is always “true”. (The major mistake god made in the film "Groundhog Day".)
    The do while loop looks very similar.


    The difference was explained above. The C# syntax reads as the following:
    Code:
    do
     {
      Shoot();
     } while ( enemyHP > 0)
    Again: Here the command block is executed first, no matter what. So if you accidentally have just spotted a dead body, he would at least fire one shot.

    Here is another task for you. How can you read integers and sum them up, where the loop should be cancelled, when a negative number is typed in. Okay. We did not handle how you can read from the keyboard. You can do it with pseudocode or read it up in a latter section or the internet. Hint: Console.ReadLine().
     

    A for loop is not suited, due to the fact, that we do not know how many times we want to sum up.
    1. You’ll create a do-while loop. Since no matter what, you want to read the typed in number anyway.
    2. You could use a do-while loop with a break directive (you don`t know it yet, so google it), which triggers, when the number is negativ.
    3. Use a while loop, where the input and the input and check of repition are combined. So the Console.Readline() has to be written twice.

    Example code:

    Code:
    Sum= 0;
    Console.WriteLine("Type in number until you type a negative one");
    do
     {
      Console.WriteLine("next number please: ");
      Number= Convert.ToInt32(Console.ReadLine());
      if(Number>= 0)
      Sum= Sum+ Number;
    } while(Number>= 0);
    Console.WriteLine("The sum is: "+ Sum);

    I have to admit, that this goes „deep“ into the syntax of C# and some conversions you are propably not aware of, yet. But I’ll keep it uncommented for now.
    I promise you, that you can solve every problem with the introduced control flow statements. You don’t need more than if,else and while. (and the other ones) to solve any of your problems.



    Step 2: Data strucutres
    Coming during June/July

    Step 3: program language C#
    Coming during June/July

    Rep/Thank us if we helped you
    Last edited by 3rw1n; 06-12-2016 at 10:45 AM.

  2. The Following 17 Users Say Thank You to 3rw1n For This Useful Post:

    ASDFSDFSDFASa (06-18-2016),CAMPOSBKN (09-06-2020),DaniielSanchez (11-16-2016),Darius1337 (09-05-2016),FlyFree (04-04-2017),GamecrackingDE (11-26-2016),gigagiga (06-12-2016),HardHack15 (02-03-2017),Harley (06-23-2016),moneymademe (05-23-2017),pavlikpromix (12-22-2020),rammelpopje (04-18-2018),RednecksRevenge (04-28-2018),Space (06-12-2016),Suflly (05-13-2017),surgo (12-03-2018),zeroethan (11-09-2016)

  3. #2
    gigagiga's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    Weedistan
    Posts
    366
    Reputation
    10
    Thanks
    5,040
    Wow nice post! and thanks for credits
    I was going to make a road map video and post, too. I am going to mention/recommend this post then in the video.
    Here is another guide, short one (which i read back ages ago)...
    https://www.mpgh.net/forum/showthread.php?t=496928
    I think you have seen it, since you mentioned 'Bruno probably just forgotten to add it.

    Gruß
    Pasters:
    Quote Originally Posted by undetected88 View Post
    Are you planning to share source?
    Quote Originally Posted by undetected88 View Post
    could you please share the Source? <3
    Also Pasters:
    Quote Originally Posted by undetected88 View Post
    don't reupload my cheats.
    Quote Originally Posted by undetected88 View Post
    Credits: All credits to me
    --------------------------------------------------
    Quote Originally Posted by MaGicSuR View Post
    externals, cause you can only get ban for 1 file.
    Quote Originally Posted by XeSynTh View Post
    Hello guys. I need help with a source code that I made and I need help compiling it. If anyone wants to compile it for me or leave step by step instructions on how to compile it that would be amazing.
    AimTux will never get detected ...
    I am here for Comedy posts/threads

  4. #3
    $n00ze's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by gigagiga View Post
    Wow nice post! and thanks for credits
    I was going to make a road map video and post, too. I am going to mention/recommend this post then in the video.
    Here is another guide, short one (which i read back ages ago)...
    I think you have seen it, since you mentioned 'Bruno probably just forgotten to add it.

    Gruß
    Thanks!
    We totally forgot about Bruno!
    We added him now. :-)
    Greetings

  5. #4
    Sammy's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Location
    Vaero
    Posts
    1,102
    Reputation
    224
    Thanks
    228
    Good to see people are trying to make this section more popular again.

  6. #5
    ASDFSDFSDFASa's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Hallo ,ersteinmal danke für die Einführung.
    Kann ich dich irgendwie erreichen?Damit du mir vlt. ein paar Tipps geben kannst oder so , habe noch viele Fragen zum Thema Gamehacking. Natürlich nur wenn du Lust und Zeit hast.

  7. #6
    Harley's Avatar
    Join Date
    May 2016
    Gender
    male
    Location
    Arkham Asylum
    Posts
    248
    Reputation
    20
    Thanks
    61
    My Mood
    Lurking
    Quote Originally Posted by ASDFSDFSDFASa View Post
    Hallo ,ersteinmal danke für die Einführung.
    Kann ich dich irgendwie erreichen?Damit du mir vlt. ein paar Tipps geben kannst oder so , habe noch viele Fragen zum Thema Gamehacking. Natürlich nur wenn du Lust und Zeit hast.
    English please.


    anyway, such information! thanks for this!




     
    If I helped you by any chance, Please leave a + THANKS or a +REP. Much appreciated!
    If you need to ask something , contact me through VM/PM
    *Other communication needs to be verified first.

  8. #7
    Darius1337's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    17
    Reputation
    10
    Thanks
    0
    My Mood
    Crappy
    Thanks, that helped me to start

  9. #8
    Remi24fr's Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    1
    My Mood
    Amazed
    Thanks .

  10. #9
    xwhiskyx's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    0
    My Mood
    Angelic
    thanks for the guide

  11. #10
    W$WT$Y4y4Y4y4yy4y4's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    What ever happened to this series of tutorials? The obvious answer is you're busy with stuff in life. But a coherent answer would be nice.
    Good job on this by the way!

  12. #11
    zeroethan's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    Wow, thanks for this guide. One of the most in-depth guides I've seen on mpgh!

  13. #12
    DaniielSanchez's Avatar
    Join Date
    Nov 2016
    Gender
    male
    Location
    Venezuela
    Posts
    71
    Reputation
    14
    Thanks
    11
    My Mood
    Bashful
    Quote Originally Posted by 3rw1n View Post
    Abstract
    Nowadays, due to countless Forums and Youtube-Tutorials, it has never been easier to make your first steps in game hacking. Many of you start very enthusiastic about creating your own hacks - and many of you get discouraged sooner or later due to lacking the basics. The purpose of this mammoth of a guide is to show you a more or less complete sample road you can go, when you want to create your first own hacks at CS:GO. This guide starts with the fundamentals of programming, introduces the most important data structures and gives an introduction to object-oriented programming. This guide will contain if-clauses, linked lists, methods, classes, interfaces, events, ReadProcessMemory, offsets, pattern scans and of course how to create your own external hack (radar hack, aimlock, ray tracing, and more) for CS:GO using the beginner friendly language C#. When finished with all the things mentioned above, we will provide something clearly new to the cheat scene. But first, let’s repeat and teach what every cheat coder at a beginning level should know.

    Sincerely,
    3rw1n & $n00ze

    Credits to the following people (due to a variety of reasons): Doug Confere, ko1n, 'Bruno, Adolfmay, Why06, NextGen1, gigagiga

    Note: The chapters 1 to 3 are posted in the general coding section of this board, and the CS:GO specific parts 4 to 7 will be released in the CS:GO section. The two documents will be linked, as soon as both are created. Additionally we will subsequently link to useful threads, which go into more detail as we do, at some point.

    Synopsis
    Step 1: Learn to program
    Step 2: Data structures
    Step 3: Programming language C#
    Step 4: Game Hacking in CS:GO External with C# - Theoretical
    Step 5: Hacking in CS:GO External with C# - Practical noob level
    Step 6: Hacking in CS:GO External with C# - Practical beginner level
    Step 7: Hacking in CS:GO External with C# - Practical advanced level

     

    Step 2: Learn about data structures and others
    - Int, float, double, char, string, bool
    - Array
    - Linked list
    - Generics
    - Enumeration
    - Struct
    - Pointer
    - Class
    - Object
    - Method (call by value / reference, stack, heap)
    - Interface
    - Event

    Step 3: Learn about the actual language C#
    Since it is hard to explain data structures without showing code, most of this chapter has been shown in chapter 2 already. But this will extend the knowledge by some hack specific needs as shown below.
    - Hello World program
    - Console Input/Output
    - Textfile Input/Output
    - ReadProcessMemory / WriteProcessMemory (Handler)
    - Project 0: Write your own memory class and your own vector class for C#

    Step 4: Game Hacking in CS:GO External with C# - Theoretical
    - How does CS:GO save variables
    - What are offsets
    - Using CheatEngine to get Offsets
    - What are pattern scans
    - How to get offsets
    - Dll injection
    - Protecting your code from decompiling

    Step 5: Hacking in CS:GO External with C# - Practical noob level
    - Project 1: Read the HP of every player
    - Project 2: Radarhack
    - Project 3: BunnyHop
    - Project 4: Let all Players Glow (aka “Wallhack” / ESP)
    - Project 5: Lets get the Position of the enemies / their bones
    - Project 6: Triggerbot
    - Project 7: AimLock
    - Project 8: AimBot

    Step 6: Hacking in CS:GO External with C# - Practical beginner level
    - Project 9: Understanding BSP files
    - Project 10: ray-tracing as visibility check
    - Project 11: D3D menu and ESP

    Step 7: Hacking in CS:GO External with C# - Practical advanced level
    - Project X: How to check if you see an enemy (or teammate) without any kind of ReadProcessMemory, and without the need of an open Handler and without going internal. Or what we call it: the undetectable. (Yes we know, what we are talking about, and yes, no one of you here uses this method, and yes we will give an introduction of what we are talking about, when we start with Step 6)


    Introduction
    To understand the following handbook / guide / tutorial it would be beneficial to have been present in your maths courses back in school both physically and mentally. To be successful at game hacking (not copy & pasting ) you should know the following:

    - Basic geometry (calculate the area of a triangle, Pythagoras, sine, cosine, tangent, unit circle, radian measure)
    - Basic analysis (to derive functions, integrate functions)
    - Basic vector algebra (what is a vector, dot product, cross product, absolute value of a vector)
    - Basic knowledge about logic, sets and boolean operations
    - Different coordinate systems (karthesian, polar coordinate system, angle normalization)
    - Basic physics (acceleration, velocity, 1-D kinematics problems like Ball Thrown Straight Up)

    Latter is especially important if you want to kill an enemy with a rocket launcher in games like TF2 or with a sniper at long range in games like BF4, where bullets do not travel laser-like in a straight line, like in CS. When you do not meet the requirements mentioned above, you will be able to get the enemies to glow, of course. BUT you won't be able to create your own methods of a smooth aimbot or hitting with a rocket launcher without googling and asking. Not to mention things like ray tracing (later steps). Furthermore we can only show the milestones of learning. This guide cannot replace a course of programming, a 500 pages fat textbook and most important: your own practice. Good health and experience can’t be replaced. When we write something about memory addresses and you don’t get it: google is your friend. We see you as our student. It’s a word derived from the Latin word “studiosus” which verb is “studere” which literally means to endeavor. So it is up to you to try and fail and try again. Parallel, or more likely after this guide, we will supply you with source codes and releases of the hacks discussed in this document. Moreover we plan to make YouTube tutorials, which are strongly related to this topic. So if you like the idea of all these, or have any questions, see typos, feel free to leave a comment or write a personal message. One question will surely be asked by many of you: Why C# and not C++ which seems to be more suitable? Since we know C++ very well, and are “inexperienced” with C#, this is a way refresh our “not used in daily life” C# knowledge. When we write “we”, we mean $n00ze and I (3rw1n) who are two coworkers and friends. We are software & medical engineers from Germany, who share the passion of playing Counter-Strike and game hacking. We are quite old and haven’t been in public, yet. But since I became a lecturer at a local University, I have the free time and developed the urge to share my experiences. Our journey of game hacking externals with CS:GO, or the road we think you can / should go nowadays is what we want to share with you. For the next months, our focus lies on this project. After it is finished we will take our time to be an active part of this community, by helping you to find solutions to your specific problems. But until then, we have to apologize, that we will only write back or post solutions now and then. Moreover, this guide is evolving and only comprises the first chapters, yet. So if you already know about the basics of programming and want to start creating your first hack, you have to be patient. These sections will be created over the next weeks and months.

    Parallel to this guide, you (afterwards, simultaneously) should read the following guides to get a more complete package:

    Adolfmay | Beginning C++ | https://www.mpgh.net/forum/showthread.php?t=48195
    Why06 | Beginner Concepts of Game Hacking | https://www.mpgh.net/forum/showthread.php?t=87303
    NextGen1 et. Al. | [Collection]Snippets Vault[C#] | https://www.mpgh.net/forum/showthread.php?t=201972
    'Bruno | How to start into Game Hacking | https://www.mpgh.net/forum/showthread.php?t=496928

    Step 1: Learn to program
    When you want to solve problems, you need to know how to do so. Most has to do with logic and common sense. This chapter briefly shows the most important principles of programming, without focusing on the habits of the specific language C#.

    Creating Variables and how to perform some basic things
     

    Let’s start out simple. Whatever you do or store is written into your RAM (Random Access Memory). E.g. you want to store your monthly salary into a variable, that you can use later on, you will find this salaryvariable in your RAM.
    Lets say you have 4GB of RAM than you can store 2^32 = 4,294,967,296 bytes theoretically. When you want to store a number like your salary, generally you need 4 bytes to store that number into your memory. So, when you declare and initialize something like:
    Code:
    int salary = 2000;         (1) <- this ”(1)“is not part of the code, it is to refer to this line / equation later on
    "int" means, that "salary" will be an integer. There is a variable called "salary" and moreover it has the value of 2000 until you change it somehow. Generally you have to tell your computer, whether your "salary" is an integer or a decimal like 2013.21. Later you cannot set your "salary" to a decimal, after you have decided, that salary is an integer. You would have to declare something like "float anotherSalary = 2345.67". There are languages, where you can do so, but in C, C++, C# you cannot. An overview of other types of numbers can be found in Step 2. Note: C# is case sensitive. That means, that salaray and Salary are two different variables.

    Okay, when you write the code (1), then Visual Studio writes this value into an arbitrary address of memory. E.g. if every part of your RAM was empty (which is impossible, due to your running Operating System and other things), Visual Studio / Your program could have taken the memory addresses 0x0000000001 to 0x0000000004. The 0x… just means, that the number is written as a hexadecimal. So 0xABCFDEF would be a valid address, too. So whenever your program asks “what is my salary”, it reads the 4 bytes at the address from 0x0000000001 to 0x0000000004. This kind of “detailed explanation” is useful for later memory manipulation, yet it is still incomplete.

    Let's move on to our first problem. How can I switch the values of two integers?
    Code:
    int mySalary = 2000; (1)
    int  bossSalary = 6000; (2)
    int  temporary; (3)
    
    temporary = mySalary; (4)
    mySalary = bossSalary; (5)
    bossSalary = mySalary; (6)
    Here, I will go through every line, but later i wil preferably comment things on code. Comments can be made in c++ and c# by the following:
    - Single lined comments are introduced with a double slash
    - Multi linied comments begin with /* and end with */
    Code:
    // This is a single line comment
    /* This comment here
        takes two rows */
    Although this section is about programming in general, I will try to stick to the syntax of C#. So some part of this section actually is about the fundamentals of the language. In (1) I initialized the variable "mySalary" to the value of 2000. Moreover it is an integer and can only be treated like this kind of number. We can never add 0.1323 to the salary. In (2) we do almost the same. (3) declares a new variable called temporary, which will help us to solve the problem of switching the values of "mySalary" and "bossSalary". It is very important to write

    Code:
    int mySalary = 2000;
    and not:
    Code:
    2000 = int mySalary;
    You always put what is on the right side, into what stands on the left. Not vice versa. Oh and by the way, at the end of each operation there is generally a “;”. That’s the syntax of C++ and C#. So with the “what stands right, goes to the left rule”, we hopefully can understand what happens in (4) to (6). In (4) we copy the value of 2000 into an auxiliary variable "temporary". So at this point "temporary" equals 2000, "mySalary" equals 2000, and "bossSalary" still equals 6000. In (5) we override the value "mySalary" to the value which is stored in "bossSalary". So at the end of (5) mySalary equals 6000. The value of 2000 would be lost, if we didn’t save it into "temporary". So we can use "temporary" in (6) to set the "bossSalary" to 2000. At the end of the code "mySalary" equals 6000 and "bossSalary" 2000. First problem solved!

    Since we know how to switch variables, we can do many other operations, too, like increasing the value of a number by 2:

    Code:
    int I = 99;
    I = I +2;
    The following chart (taken by a presentation made for my students) shows how this will be done. Maybe this would be a good time to explain the words “stack” and “heap”? No. I think my kind of tutorial is very hard in comparison to others. So if you read until here, you can wait until I explain the difference between "call by value" and "call by reference" (Don’t worry, you don’t need to know what I just said by now).



    Well, although this is a tutorial about C#, I have to talk about the assembler language. While C# is a very user friendly programming language, assembler or assembly has been used for decades and is also known as symbolic machine code. This language syntax is heavily linked to the computer architecture and its code instructions. What does that mean? A computer only knows of zeros and ones (bits). Eight of them together form a byte. This bytes are stored in memory as shown in the figure above and mentioned at the beginning of this chapter. The image below shows how this could be done in assembly. First you would move what is stored at the memory address 50 (assuming, that there is our variable I) to an auxiliary variable. Second you add to this variable the value 2, and last you overwrite the content of the variable A to the memory address 50. For creating cheats, writing in assembly is not necessarily needed. But if you want to understand, how other codes work (or maybe VAC) you can disassembly (reversing machine code to assembly code) an executable or any kind of windows program library with third party software, and with a lot of patience and experience you can understand the way how the investigated program works. This is called reversed engineering. Nowadays, third party program are able to translate the machine code inte pseudo code, where you can “easily” read through the code, as if you had the source in front of you. Everyone who has at least a minimal skill in reverse engineering knows, what a terrible liar I am at the moment. One thing you have to keep in mind: If you create your cheats in Visual C# and publish it, even you would be able to reverse engineer your own code at the end of this tutorial, without me describing how to do so. Luckily there is another kind of third party programs which “protects” your executables from being disassemblied. Mostly, your new “pimped” executable will be recognized as a virus, due to the fact, that this “protection” is mostly used by those bad people who create software to harm other people. If you take your time to google this topic you will get the basic idea of how to protect your code, but you'll see a lot of bullshit like “If you rename your variable “HealthPoints” to “as5ddas1dsd12s” nobody can reverse engineere your code. And it has another signature” (whatever a signature might be)… this naivety always makes me smile. Ok, lets go on. You will recognize during this tutorial, that I like to give additional information here and there, which potentially will confuse you more than it helps you, but I always want to remind you, that there is a lot more out there, than I could write in one file.



    Making decisions or: the if-clause
     

    Let's imagine you apply for a new job and only want to accept the job offer if you get more than 50000€ per year as your salary. How can you do it?
    Well, just take a pencil and draw something like this:


    Wow, what is that? In Germany we call this a “Struktogramm” and in English it is called a structure chart. Generally, before you start coding, analyze the problem and think about how you want to solve the problem via pen and paper. Brain.exe should be running. As seen in the code examples above, code reads from top to bottom in a kind of “linear path”. The compiler first executes line 1, then 2, then 3 etc. So the First thing you need to know is the offered yearly salary. I called it “Listen to the job offer”. Now some kind of a triangle symbol follows which says “if the offer is bigger than 50000”. This is the symbol within a structure chart to make clear, that now there is a decision to make. Either, if the statement “offer bigger than 50000” is a true statement or a false statement. This is some kind of basic logic. Simplified: A statement can be true or false. “Ten is a bigger number than nine” is a true statement for example. So the “linear path” now divides. When the statement is true, the program follows the left “true” path and you accept the job. If the company only offers you 40000, the statement “offer is bigger than 50000” is a false statement and then you follow the right “false” path and deny the offer.

    Now let’s say you want to react differently depending on how low the offered salary is. If the offer is below 20000 you just don’t say goodbye but you want to yell “R U serious?” and then leave. What would the structure chart look like? I’ll show you.

    This kind of expansion can be done infinitely like the Russian Matryoshka doll. So, when we are in the first false tree, we make a new check, if the offer is smaller than 20000. If so “yell”, if not “goodbye”. Well, you could have solved the problem differently, in the first place. You could have checked if the salary is less or equal 50000. If the statement “salary is less or equal 50000” is false, you would have said “I am your man”. Furthermore, you could have asked if the offer is greater than or equal to 20000 than you would have said “bye”… So, the choice is yours.

    How would the above examples look in C# (and C++) code?
    Code:
    int offer = 40000;
    if ( offer > 50000)  
     {
      Say(“I am your man”);
     }
    else
     {
      Say(“time to say goodbye”);
     }
    Honestly C# and C++ do not know how to talk / speak / say something. So this code would cause errors, unless you write your own procedure / method / function “say”, which make your computer talk – or at least make a console output. But this will be described later on. Within the if-statement you see (offer > 50000 == true). This means, that the program checks, if the offer > 50000 is a true statement. If so, do whatever is written in the curly brackets below. In every other case (so, the statement is false), do what is in the curly brackets after the else line of code. Note: After the program either executed the if or the else path and reaches the }, the program “jumps” to the end the whole if-else-statement and continues the line after the elses closing curly bracket. As you should know by the structure chart, you can have an if-statement within an if-statement. The second example would look like this.
    Code:
    int offer = 40000;
    
    if ( offer > 50000)  
     {
      Say(“I am your man”);
     }
    else
     {
      if ( offer < 20000)  
      {
       Say(“R U serious”);
      }
      else
      {
       Say(“time to say goodbye”);
      }
    }
    Next to the "if" and "else", there is the statement "else if" in C#. Maybe you see a girl and you want to sleazily compliment her about her eyes. In cases with no clearly defined color you don't know what to say you search for other bodyparts to compliment. (Never trust tips of men with technical diploma in terms of women - NEVER!) So how could you do it. First, you already can do it. Just sequentially repeat some if clauses. But another way would be to do it as the following:

    Note: The syntax of the else-if statement is C#. The code within is just pseudocode.
    Code:
    if (eyecolor == “blue”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “green”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “brown”)
     {
      DoWhatIsSaidInTheTextAbove();
     }
    else If (eyecolor == “red”)
     {
      RunForYourLifeItsAVampire();
     }
    else
     {
      DoWhatIsSaidInTheTextAbove();
     }
    You will notice, that there must be two different types of operators. When we say something like salary = 20000 the equal sign is an arithemtic operator, witch basicially assigns the variable. Here we write eyecolor == “red”. Here the two equal signs have the function of the comparison operator "equal to". Keep in mind: If you want to set a variable to a value use =, if you want to compare two values use ==. This is specific to the C- family, java, php and others.

    The general structure would be like this:

    Another possibility to decide what to do, is the switch-command. And here would be a task for you. Get to know this kind of decision procedure by yourself. Microsoft has a good online support. https://msdn.microsof*****m/de-de/library/06tc147t.aspx

    I don’t want to withhold the structure chart symbol for this. It is the same as the one for the else-if case above. Why? Read and implement something with case differentiation by yourself and you will find out. If not: Continue a few more years in school and try again. If you still don’t understand, stop here and copy and paste code or download precompiled public cheat. I can promise: They won’t get you VAC banned. Am I too cruel? Maybe. But its my passion to write this guide, and I am writing as if I am holding a lecture. Why? I want to entertain you, I want you to imagine an imperious lecturer in front of you, who wants you to become good. Nevermind, let's continue.

    You now should be able to create a structure chart (or even a program if you invest 10 minutes of how to compile a program like "hello world"), which could solve following problems:
    • You were driving through the streets. The cops are behind you. You notice “maybe I was too fast”. When I was 10 km/h too fast, I have to pay x Euro. When I was 15 km/h too fast, I have to pay y Euro… And so on. I Think you get it, what I mean.
    • You wrote an exam. You scored 76 points of 100. You want to know if it is a 1,3 or a 2,7 or or or (German system).
    • You see a player in your crosshair. If he is an enemy and he is not lying dead on the floor, then shoot.


    Of course, you are not able get the information about how many health points this person has, but that will follow.


    Counting to 100000: or looping (for, while, do)
     

    Well, you’re now able to make decisions based on your information, but you can imagine, that some tasks have to been done several times. How can you make the computer write all numbers from 1 to 100. Well you initialize a variable like "int I = 1"; then you print it into a console for example with Console.WriteLine(i); then you increment your I with "I = I + 1". Then you would display the new output (2) with Console.WriteLine(i); now you increment again and so on… These 200 lines of code would look terrible. Luckyly there are many ways to achieve a better solution. If you know how many times you want to repeat this kind of increment and output-thing the so called “for-loop” is the way to go. The structure looks like this.



    The command block, displaying your value is embraced by a count-controlled condition at the beginning of each step. What does it do? The first time the program encounters this structure, the index I is set to its start value of 1. Then the command block is executed (display the value of i). After that, the value of I is incremented by 1 and the program “goes back to the beginning”. Now, the index I is 2. There is a hidden if-clause which asks “is the current value of I (2) smaller or equal than the end-value (100)”. When this statement is true, the command block is executed again. If not, the program jumps to the line after the for loop. How would it look like in c#?


    Code:
    for(i=1; i <= 100; i++)
     {
      Console.WriteLine( i );
     }
    This will display you all numbers from 1 to 100 in a separate line.
    Note: i++ is the same as I = I + 1. Something useful, since incrementing things is very commonly used.

    Ok. Let’s say, you want to sum up all natural numbers from 1 to 100. How do you do this without a computer? Well you calculate 1+2+3+4+….+100, right? WRONG! It would take you forever. You are an intelligent human being and would find a more complex but faster way to obtain the solution. At least that is what Gauss (1777 – 1855, German mathematician) did 200 years ago. You just multiply 50 by 101 and get the solution of 5050. You also could have multiplied 100 by 50 and add 50. It’s the same – it’s mathemagic. But luckily a computer can compute basic arithmetic operations much faster than your brain, so there would not be no need to invent this fancy algorithm. Well, I want to show you something new. How can you sum up all numbers from 1 to 100 then? First you have the number one. To this number you add the next bigger number (two). The sum is now three. Now you add a number, which is one bigger than the two, (which is three) and add it to your number you already have (three). Now you have six. To this number you add a number which is one bigger than three (which is four). Now you have 10 as a sum. Now you add 5. Then six.. and so on. Sounds complicated, right? If you see the code, you’ll understand!

    Code:
    int sum = 0;
    for(i=1; i <= 100; i++)
     {
      Sum = Sum + i;
     }
    So try out yourself. After the first step sum = 1. After the second (since I became 2) it is 3. And so on.

    But what if, you don’t know how many times you have to repeat an action? Like: You will have to continue shooting at an enemy, as long as he is alive. You can do it in two different ways. On the one hand you shoot first, and then you check if he is still alive, and if so, shoot and check again. I call this the Wild-West-Way (first shoot the bad guy, then interrogate him). On the other hand, you can first check if he is alive, and if so, then shoot. Check again and shoot (or not). Both are so called condition-controlled loops. The second is called a while-loop and is a so called pre-test loop, because it tests a condition before executing the command block. The first is a do-while-loop, which runs the command block no matter what, and then checks, if it should be run again. The while loop can be drawn as the following.


    Wow? It looks pretty much the same as the for-loop, right? The for loop is just a special case of this one, where you increment your index in the head of the loop. A while loop is more flexible. Lets see how the “shoot living enemy” example could look like.
    Code:
    while ( enemyHP > 0)
     {
      Shoot();
     }
    As for the if-statement within the round brackets, it will be checked, if the statement is a true statement. So if the value of enemyHP is greater than zero, the command block will be executed. The Shoot() method may contain many lines of code, like moving your mouse to the head, simulate a mouse click and refresh the variable enemyHP (very important). After the procedure of Shoot() is finished, the program jumps back to the condition and checks if the enemyHP is still greater than zero. If so. Execute the command block again. If the Enemy is immortal, this would be an infinite loop. Oh by the way, if you want to create an infinite loop you can write something like that:

    Code:
    while (true)
     {
      DoSomething();
     }
    This loop will never be exited, because “true” is always “true”. (The major mistake god made in the film "Groundhog Day".)
    The do while loop looks very similar.


    The difference was explained above. The C# syntax reads as the following:
    Code:
    do
     {
      Shoot();
     } while ( enemyHP > 0)
    Again: Here the command block is executed first, no matter what. So if you accidentally have just spotted a dead body, he would at least fire one shot.

    Here is another task for you. How can you read integers and sum them up, where the loop should be cancelled, when a negative number is typed in. Okay. We did not handle how you can read from the keyboard. You can do it with pseudocode or read it up in a latter section or the internet. Hint: Console.ReadLine().
     

    A for loop is not suited, due to the fact, that we do not know how many times we want to sum up.
    1. You’ll create a do-while loop. Since no matter what, you want to read the typed in number anyway.
    2. You could use a do-while loop with a break directive (you don`t know it yet, so google it), which triggers, when the number is negativ.
    3. Use a while loop, where the input and the input and check of repition are combined. So the Console.Readline() has to be written twice.

    Example code:

    Code:
    Sum= 0;
    Console.WriteLine("Type in number until you type a negative one");
    do
     {
      Console.WriteLine("next number please: ");
      Number= Convert.ToInt32(Console.ReadLine());
      if(Number>= 0)
      Sum= Sum+ Number;
    } while(Number>= 0);
    Console.WriteLine("The sum is: "+ Sum);

    I have to admit, that this goes „deep“ into the syntax of C# and some conversions you are propably not aware of, yet. But I’ll keep it uncommented for now.
    I promise you, that you can solve every problem with the introduced control flow statements. You don’t need more than if,else and while. (and the other ones) to solve any of your problems.



    Step 2: Data strucutres
    Coming during June/July

    Step 3: program language C#
    Coming during June/July

    Rep/Thank us if we helped you


    You can not make a guide how to make or manufacture this hack (I'd love to, if you do a tutorial)
    https://www.mpgh.net/forum/showthread...butterfly-hack

    The video explains what I want to do.


    Here is a guide that gave me a friend how to do it (But I do not know which Program to use)
    Nor the codes that I have to use to make the hack in the gunz.
    Gunz is https://gunz.enigmagamerz.com/


    I was looking through my old source codes and I found one specifically relating to butterfly.
    ZPostShot is done through the ZPostCommand where the packet ID for ZPostShot is 0x2732 (If it hasn't been altered) . The MCommand requires a blob which is the ZPACKSHOTINFO structure.
    Code:
    struct ZPACKEDSHOTINFO
    {
    	float ShotTime;
    	short PosX;
    	short PoxY;
    	short PosZ;
    	short DirX;
    	short DirY;
    	short DirZ;
    	int Type;
    };
    When you call ZPostShot, you need your characters position pointer and direction pointer. This is done through ZMyCharacter() function, which is just an offset from ZGetGame(), I don't have these pointers or offsets anymore because I wrote these hacks in 2012 for Aeria Gunz.

    Essentially, all you're doing is this.
    Code:
    ZPostShot(float* Position,float* Direction);
    And ZPostShot is just a function that creates an MCommand.
    Code:
    MCommand *Command = ZNewCmd( 0x2732 );
    	ZPACKEDSHOTINFO ShotInfo = { ShotTime++,
    								 Position[0], Position[1], Position[2],
    								 Direction[0], Direction[1], Direction[2],
    								 SHOT_TYPE_MELEE }; //7
    	Command->AddParameter( new MCommandParameterBlob( &ShotInfo, sizeof(ShotInfo) ) );
    	ZPostCommand( Command );
    MCommand is a linked list structure which has a pointer to the next MCommand structure, and two MUID structure.
    Each MUID structure contains two unsigned long, one high and one low. This is to represent a 64 bit id.

    AddParameter and ZNewCmd and ZPostCommand are all just function pointers.
    Code:
    void AddParameter( MCommandParameter *CmdParam );
    MCommand *ZNewCmd( int Cmd );
    ZPostCommand( MCommand *Cmd );
    This is the guide [/QUOTE]

  14. The Following 4 Users Say Thank You to DaniielSanchez For This Useful Post:

    dedo_2 (11-16-2016),djesus (11-16-2016),Valentinaa (11-16-2016),VictorRiera (11-16-2016)

  15. #13
    GamecrackingDE's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Location
    Netherlands
    Posts
    20
    Reputation
    10
    Thanks
    0
    Thats awesome, thank you for the nice help and guide @3rw1n !

  16. #14
    _DuB_'s Avatar
    Join Date
    Dec 2016
    Gender
    male
    Location
    Finland
    Posts
    26
    Reputation
    10
    Thanks
    3
    My Mood
    Fine
    Thank you for posting this!

  17. #15
    Froedahr's Avatar
    Join Date
    Dec 2016
    Gender
    male
    Location
    Canada
    Posts
    191
    Reputation
    15
    Thanks
    17
    My Mood
    Chatty
    That's an amazing thread, I'll probably release one soon based on this.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Tutorial] How To Start Hacking? [TUTORIAL]
    By oviur in forum CrossFire Tutorials
    Replies: 6
    Last Post: 08-02-2014, 04:42 PM
  2. How to start hacking AVA?
    By Poi0987 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 5
    Last Post: 09-15-2013, 06:05 PM
  3. [Solved] How to start hacking for crossfire
    By sansan12345 in forum CrossFire Help
    Replies: 2
    Last Post: 01-02-2013, 08:54 AM
  4. How to start hack
    By Stormwalker13 in forum Combat Arms Europe Hacks
    Replies: 11
    Last Post: 03-07-2009, 02:00 PM
  5. Replies: 28
    Last Post: 03-02-2009, 07:44 AM

Tags for this Thread