• Welcome to Valhalla Legends Archive.
 

Some help...

Started by AnThRaX-SOI, April 29, 2003, 11:42 PM

Previous topic - Next topic

AnThRaX-SOI

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.

Noodlez

yup, there is no With...End With

AnThRaX-SOI

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

tA-Kane

With...End With != If...End If
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Barumonk

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].

FyRe

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.

Skywing

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.

Camel

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 ;)

tA-Kane

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.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Skywing

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?

tA-Kane

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...
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Tazo


Arta

#12
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...

Camel

*sigh*
no appreciation for satire