LCKB
Question about adding stuff into GameServer via hex - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196)
+---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192)
+---- Thread: Question about adding stuff into GameServer via hex (/showthread.php?tid=2275)



- pwesty - 07-27-2013


no




- CyberClaus - 07-27-2013

My guess is that has more too it then that, but you make a backup of the gs and try, till you find the solution. trial error 




- someone - 07-27-2013


It will not do anything, o any thing  if you just  added that, if you wrote over other strings it will mess the parts of coding, for example application will need a string and will put something else instead.

 

A simple advice dont add stuff  to the code if you dont know how will influence the application.

 

In what I remember GS gets a_min and a_max first thing the interrogate from the database and  and save it as client version.




- pwesty - 07-28-2013



It will not do anything, o any thing  if you just  added that, if you wrote over other strings it will mess the parts of coding, for example application will need a string and will put something else instead.

 

A simple advice dont add stuff  to the code if you dont know how will influence the application.

 

In what I remember GS gets a_min and a_max first thing the interrogate from the database and  and save it as client version.

so the client has to have the min max level inside aswell? i dont quite understand where you are saying if i wrote over the other strings..if im adding that in i would re write what i wrote over back so it would basically be the samething just 20 characters added into the gs... i just wanted to make sure if me trying to is wasting my time or is a possible feat i could accomplish




- Wizatek - 07-28-2013

What someone is trying to say is that, even if u are able to change the query, does not mean the gameserver will use that data.




- pwesty - 07-28-2013


What someone is trying to say is that, even if u are able to change the query, does not mean the gameserver will use that data.

but is it possible that it just might? 50% maybe haha




- someone - 07-28-2013


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).




- pwesty - 07-29-2013



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