Results 1 to 4 of 4
  1. #1
    SmartyXD's Avatar
    Join Date
    Jun 2012
    Gender
    female
    Location
    Koyoto
    Posts
    92
    Reputation
    87
    Thanks
    26

    Exclamation Alright im beginning to learn c++

    Ok..... Im beginning to learn c++ its not that hard if you get what the person is trying to say... they introduced me to how c++ codeing started and i love history so this will be great for me but lol if theres a patch and you gotta update a hack how in the hell do you update it by changeing some stuff in the c++ code ?

  2. #2
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,566
    Reputation
    5180
    Thanks
    14,176
    My Mood
    Inspired
    You'll need to know how memory works, look into that.

    Assembly helps too in understanding
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  3. #3
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    Now to your queestion:

    how in the hell do you update it by changeing some stuff in the c++ code ?
    A hack basicly is built on the game engine. But we cant just use the engine as this, we need to get addresses to the engine classes, because the engine gets initialized in the game process. SInce we are making a dll we just can use the address directly. Now the game developers or engine developers can change some things in THEIR engine classes, which lead to the point, OUT engine class is outdated. We need to pad the class then.
    A class is like a bunch full of addresses, all with their own size. A virtual is 4 bytes big, integer, __int32, char etc is 4 bytes big. Byte and bool is 1 byte big. When it comes to pad (padding) there are different methods. Normally we are just looking up the new class in reclass and then we see how much we need to pad. Lets say we have this class:

    Code:
    class cPadExample
    {
    public:
             virtual void shootWeapon();
             virtual void selfKill();
             virtual int GetKills();
             virtual int GetDeaths(); //This whole block is always 4 bytes big, doesnt matter how much virtuals
    
             int ammo; //4 bytes big - integer
             bool isShooting; //1byte big - boolean
    } //size of 9 bytes
    Now the developers think, hey lets add another cool function

    Their class will look like this:

    Code:
    class cPadExample
    {
    public:
             virtual void shootWeapon();
             virtual void selfKill();
             virtual int GetInfections();
             virtual int GetKills();
             virtual int GetDeaths(); //This whole block is always 4 bytes big, doesnt matter how much virtuals
    
             int staminaStemulation; //4 bytes big - integer
             int ammo; //4 bytes big - integer
             bool isShooting; //1byte big - boolean
    } //size of 13 bytes
    We dont need the new things, so we just pad the class like this:

    Code:
    class cPadExample
    {
    public:
             virtual void shootWeapon();
             virtual void selfKill();
                  virtual void function0();
             virtual int GetKills();
             virtual int GetDeaths(); //This whole block is always 4 bytes big, doesnt matter how much virtuals
    
                  int iUnknown; //4 bytes big - integer
             int ammo; //4 bytes big - integer
             bool isShooting; //1byte big - boolean
    } //size of 13 bytes
    But we could also use for unknown a char or whatever, just the size needs to be right. For bigger pads, we use arrays, byte or chars. Chars for really big sizes, since chars are 4 bytes. See:

    BYTE pad_01[0x5D]; //pads the class for 5D bytes...
    char pad_01[17]; //pads the class for 5D bytes...

    Both are doing the same, but have on the first look diferrent sizes.
    Also, because developers chnage code, they are changing our addresses we need for the classes or other addresses. Thats why we make patterns.
    They are looking for a known byte signature, better said:

    Code:
    killThePlayer();
    enemy.deaths += 1;
    player.kills += 1;
    This means in ASM:

    Code:
    CALL 0xDEADBEEF
    ADD byte ptr ds:[0xDEADBEE1], 1
    ADD byte ptr ds:[0xDEADBEE2], 1
    When we make a signature now, we shouldnt use all of these 3 commands in it. Look, what is if they add somethign after calling killThePlayer?
    But what they will never destroy? Yes, the 2 adds, because its the programming style to not add somethign between them, so we make a byte signature from them!
    But if theres not something like this, and you dont know what they will chnage and what not, search for static pointers. This method is good for something like this. Example: We are saerching static pointer for this address (0xDEADBEEF).
    We will get as result ALL non dynamic (static) addresses, which are handling somethign with this address, like the
    Code:
    CALL 0xDEADBEEF
    Now we make a signature of this address instead of 0xDEADBEEF, and always have the right pointer if they dont change something in the region of the call.

    However, I hope you understood this, and never, ever call me an asshole. Im pissed off, because I wrote something like this more times, and I dont like it when some noobs call me noob. If you have more questions then ask, but look at your spelling. Your first question wasnt really nice spelled.
    Last edited by Drake; 08-06-2012 at 02:27 PM.

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    https://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    https://www.youtube.com/watch?v=Na2kUdu4d_k

  4. The Following 3 Users Say Thank You to Ch40zz-C0d3r For This Useful Post:

    //\\//etwork3r (08-06-2012),[MPGH]Flengo (08-07-2012),Password77 (08-06-2012)

  5. #4
    .REZ's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Location
    Real life
    Posts
    10,385
    Reputation
    1110
    Thanks
    2,218
    My Mood
    Psychedelic
    Enough flaming or this thread will be closed.

  6. The Following User Says Thank You to .REZ For This Useful Post:

    Ch40zz-C0d3r (08-06-2012)

Similar Threads

  1. [Share]I want to learn C/C++ but where do I begin?
    By queenslash in forum C++/C Programming
    Replies: 4
    Last Post: 01-18-2011, 12:44 PM
  2. Willing To Learn
    By Dewd In The Newd in forum Gate To Heaven Hacks
    Replies: 13
    Last Post: 09-27-2007, 08:40 AM
  3. Where could I learn C++? (Beginner, and Advanced stuff)
    By TsumikiriX in forum C++/C Programming
    Replies: 8
    Last Post: 07-19-2006, 08:11 PM
  4. Learn Hacking
    By Loler in forum Hack Requests
    Replies: 2
    Last Post: 01-22-2006, 03:20 PM
  5. Looking to learn.
    By SadisticGrin in forum Hack Requests
    Replies: 1
    Last Post: 01-15-2006, 06:57 PM