Question about adding stuff into GameServer via hex
#8


Sorry it was 3 AM yesterday when I wrote that and I didnt, saw the keys on the keyboard pretty well.

 

What i wanted to say is that if you change the value of a string in hex without knowing how it will influence the application will lead to  other functionality of the application or even application crash(or will not use it at all).

 

What you posted is the application data section(a part of it), in the application data section are located the application variables constants, and strings.  if you introduced your string in a free spot the application does not know the address of your string, and nothing happens.

 

if you change the value of a string not knowing of how application works it will influence and crash the application:

 

Lets take this for example:

a_attrmap.
a_heightmap.

In the Application will be something like this:

1)
cmd.Execute("SELECT a_heightmap, a_attrmap FROM Something")

while(cmd.Read()){
int heightmap = cmd.getInt("a_heightmap");
int heightmap = cmd.getInt("a_attrmap");
}

cmd.Close();

2)
cmd.Execute("SELECT * FROM Something")

while(cmd.Read()){
int heightmap = cmd.getInt("a_heightmap");
int heightmap = cmd.getInt("a_attrmap");
}

cmd.Close();

In the Example above in 1) the application will crash if you changed a_heightmap to a_minLevel, in 2)  if  a_minLevel is in the table Something, and you changed a_heightmap to a_minLevel, the application will get the wrong value in the heightmap  variable  or maybe later will send the applicatuion into a crash(or a different functionality), but if you change the query it the application will not use the variable.

1)
cmd.Execute("SELECT a_heightmap, a_attrmap FROM Something")

while(cmd.Read()){
int heightmap = cmd.getInt("a_heightmap");
int heightmap = cmd.getInt("a_minLevel");
}

cmd.Close();

2)
cmd.Execute("SELECT * FROM Something")

while(cmd.Read()){
int heightmap = cmd.getInt("a_heightmap");
int heightmap = cmd.getInt("a_minLevel");
}

cmd.Close();

3)
cmd.Execute("SELECT a_heightmap, a_attrmap, a_minLevel FROM Something")

while(cmd.Read()){
    int heightmap = cmd.getInt("a_heightmap");
   int heightmap = cmd.getInt("a_attrmap");
}

cmd.Close()

If you tried to modify a string you are limited to the string size(string in memory terminate with the NULL value of 0x00 and  0x00 0x00 in Unicode), if you go over the NULL byte you will overwrite the other string too.

a_attrmap.
a_heightmap.

Will look something like this:
a_CustomSt
ring.ghtmap.

So the application will find the first string "a_CustomString" and the second string "ring", and the code will look like this:

1)
cmd.Execute("SELECT a_heightmap, a_attrmap FROM Something")

while(cmd.Read()){
int heightmap = cmd.getInt("a_CustomString");
int heightmap = cmd.getInt("ring");
}
cmd.Close();

The thing is you should know what to change before you do it, like changing a Ip address, a URL, a File name, asetting etc(some things can be changed and some can not be changed).

thank you very much for that..i guess i wont try it haha...thanks again for explaining it better



Messages In This Thread
[No subject] - by pwesty - 07-27-2013, 01:35 AM
[No subject] - by CyberClaus - 07-27-2013, 08:34 PM
[No subject] - by someone - 07-27-2013, 11:54 PM
[No subject] - by pwesty - 07-28-2013, 02:15 AM
[No subject] - by Wizatek - 07-28-2013, 03:54 AM
[No subject] - by pwesty - 07-28-2013, 04:47 AM
[No subject] - by someone - 07-28-2013, 11:17 AM
[No subject] - by pwesty - 07-29-2013, 12:33 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)