Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: AnThRaX-SOI on April 29, 2003, 11:42 PM

Title: Some help...
Post by: AnThRaX-SOI on April 29, 2003, 11:42 PM
Can someone tell me if there is anything wrong with the following code?

       .InsertDWORD &H0
       .InsertNonNTString "68XINB2W"
       .InsertDWORD &H4F
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50


If there is nothing wrong with this I'll start asking more questions.
Title: Re:Some help...
Post by: Noodlez on April 29, 2003, 11:46 PM
yup, there is no With...End With
Title: Re:Some help...
Post by: AnThRaX-SOI on April 29, 2003, 11:49 PM
Sorry let me fix that...

   If ReadINI("Config", "Client", FixPath(App.Path) & "Config.ini") = "W2BN" Then
       .InsertDWORD &H0
       .InsertNonNTString "68XINB2W"
       .InsertDWORD &H4F
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End If
Title: Re:Some help...
Post by: tA-Kane on April 29, 2003, 11:54 PM
With...End With != If...End If
Title: Re:Some help...
Post by: Barumonk on April 30, 2003, 12:24 AM
To answer your question, the packet is built correctly but it doesn't seem as you have given the required code to make it "work".  Assuming "Packet" is the reference used to the PacketBuffer Class:

With Packet
   'Build Here, example: .InsertDWORD &H0
End With

A suggestion is to check to make sure its using WarCraft II BNE before initiating a connection, it would be pointless to connect, send your Protocol byte only to stop right there... or you could just set it up for use with any product.  Also ".InsertDWORD &H360", you might wanna customize that unless you want everyone who uses it's timezone to be GMT -6 [Central Time Zone, North America].
Title: Re:Some help...
Post by: FyRe on April 30, 2003, 06:38 AM
Good Reply Barumonk..
Also you could have added the more dynamic results for the other entries.
After entering the version byte, for language you could use: &H409 and for the Local IP:
You could use inet_addr (See Below) to set a more dynamic result instead of &H0
Public Declare Function inet_addr Lib "wsock32.dll" (ByVal cp As String) As Long
Just a minor note for the Time Zone this is the formula:
"&H" & (-60 * -LOCATION) where LOCATION is your GMT Time Zone.  Use your Date/Time to determine the number for your location.
Title: Re:Some help...
Post by: Skywing on April 30, 2003, 12:08 PM
Quote from: AnThRaX-SOI on April 29, 2003, 11:49 PM
Sorry let me fix that...

   If ReadINI("Config", "Client", FixPath(App.Path) & "Config.ini") = "W2BN" Then
       .InsertDWORD &H0
       .InsertNonNTString "68XINB2W"
       .InsertDWORD &H4F
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End If

The current version of War2BNE does not use SID_AUTH_*.  Use these at risk of your program being easily IP-banned at Blizzard's whim.
Title: Re:Some help...
Post by: Camel on April 30, 2003, 03:51 PM
Quote from: Skywing on April 30, 2003, 12:08 PM
Quote from: AnThRaX-SOI on April 29, 2003, 11:49 PM
Sorry let me fix that...

   If ReadINI("Config", "Client", FixPath(App.Path) & "Config.ini") = "W2BN" Then
       .InsertDWORD &H0
       .InsertNonNTString "68XINB2W"
       .InsertDWORD &H4F
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End If

The current version of War2BNE does not use SID_AUTH_*.  Use these at risk of your program being easily IP-banned at Blizzard's whim.

true, but it is unlikely that they would. the protocol so far has only become less strict, a small and silent victory for bot developers. perhaps this could be due to the server being extremely time critical? it's not worth their (cpu) time to go through all of the six or seven lines of code that would be required to prevent an "incorrect" login ;)
Title: Re:Some help...
Post by: tA-Kane on April 30, 2003, 04:06 PM
Quote from: Camel on April 30, 2003, 03:51 PMit's not worth their (cpu) time to go through all of the six or seven lines of code that would be required to prevent an "incorrect" login
If you'd think it through, you'd realize that doing such would save them CPU time both in the short term and the long term.

The first mistake a client would make is sending 0x50 instead of 0x1E. Doing a simple check of the product when receiving 0x50, and then disconnecting, would save CPU time compared against the whole 0x50 and 0x51 login process.

Now think of the CPU time that the user would no longer take up doing "normal" bot actions; joining channels, enter/leave chat, kicking, banning, getting banned, chatting, whispering, etc.
Title: Re:Some help...
Post by: Skywing on April 30, 2003, 05:12 PM
Quote from: Camel on April 30, 2003, 03:51 PM
Quote from: Skywing on April 30, 2003, 12:08 PM
Quote from: AnThRaX-SOI on April 29, 2003, 11:49 PM
Sorry let me fix that...

   If ReadINI("Config", "Client", FixPath(App.Path) & "Config.ini") = "W2BN" Then
       .InsertDWORD &H0
       .InsertNonNTString "68XINB2W"
       .InsertDWORD &H4F
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertDWORD &H360
       .InsertDWORD GetSystemDefaultLCID
       .InsertDWORD GetSystemDefaultLangID
       .InsertNTString "USA"
       .InsertNTString "United States"
       .SendPacket &H50
   End If

The current version of War2BNE does not use SID_AUTH_*.  Use these at risk of your program being easily IP-banned at Blizzard's whim.

true, but it is unlikely that they would. the protocol so far has only become less strict, a small and silent victory for bot developers. perhaps this could be due to the server being extremely time critical? it's not worth their (cpu) time to go through all of the six or seven lines of code that would be required to prevent an "incorrect" login ;)
Encrypted War3X protocol, anyone?
Title: Re:Some help...
Post by: tA-Kane on April 30, 2003, 05:33 PM
Quote from: Skywing on April 30, 2003, 05:12 PM
Quote from: Camel on April 30, 2003, 03:51 PMtrue, but it is unlikely that they would. the protocol so far has only become less strict, a small and silent victory for bot developers. perhaps this could be due to the server being extremely time critical? it's not worth their (cpu) time to go through all of the six or seven lines of code that would be required to prevent an "incorrect" login ;)
Encrypted War3X protocol, anyone?
Sounds good to me...
Title: Re:Some help...
Post by: Tazo on April 30, 2003, 06:34 PM
Quote from: Skywing on April 30, 2003, 05:12 PM
Encrypted War3X protocol, anyone?
Sure...
Title: Re:Some help...
Post by: Arta on April 30, 2003, 10:26 PM
Quote from: Camel on April 30, 2003, 03:51 PM
the protocol so far has only become less strict, a small and silent victory for bot developers.

That's entirely nonsensical. The only thing that's been relaxed is IPBan, and we're not even sure about that. Blizzard have introduced more restrictions in the last few months than I can even remember all at once. NLS. Restricted non-keyed clients. Encrypted W3XP-proto. Establishment of NLS in current post-SC clients to supercede current protocol at some point in the future. Temporary bans for too many logon attempts. Bans for incorrect information in game reports.

The list just goes on and on...
Title: Re:Some help...
Post by: Camel on May 03, 2003, 09:09 PM
*sigh*
no appreciation for satire