vb, databases and memory locations...

I play several online games and what I want to be able to do is take all of my statistics in a particular game and upload them to a database to have them compare to other users. I would like to create my client using VB and upload all of the statistics to a MySQL database. Once I get all the stuff up to the database I should have no problem... maybe. *grin*

What I want to know is how to get the statistics from the game onto my client and upload it to a MySQL server. I take it this is done by getting information via memory locations; however, I do not know how to get these locations. I know that at some point or another I'll need to learn how to CRC hash to make sure people aren't playing with packets but I'm just trying to take this one step at a time.

Is there an easy way to go about doing this or what skills will I need to learn to do it? Thanks for the help.

Comments

  • : I play several online games and what I want to be able to do is take all of my statistics in a particular game and upload them to a database to have them compare to other users. I would like to create my client using VB and upload all of the statistics to a MySQL database. Once I get all the stuff up to the database I should have no problem... maybe. *grin*
    :
    : What I want to know is how to get the statistics from the game onto my client and upload it to a MySQL server. I take it this is done by getting information via memory locations; however, I do not know how to get these locations. I know that at some point or another I'll need to learn how to CRC hash to make sure people aren't playing with packets but I'm just trying to take this one step at a time.
    :
    : Is there an easy way to go about doing this or what skills will I need to learn to do it? Thanks for the help.

    Seeing as how the memory location will vary from machine to machine and even on the same machine vary from process to process, I'd say you've got a lot of work ahead of you. Variables aren't stored in memory by the names they have in the source code. I don't know how you plan on identifying some bits of data as something you're interested in.

    This is also assuming that the operating system will let your program access another process' memory space.

    Good luck to you.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

  • : : I play several online games and what I want to be able to do is take all of my statistics in a particular game and upload them to a database to have them compare to other users. I would like to create my client using VB and upload all of the statistics to a MySQL database. Once I get all the stuff up to the database I should have no problem... maybe. *grin*
    : :
    : : What I want to know is how to get the statistics from the game onto my client and upload it to a MySQL server. I take it this is done by getting information via memory locations; however, I do not know how to get these locations. I know that at some point or another I'll need to learn how to CRC hash to make sure people aren't playing with packets but I'm just trying to take this one step at a time.
    : :
    : : Is there an easy way to go about doing this or what skills will I need to learn to do it? Thanks for the help.
    :
    : Seeing as how the memory location will vary from machine to machine and even on the same machine vary from process to process, I'd say you've got a lot of work ahead of you. Variables aren't stored in memory by the names they have in the source code. I don't know how you plan on identifying some bits of data as something you're interested in.
    :
    : This is also assuming that the operating system will let your program access another process' memory space.
    :
    : Good luck to you.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]


    As for breaking through process boundaries, it *can* be done, and probably it can be done in VB too.
    But not for the weak of heart, and I'm not going to show how.
    For instance, because last time I did it, I coded it in asm and C. There are more, though - and no good reasons to do so.
    Less still in VB. You'd definitely be better writing this thing in C, not VB. I'm not saying it's impossible, I'm just saying that it's horrificly hard in C, and C is more suited for the task.

    Identifying variables in the source code, well... not really that hard.
    Scan memory in a moment "m", scan it in a moment m+1, dropping an item, et voila': by comparing a few times the same memory locations and contents, you can probably guess things out. Besides, you could only search values of appropriate size (if "Str" ranges from 0 to 255, check out single bytes; if it ranges from 0 to 500, check out couples of bytes, and so on).

    CRC hashing is not hard, *once* you know the algorithm.
    For instance, you could have an 8-bit CRC for a packet by adding up all the bytes in a packet, and then mod that number by 255. Or perhaps subtracting each one. Or multiplying. Maybe the CRC is 16 bit long. Maybe the CRC is 12 bit long, with 4 "zeroes" at its end. Perhaps it is 13 bit long if odd, or 12 bit long if even.
    Sure, once you know how the CRC is made, it's not hard at all... usually not harder than a bunch of math. Again, *once* you know how the CRC is obtained. Until you don't know it... well, it's random.

  • Just my first thought on this one, but what about the .dll's the game shipped with, if any at all? There's an opportunity to hack (the REAL definition, no cracking) the game's API if so. There's an off chance you can hit them with VB, but as mentioned before, you might be in for some C/C++ development.
  • : Just my first thought on this one, but what about the .dll's the game shipped with, if any at all? There's an opportunity to hack (the REAL definition, no cracking) the game's API if so. There's an off chance you can hit them with VB, but as mentioned before, you might be in for some C/C++ development.
    :

    No way you can work your way through the Dlls.
    You could hack Dlls, okay, but then what?
    Data is not shared - code is shared, but data isn't - you can, for instance call some "ConnectToWhatever" function (if you guess out the parameters anyway, and not even C programmers can do so), but then what? Reading another process' memory is the only solution, since data resides there (IMO, but I'm 99% sure about it).

    What I meant earlier is that he's probably better learning C/C++ from scratch and write this program than trying to code it in VB, anyways.
    I love VB, don't get me wrong with this - but there are things you are just way better NOT doing in VB6.
  • I wasn't suggesting it was the end all solution. But if I were writing an app that wrote scores in a game to some sort of ini or registry I would have a function in my class that read the score, and one that wrote it. If that's the case here, he could track down the function that reads the score.

    I agree that VB's peek/poke functionality isn't the way to go. I've long suggested that knowledge of C coding is important to any VB programmer anyway. But I would never suggest that there is No Way to do it with VB. In this instance, it just depends on how the developers coded the middleware.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories