Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: EnCoDe on July 17, 2003, 12:40 AM

Title: CD-Key in use by _____ .
Post by: EnCoDe on July 17, 2003, 12:40 AM
How do I get the name of the person who is using the CD-Key if I try to connect and it's in use? (VB6)
Title: Re:CD-Key in use by _____ .
Post by: WiLD on July 17, 2003, 01:11 AM
What are you using? CleanSlateBot?
Title: Re:CD-Key in use by _____ .
Post by: Camel on July 17, 2003, 03:18 AM
Taken from BnetDocs:

Packet ID: 0x51
Direction: Server -> Client (Received)
Format:
Help (DWORD)       Result
(STRING)       Additional Information
...
0x201: CD key in use (Additional info field supplies name of user)
...
Title: Re:CD-Key in use by _____ .
Post by: Nova1313 on July 17, 2003, 09:04 AM
          Select Case nResult
             Case &H0
                 Addtext "anerror", "Invalid CD-KEY" & vbCrLf, 1, True
             Case &H1
                 Debug.Print Len(strCurrentData)
                 usedkey = Mid(strCurrentData, 9, Len(strCurrentData) - 9)
                 Addtext "anerror", "Cdkey In use by the installation name in brackets [" & usedkey & "]" & vbCrLf, 1, True


in that used key is the name.
Title: Re:CD-Key in use by _____ .
Post by: CrAz3D on July 17, 2003, 05:50 PM
QuoteHow do I get the name of the person who is using the CD-Key if I try to connect and it's in use? (VB6)
I think he means he wants to know who is ACTUALLY using that key.  Like the users's name.
Title: Re:CD-Key in use by _____ .
Post by: Camel on July 17, 2003, 08:12 PM
Even if bnet knew, which it doesnt, it probably wouldnt tell.
Title: Re:CD-Key in use by _____ .
Post by: CrAz3D on July 17, 2003, 10:47 PM
I'd think that they know everything that goes through their servers, otherwise it could pose a problem.
Title: Re:CD-Key in use by _____ .
Post by: Maddox on July 17, 2003, 10:55 PM
Of course battle.net knows what username is on what cdkey. How else do you think they ban/mute keys?
Title: Re:CD-Key in use by _____ .
Post by: CrAz3D on July 17, 2003, 11:05 PM
Random obnoxiousness?
Title: Re:CD-Key in use by _____ .
Post by: R.a.B.B.i.T on July 17, 2003, 11:13 PM
i second cr4z3d's idea!

well...actually...bnet doesnt link cdkeys to usernames to dish out to people....it uses the value stored when you install the software (remember the little box above the cdkey inputs?)  i have no idea where thats stored tho.............ooo cuphead thats a good idea, add a .InUse like CleanSlateBot1.InUse = "Bob the magical elf" or something...i dunno i just came up with it.......
ANYWAYS BACK TO MY ORIGINAL TRAIN OF THOUGHT!!

if you could find wher bnet apps store their "registered to" values, you could load a bot on your key, and try to login, and get the error (so you can packet-capture it) :O you could probably then use a IF-THEN-ELSEIF statement to display the InUse values....because 99.9% of bots probably dont have the file with it...and it would be a pain to change anyways..i think.......hmm am i rambling?
Title: Re:CD-Key in use by _____ .
Post by: Camel on July 17, 2003, 11:28 PM
It's in an mpq file; get a cd key viewer.
Title: Re:CD-Key in use by _____ .
Post by: EnCoDe on July 18, 2003, 03:02 AM
I was actually asking how I get the acount name that is using my cd-key if i am connecting and it's in use. (remember on normal SC client when says: "Your CD-Key is in use by: <name> ")

I'm using a hashed bot. None of that CSB/BNLS stuff.
Title: Re:CD-Key in use by _____ .
Post by: Skywing on July 18, 2003, 03:44 AM
Quote from: EnCoDe on July 18, 2003, 03:02 AM
I was actually asking how I get the acount name that is using my cd-key if i am connecting and it's in use. (remember on normal SC client when says: "Your CD-Key is in use by: <name> ")

I'm using a hashed bot. None of that CSB/BNLS stuff.
You don't.  SC gets it from the reply to the CD-key check message, and it's just an arbitrary, short string specified by the remote client.  Thus not really that useful, unfortunately.
Title: Re:CD-Key in use by _____ .
Post by: EnCoDe on July 18, 2003, 06:48 AM
Well I have seen many bots that are able to do this (eg: MadChat). Does anyone have the code for this?
Title: Re:CD-Key in use by _____ .
Post by: Mesiah / haiseM on July 18, 2003, 08:28 AM
It depends on what you insert your cdkey name as (This is good to tell what bots are ethbot or binarygateway ripoffs), you could always insert is as your bots base login name, but for the old login style, it would look something like this:


   pBuffer.InsertDWORD 0
   pBuffer.InsertDWORD Len(varCDKey)
   pBuffer.InsertDWORD CLng(dblProdID)
   pBuffer.InsertDWORD CLng(dblValue1)
   pBuffer.InsertDWORD CLng(dblSeed)
   pBuffer.InsertDWORD CLng(dblKey)
   pBuffer.InsertDWORD lngKey
   pBuffer.InsertDWORD lngSeed
   pBuffer.InsertDWORD lngProdID
   pBuffer.InsertDWORD lngValue1
   pBuffer.InsertDWORD lngValue2
   pBuffer.InsertNTString "BuddhaBot"
   pBuffer.SendPacket &H36


the last string in packet 0x36 is the cdkey name, that the client extracts from the mpq and sends to battle.net when you login, so if you replace that with a variable of your bots base login name, then sure, you could WHO your cdkey is being used by, but if its not done by a bot, your most likely never going to be able to tell.
Title: Re:CD-Key in use by _____ .
Post by: PaiD on July 18, 2003, 12:36 PM
were would I get a cd key viewer?
Title: Re:CD-Key in use by _____ .
Post by: Camel on July 18, 2003, 04:16 PM
Quote from: EnCoDe on July 18, 2003, 06:48 AM
Well I have seen many bots that are able to do this (eg: MadChat). Does anyone have the code for this?

The only way it would be possible is if the user using your cd key is on a bot that sends the accountname as the arbitrary string Skywing referred to. Said string is the only information you will ever recieve about the person using a key through 0x50 or 0x06.

The programmer of MadChat may have mistakenly thought that the string was supposed to be the user's account, thus leading you to believe the same.