• Welcome to Valhalla Legends Archive.
 

CDKey and Password Hashing

Started by RealityRipple, September 16, 2006, 03:55 AM

Previous topic - Next topic

RealityRipple

I'm trying to wean my bot off of external DLLs a bit more, and in doing so, I would like to hash CDKeys and Passwords locally in VB. Right now I'm using BNCSutil (which does a wonderful job, btw), but I'd really like to be able to do it internally. Can someone point me towards what I need to have? I know I need a Broken SHA-1 function, and some outline on how to hash and double-hash. Any help would be much appreciated.

topaz

Quote from: RealityRipple on September 16, 2006, 03:55 AM
I'm trying to wean my bot off of external DLLs a bit more, and in doing so, I would like to hash CDKeys and Passwords locally in VB. Right now I'm using BNCSutil (which does a wonderful job, btw), but I'd really like to be able to do it internally. Can someone point me towards what I need to have? I know I need a Broken SHA-1 function, and some outline on how to hash and double-hash. Any help would be much appreciated.

Unless there's a Bignum library for VB, I don't think you can.
RLY...?


Spilled

Quote from: RealityRipple on September 16, 2006, 04:46 AM
http://www.vbcode.com/Asp/showzip.asp?ZipFile=http%3A%2F%2Fwww%2Evbcode%2Ecom%2Fcode%2FBigNum3002042002%2Ezip&theID=6141

Would that be of use?

Hrmm I believe that would work but you may want to get a second opinion, but when it comes to vb6 doing your hashing from the dll would be quicker then actually doing the hashing  yourself....

RealityRipple

I understand that. I just don't want to be so dependant on other files (seems like an oxymoron for a vb programmer). How do the games do it? is it a function built into the program, or is there a dll you can use like storm's MPQ functions?

Yegg

Quote from: RealityRipple on September 16, 2006, 08:42 AM
I understand that. I just don't want to be so dependant on other files (seems like an oxymoron for a vb programmer). How do the games do it? is it a function built into the program, or is there a dll you can use like storm's MPQ functions?

Check out the source code of bnetauth.dll. It has the functions you are looking for. You should have atleast a basic knowledge of C/++ before trying to understand it.

l2k-Shadow

well i highly doubt you'll be able to do the NLS functions in VB, but if you do manage that, and everything else, there is still the problem of CheckRevision() taking ~5 seconds in VB (and ~20 seconds for war3)
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

RealityRipple

hmm... so in short it's really not worth it. I guess I'll stick to bncsutil for decoding and NLS. Thanks anyway, guys.

l2k-Shadow

imho you should use all functions BNCSUtil has to offer, considering the fact that C++ code will execute faster than VB code no matter what.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Mystical

unless it was really really poorly coded c++ code. ;\

RealityRipple

I'm using Lord[nK]'s BNLib.dll to use the actual MPQ files to run checkrevision. Everything else is BNCSUtil based.

Hero

Quote from: RealityRipple on September 16, 2006, 09:27 PM
I'm using Lord[nK]'s BNLib.dll to use the actual MPQ files to run checkrevision. Everything else is BNCSUtil based.
Where is BNLib.dll located? Upload it  ::)?

l2k-Shadow

Quote from: heRo on September 16, 2006, 09:37 PM
Quote from: RealityRipple on September 16, 2006, 09:27 PM
I'm using Lord[nK]'s BNLib.dll to use the actual MPQ files to run checkrevision. Everything else is BNCSUtil based.
Where is BNLib.dll located? Upload it  ::)?

the lib is awesome.
Quote
[7:56:10 PM] [BNET] Connecting...
[7:56:15 PM] [BNET] Connected!
[7:56:16 PM] [BNFTP] Connecting...
[7:56:20 PM] [BNFTP] Connected!
[7:56:20 PM] [BNFTP] Requesting ver-IX86-1.mpq...
[7:56:21 PM] [BNFTP] ver-IX86-1.mpq received!
[7:56:21 PM] Extracting CheckRevision library...
[7:56:21 PM] Library extracted!
[7:56:21 PM] [BNLib] Calling CheckRevision...
[7:56:21 PM] [BNLib] CheckRevision call succeeded!
[7:56:21 PM] [BNET] Sending version and CD-key check...

http://forum.valhallalegends.com/index.php?topic=15671.msg158208#msg158208
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Hero

Thanks for the link, I kinda over looked that, I guess. Can't wait to try it.

RealityRipple

If you want just the dll, it's in HDX's downloads folder on his site. I also made a nice icon for the dll if you want to put it somewhere on your programs. http://realityripple.com/Uploads/BNLib.ico