Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 03:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



structs im speicher

Discussion on structs im speicher within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
structs im speicher

moin,

ich möchte gerne wissen wie structs im speicher aufgebaut sind.

dafür hab ich mir ein test code geschrieben und das programm mit olly während der laufzeit angeschaut.

code:

im speicher werden die structs so angelegt:


A6 28 B1 02|9F 64 00 18| und A7 28 B1 03|81 64 00 1C|

scheinen die header zu sein wobei 1c und 18 die größe sind. (glaub ich)

wofür stehen diese bytes:
A6 28 B1 02|9F 64 00
A7 28 B1 03|81 64 00

und am ende
AB AB AB AB|AB AB AB AB ?

€ sind header von malloc
maxi39 is offline  
Old 05/09/2017, 17:39   #2
 
elite*gold: 46
Join Date: Oct 2010
Posts: 782
Received Thanks: 525
Digga was für Header, das hier ist C und nicht irgendeine lustige Sprache mit reflection oder was auch immer. Abgesehen von padding besteht die struct nur aus dem was du darein packst. Da alle member die gleiche Größe haben wirst du da aber kein padding zwischen haben.
th0rex is offline  
Old 05/09/2017, 17:43   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by C0untLizzi View Post
Digga was für Header, das hier ist C und nicht irgendeine lustige Sprache mit reflection oder was auch immer. Abgesehen von padding besteht die struct nur aus dem was du darein packst. Da alle member die gleiche Größe haben wirst du da aber kein padding zwischen haben.
trotzdem sind da header. sind das malloc header, in form von (pointer auf nächsten freien speicherbereich und die größe des belegten blockes ?
maxi39 is offline  
Old 05/09/2017, 17:47   #4
 
elite*gold: 46
Join Date: Oct 2010
Posts: 782
Received Thanks: 525
Das können auch random Bytes sein. Ob das was mit malloc zu tun hat schaust du am besten in deiner malloc Implementierung nach. Auf Linux sind da immer 4 Bzw 8 Bytes Afaik vor allem das allokiert wird.
th0rex is offline  
Old 05/18/2017, 09:53   #5
 
atom0s's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 175
Received Thanks: 123
From the look of it, it does not look like you are at the correct address in memory while looking at your structures memory. Be sure to look into the pointer and that you are not looking at the memory around the pointer itself.
atom0s is offline  
Reply


Similar Threads Similar Threads
[Release] Structs and Misc Bot functions
02/08/2013 - 12Sky2 Hacks, Bots, Cheats & Exploits - 32 Replies
Just posting some of the old information from my bot for all you people still actively working on TwelveSky2 that may want to start to work on a memory based botting system. To start with here are some of the structs I used for making my bot. This is the first time I had ever done something like this, so they are nowhere near professional or fully completed, but there fully working for main bot functions you may need(unless the game client changed drastically at some point): struct...
Suche aktuelle structs
09/07/2011 - WarRock - 3 Replies
Hallo und zwar wollte ich fragen ob jemand die aktuellen structs für mich hat :) danke im vorraus :D
Tausche ESP + Structs gegen Zombie OPK
11/29/2010 - WarRock - 5 Replies
closed ganz schnell -.-
[Request] Packet Structs
10/14/2008 - CO2 Private Server - 9 Replies
So, has anyone structured the packets for patch 5017? If so, any change you could either post them here or PM them to me? I'm looking for complete structures so I don't need the actual code.



All times are GMT +2. The time now is 03:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.