Valhalla Legends Forums Archive | Advanced Programming | Accessing Diablo Memory

AuthorMessageTime
PyroKid
Im trying to make a program that can log battlenet memory values. The values i want read are the character name, the username, the password, and the realm.

How would i be able to access those values in memory? The location keeps changing. I have tried as much as i can think of. Things such as searching for a static value, injecting asm, and getting the location from a pointer. None work.

Btw i dont want to have to use dll injection.

Thanks for your help!
August 7, 2003, 9:21 PM
Adron
If the values are there and used, getting them through one or more levels of pointers + offsets should work. The only reason I could see for that not working would be if they are stack variables on some thread other than the first - thread stacks can have "random" starting offsets, right?
August 7, 2003, 9:54 PM
iago
To get the character name:
[code]const char *Username = (char*)0x12f4b8;

string __fastcall GetCharName()
{
   return Username;
}[/code]

The username is also stored in a constant place, but I'm not sure where.

And there's no reason you should need to get the password, unless you're trying to steal accounts but I'm not going to help you with that.

And account-theft is more of a trash-can topic than an advanced-programming topic.
August 7, 2003, 10:21 PM
iago
btw, I'm assuming you mean Diablo II, not diablo.
August 7, 2003, 10:21 PM
TheMinistered
I would suggest intercepting a function (specifically, one called when you press LOGIN/OK) and reading the password & username from memory. (you will probably want a pointer to the textbox, etc), I would comment on the others but I'm about to leave...
August 7, 2003, 11:51 PM
PyroKid
Its not account theft. Im talking about accessing the memory in general. You know sortof like d2jsp (the auto-login).
August 8, 2003, 12:25 AM
Skywing
[quote author=iago link=board=23;threadid=2235;start=0#msg17352 date=1060294873]
To get the character name:
[code]const char *Username = (char*)0x12f4b8;

string __fastcall GetCharName()
{
   return Username;
}[/code]

The username is also stored in a constant place, but I'm not sure where.

And there's no reason you should need to get the password, unless you're trying to steal accounts but I'm not going to help you with that.

And account-theft is more of a trash-can topic than an advanced-programming topic.
[/quote]
That is a stack address and will probably vary from service pack to service pack. I'd strongly recommend against using it.
August 8, 2003, 1:01 AM
iago
It's never changed, so it would seem to be fairly safe to use. When 1.10 comes out, everything is going to change anyway, so I'm not going to put anymore work into it.
August 8, 2003, 1:25 AM
PyroKid
1.10 isnt coming out anytime soon. You should see the bugs page. If they want to fix all those i might be dead before they release the patch :P

Anyway I know the character name is a constant value but the username and password arent. I need to know how to read/write to that memory to finish my program.
August 8, 2003, 1:37 AM
iago
IF you aren't injecting (although you should, use my injector program off the general programming forum, I think it's http://www.backstab.ca/~rbowes/Injector.rar or something like that)

"how" to read/write is done by using ReadProcessMemory and WriteProcessMemory.
August 8, 2003, 3:30 AM
PyroKid
i know how to read/write the process memory :)
what im saying is that the address of the username/password changes each time. i need to know how to get that address. i checked for pointers but i couldnt find anything. i know that its possible because i downloaded a vb program that can do it, although i cant find the source. the author's email doesnt exist so i cant ask them about it. this is the only place i could find where people that still play diablo actually know what theyre doing and could answer my question. :)
August 8, 2003, 3:55 AM
Adron
Hook readprocessmemory and writeprocessmemory and run that other program. If you have a program that does it, learn off that.
August 8, 2003, 7:56 AM
Noodlez
Since the address of the username that you found always changes, just find the offset between it and a static address, the distance between them will always be the same. So you just need that address, and you trace back or forward the offset
August 8, 2003, 10:22 PM

Search