• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Ryan Marcus

#1
I've taken it into my personal responsibility to make a really nice, easy, OS X looking bot the runs on Mac. It's called Luxer. Download and installing information here: http://marcusfamily.info/~ryan/forums/index.php/topic,15.0.html


If you think my bot needs more features, post in the forums. If you still want to write one in RB, I posted some packet builder classes on these forums somewhere..
#2
Quote
Why are you posting rather pointless nonsense trying to criticize Ryan?  The original poster never said ANYTHING about what he's writing in.  For all you know he might be in RB; he certainly never said he was using VB.
Its cool. I know Joe pretty well from x86. I don't think he met any offense, but he could have worded that a bit better.

Quote
Of course, the quality of the original post made everyone ASSUME it was a VB luser, but that's another debate.

I would'nt even call it a debate... If somebody can write a bot before they can write out to a file and read one in, they are using CSB (and thus have no idea what they are doing), or they are some crazy raised from birth by evil anti-blizzard nazi's who want to conquer all of battle.net with an ultimate flood bot... The later does not seem too promising, but it sounds cooler. ;)


I posted the RB because I assumed it could be easily converted to VB. Apartly, thats something that can't.
#3
Uh.. either I'm dumb or your code makes no sence for writting and reading files...


Here is some REALbasic code that simply writes out a text file and looping through an array of users, pretty basic stuff.. You should have learned this before you came close to being able to write a bot.. You should be able to adapt it to VB easily.


dim textout as textoutputstream
dim f as folderitem
dim i as integer

f = GetFolderItem("users.txt")
textout = f.CreateTextFile

while i<>UBound(users) + 1
textout.writeline(users(i).someprop)
textout.writeline(users(i).someprop)
textout.writeline(users(i).someprop)
i =i + 1
wend


Hope that helps.
#4
Ya, it me again. ;)

I seem to be getting an invalid CDKey error from battle.net... I can't seem to figure out why:

Battle.net
Quote

end data (105 bytes).
<0000003B< FF 51 69 00  46 EA D3 58  09 03 01 01  F1 8F 85 81  .Qi.F..X........
<0000004B< 01 00 00 00  00 00 00 00  0D 00 00 00  01 00 00 00  ................
<0000005B< 75 38 90 00  00 00 00 C4  62 E0 56 71  F7 2D 00 4B  u8......b.Vq.-.K
<0000006B< A8 6B 69 47  4D EB F2 9A  71 A0 6F 73  74 61 72 63  .kiGM...q.ostarc
<0000007B< 72 61 66 74  2E 65 78 65  20 30 38 2F  30 37 2F 30  raft.exe 08/07/0
<0000008B< 35 20 31 32  3A 30 36 3A  34 32 20 31  30 39 33 36  5 12:06:42 10936
<0000009B< 33 32 00 4C  75 78 65 72  00                        32.Luxer.

Receive data (9 bytes).
>0000006B> FF 51 09 00  00 02 00 00  00                        .Q.......


BNLS:
Quote

Receive data (47 bytes).
>000000E5> 2F 00 01 01  00 00 00 46  EA D3 58 0D  00 00 00 01  /......F..X.....
>000000F5> 00 00 00 75  38 90 00 00  00 00 00 C4  62 E0 56 71  ...u8.......b.Vq
>00000105> F7 2D 00 4B  A8 6B 69 47  4D EB F2 9A  71 A0 6F     .-.K.kiGM...q.o


If you have the free time, please email your response to me... There seems to be a server problem where posts are sporadically deleted. [email protected].

Thanks in advance for any help!
#5
Quote from: raylu on September 26, 2005, 07:11 PM
Wait, you're sending 82 26 31 0D for the key length. Yes, BNLS does send 9 DWords, but no where in the BNLS response do I see 82 26 31 0D.

Thats because I am not stupid enough to post that BNLS packet because it has my CDKey in it ;)

But it should not matter

Its telling me there is an invalid version not an invalid CDKey.

Would it give me invalid version if I gave it an invalid key length?

Also, is the key length the length of the original key, the decoded key, or the hashed key, so I can calculate it myself and check what BNLS is saying.
#6
Quote from: Shout on September 26, 2005, 09:32 AM
I think you CDKey decoding is incorrect.

221324930 is your key length :/
0x100 is your product... ect...

Hmm.. It should be fine because I am using BNLS. And even if, the response would not be invalid version, it would be invalid CDKey, right?
#7
Quote from: Shout on September 26, 2005, 07:27 AM
Quote from: Ryan Marcus on September 25, 2005, 02:09 PM
No matter what I do, I continue to get an invalid version error from 0x51. I am almost completely sure its not formatting.


The 0x51 packet, sent to BNCS:
Quote

Send data (106 bytes).
<0000003B< FF 51 6A 00  00 00 00 48  09 03 01 01  A5 EA 8F E1  .Qj....H........
<0000004B< 01 00 00 00  00 00 00 00  82 26 31 0D  00 00 01 00  .........&1.....
<0000005B< 00 75 38 90  00 00 00 00  8A E1 2B 1C  03 77 89 B2  .u8.......+..w..
<0000006B< A5 AE B3 A7  CD 77 1E C3  FD B5 8B 15  73 74 61 72  .....w......star
<0000007B< 63 72 61 66  74 2E 65 78  65 20 30 38  2F 30 37 2F  craft.exe 08/07/
<0000008B< 30 35 20 31  32 3A 30 36  3A 34 32 20  31 30 39 33  05 12:06:42 1093
<0000009B< 36 33 32 00  4C 75 78 65  72 00                     632.Luxer.


BnetDocs page for 0x51:

(DWORD)          Client Token
(DWORD)          EXE Version
(DWORD)          EXE Hash
(DWORD)          Number of keys in this packet
(BOOLEAN)        Using Spawn (32-bit)

For Each Key:
(DWORD)          Key Length
(DWORD)          CD key's product value
(DWORD)          CD key's public value
(DWORD)          Unknown (0)
(DWORD[5])       Hashed Key Data

(STRING)         Exe Information
(STRING)         CD Key owner name


BnetDocs page for the BNLS response to VersionCheck:

(BOOLEAN)        Success

If Success is TRUE:

(DWORD)          Version.
(DWORD)          Checksum.
(STRING)         Version check stat string.



Thanks in advance for any help!


Lets break down your packet.

FF 51 6A 00 Header
00 00 00 48 Client Token
09 03 01 01 Exe Ver
EA 8F E1 73 Check Revision
01 00 00 00 Number of keys
00 00 00 00 Spawn
(stuff)



That looks correct to me.... A boolean is just a DWORD with a 0 for false and a 1 for true, right?
#8
The key length is after the spawn boolean, right?

I thought BNLS sent the key length with it, because the docs say 9 DWORDS. If one is not the length, what is it?

And what do you mean "something"?

Thanks for the reply, SoulTaker, and thanks in advance for any future replies.
#9
No matter what I do, I continue to get an invalid version error from 0x51. I am almost completely sure its not formatting.


The 0x51 packet, sent to BNCS:
Quote

Send data (106 bytes).
<0000003B< FF 51 6A 00  00 00 00 48  09 03 01 01  A5 EA 8F E1  .Qj....H........
<0000004B< 01 00 00 00  00 00 00 00  82 26 31 0D  00 00 01 00  .........&1.....
<0000005B< 00 75 38 90  00 00 00 00  8A E1 2B 1C  03 77 89 B2  .u8.......+..w..
<0000006B< A5 AE B3 A7  CD 77 1E C3  FD B5 8B 15  73 74 61 72  .....w......star
<0000007B< 63 72 61 66  74 2E 65 78  65 20 30 38  2F 30 37 2F  craft.exe 08/07/
<0000008B< 30 35 20 31  32 3A 30 36  3A 34 32 20  31 30 39 33  05 12:06:42 1093
<0000009B< 36 33 32 00  4C 75 78 65  72 00                     632.Luxer.


The JBLS response for VersionCheck:
Quote

Receive data (55 bytes).
>000000AE> 37 00 09 01  00 00 00 09  03 01 01 A5  EA 8F E1 73  7..............s
>000000BE> 74 61 72 63  72 61 66 74  2E 65 78 65  20 30 38 2F  tarcraft.exe 08/
>000000CE> 30 37 2F 30  35 20 31 32  3A 30 36 3A  34 32 20 31  07/05 12:06:42 1
>000000DE> 30 39 33 36  33 32 00                               093632.


BnetDocs page for 0x51:

(DWORD)          Client Token
(DWORD)          EXE Version
(DWORD)          EXE Hash
(DWORD)          Number of keys in this packet
(BOOLEAN)        Using Spawn (32-bit)

For Each Key:
(DWORD)          Key Length
(DWORD)          CD key's product value
(DWORD)          CD key's public value
(DWORD)          Unknown (0)
(DWORD[5])       Hashed Key Data

(STRING)         Exe Information
(STRING)         CD Key owner name


BnetDocs page for the BNLS response to VersionCheck:

(BOOLEAN)        Success

If Success is TRUE:

(DWORD)          Version.
(DWORD)          Checksum.
(STRING)         Version check stat string.



Thanks in advance for any help!
#10
This is my packet builder class, written in REALbasic. I hope this helps anybody who wants to use it. I should get my packet buffer posted soon..

Adding a byte:

Sub InsertByte(data as integer)
subpacket = subpacket + ChrB(Data)
end sub


Adding a DWORD:

Sub InsertDWORD(data as string)
subpacket = subpacket + MakeDWORD(data)
End Sub


Making a DWORD:

Protected Function MakeDWORD(data as string) as string
  Dim tmp  as String
  Dim a  as String
  Dim B  as String
  Dim c  as String
  Dim D  as String
  DIM varMakeDWORD as String
  tmp = Right(chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + chr(0) + tohex(Data), 8)
  a = Mid(tmp, 1, 2)
  B = Mid(tmp, 3, 2)
  c = Mid(tmp, 5, 2)
  D = Mid(tmp, 7, 2)
  varMakeDWORD=Chr(Val("&H" + D))
  varMakeDWORD= varMakeDWORD + Chr(Val("&H" + c))
  varMakeDWORD= varMakeDWORD + Chr(Val("&H" + B))
  varMakeDWORD= varMakeDWORD + Chr(Val("&H" + a))
  Return varMakeDWORD
End Function


Insert a string:

Sub InsertString(data as string, NT as boolean)
  Select case NT
  case true
    subpacket = subpacket + data + chr(0)
  case false
    subpacket = subpacket + data
  end Select
End Sub


Insert a word:

Sub InsertWORD(data as integer)
subpacket = subpacket + MakeWord(data)
End Sub


Make a word:

Protected Function MakeWORD(data as integer) as string
  Dim tmp  as String
  Dim a  as String
  Dim B  as String
  DIM varMakeWORD as String
  tmp = Right(chr(0) + chr(0) + chr(0) + chr(0) + hex(Data), 4)
  a = Mid(tmp, 1, 2)
  B = Mid(tmp, 3, 2)
  varMakeWORD=Chr( Val("&H" + B) )
  varMakeWORD= varMakeWORD + Chr( Val("&H" + a) )
  Return varMakeWORD
End Function


To hex:

Private Function ToHex(data as string) as string
  Dim i  as Integer
  DIM varToHex as String
  For i =  1 To Len(Data)
    varToHex= varToHex + Right("00" + hex(Asc(Mid(Data, i, 1))), 2)
  Next
  Return varToHex
End Function


Applying BNCS headers:

Sub ApplyHeaders(MessageID as integer)
  headers = chr(&HFF) + chr(MessageID)
  headers = headers + MakeWord(LenB(subpacket) + lenB(Headers) + 2)
  subpacket = headers + subpacket
End Sub


Applying BNLS headers:

Sub ApplyHeadersBNLS(MessageID as integer)
  headers = MakeWord(lenb(subpacket) + 3) // Include the WORD and the message id byte
  headers = headers + chr(MessageID)
  subpacket = headers + subpacket
End Sub


Getting the packet to write out:

Function GetPacket() as string
return subpacket
End Function


You will need the following properties:
headers as string (Public)
subpacket as string (Public)


I hope these help!
#11
Battle.net Bot Development / Re: BNETDocs Down...
September 22, 2005, 06:23 PM
Got an ETA?
#12
Authorize? That should send me the data I need for SID_AUTH_REPLY (0x51), right?

I set the DLL number to 0, as it says.. Right?
#13
Call me a moron, but somebody please tell me what is wrong:

Quote

Send option management request (T_OPTMGMT_REQ = 108).

Receive option management ack (T_OPTMGMT_ACK = 131).

Send bind request (T_BIND_REQ = 101).
  Bind to «Any Address»
  Connection Indication Number = 0

Receive bind ack (T_BIND_ACK = 122).
  Bind to port 54071
  Connection Indication Number = 0

Send connection request (T_CONN_REQ = 102).
  Connect to 63.161.183.205:9367

Receive connection confirmation (T_CONN_CON = 123).
  Connect from 63.161.183.205:9367

Send data (73 bytes).
<00000000< 09 4A 00 01  00 00 00 30  00 00 00 41  3D 32 34 38  .J.....0...A=248
<00000010< 33 39 37 39  36 30 20 42  3D 33 30 38  37 35 39 38  397960 B=3087598
<00000020< 30 36 20 43  3D 35 38 32  38 35 34 35  32 35 20 34  06 C=582854525 4
<00000030< 20 41 3D 41  5E 53 20 42  3D 42 2D 43  20 43 3D 43   A=A^S B=B-C C=C
<00000040< 2D 41 20 41  3D 41 5E 42  00                        -A A=A^B.

Receive orderly release indication (T_ORDREL_IND = 132).

Send orderly release request (T_ORDREL_REQ = 109).

Send unbind request (T_UNBIND_REQ = 110).
#14
Battle.net Bot Development / Critque Me Please
August 27, 2005, 08:35 AM
I am a intermediate/advance REALbasic (similar to Visual Basic, but cross-platform) with a beginning knowledge of TCP/IP.

I got into Starcraft about 4 years ago, and have been playing avidly since (Blizzard injects crack though the mouse, or something...)

I worked for a while with iago on JavaOp, and decided to take a crack at it myself (although I will still be writing plugins for JavaOp).

I downloaded a few examples, converted them from VB to RB, and took a look. I quickly figured out it was going to be harder then it looks, and that I needed 2 connections, BNET and BNLS, not just one.

So I checked out BnetDocs (GJ Arga) and wrote a basic BNLS socket. I am sure there is a better way to do what I am doing, so please, tell me.

DataAvailable Event:

ParseData(me.ReadAll)
// me refers to the socket
// ReadAll is the equivalent of GetData(Var, String).


ParseData Method, Parameters data as string:

  Select Case Asc(Mid(Data, 3, 1))
  case GetPacketIDBNLS("CDKEY")
  case GetPacketIDBNLS("LOGONCHALLENGE")
  case GetPacketIDBNLS("LOGONPROOF")
  case GetPacketIDBNLS("CREATEACCOUNT")
  case GetPacketIDBNLS("CHANGECHALLENGE")
  case GetPacketIDBNLS("CHANGEPROOF")
  case GetPacketIDBNLS("UPGRADECHALLENGE")
  case GetPacketIDBNLS("UPGRADEPROOF")
  case GetPacketIDBNLS("VERSIONCHECK")
  case GetPacketIDBNLS("CONFIRMLOGON")
  case GetPacketIDBNLS("HASHDATA")
  case GetPacketIDBNLS("CDKEY_EX")
  case GetPacketIDBNLS("CHOOSENLSREVISION")
  case GetPacketIDBNLS("AUTHORIZE")
  case GetPacketIDBNLS("AUTHORIZEPROOF")
  case GetPacketIDBNLS("REQUESTVERSIONBYTE")
  case GetPacketIDBNLS("VERIFYSERVER")
  case GetPacketIDBNLS("RESERVESERVERLOTS")
  case GetPacketIDBNLS("SERVERLOGONCHALLENGE")
  case GetPacketIDBNLS("SERVERLOGONPROOF")
  end Select

// GetPacketIDBNLS returns the correct values.



I am also working on a packet builder, but I just wanted to get that part done. Are there better ways? Am I just completely wrong?



Thanks in advance, Ryan Marcus.