• Welcome to Valhalla Legends Archive.
 

[VB6] Working SID_AUTH_INFO Code please

Started by Sorc.Polgara, August 05, 2004, 12:04 PM

Previous topic - Next topic

Sorc.Polgara

Can anyone please post a working code of the SID_AUTH_INFO packet for VB6 using a winsock?

I'd really appreciated it.  I'm sure that this would help me send other packets if I can just see a working one.  Thanks alot.

Perhaps using SC/BW.  Thanks again

Banana fanna fo fanna

hi guys,

can u plz giv me free sutff...i kno u workd hrd on it btu I NEEDZ IT!!!!! NOW!!!!

iago

#2
Quote from: bethra on August 05, 2004, 12:04 PM
Can anyone please post a working code
[...]
Perhaps using SC/BW.


I don't understand how I'm supposed to post code using SC/BW.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Sorc.Polgara

#3
Quote from: iago on August 05, 2004, 12:41 PM
Quote from: bethra on August 05, 2004, 12:04 PM
Can anyone please post a working code
[...]
Perhaps using SC/BW.


I don't understand how I'm supposed to post code using SC/BW.

No, I mean in the SID_AUTH_INFO packet your suppose to like put what product your using, Client ID or something...

Any client would make me happy.  thanks.  If you have code of this packet already written that would be nice, as long as it works. thanks alot

Quote
0x50 - SID_AUTH_INFO -

C => S

(DWORD) Protocol (0)
(DWORD) Platform ID
(DWORD) Client ID
(DWORD) Version code
(DWORD) Product language
(DWORD) Local IP address
(DWORD) Time zone information
(DWORD) Locale ID
(DWORD) Language ID
(STRING) Country abreviation
(STRING) Country name

Stealth

You just pasted in nearly all the information you need to assemble that packet. The rest you can find on BNetDocs.
- Stealth
Author of StealthBot

Sorc.Polgara

Quote from: $t0rm on August 05, 2004, 12:13 PM
hi guys,

can u plz giv me free sutff...i kno u workd hrd on it btu I NEEDZ IT!!!!! NOW!!!!

:(

jeeesh, I'm not trying to steal a project or anything.  I just need an example of a working bnet packet...

ffs, if i had know that i'd be mocked and flamed then.. ffs jeesh.

I didn't know this was a huge request.  if i didn't i wouldn't of posted.

I was taught in my hs c++ class that by looking at code you can interpret and learn from it.  all i'm trying to do is get something to learn from.  i thought that computer programming was something i wanted to do.  the past 3 years i've been planning to major in computer science. ffs

i thought that by seeing working code of a packet i could use it as a reference, learn, interpret it on my own.  i am aware of the fineline and ethics of programming and i don't plan to do them.  ffs

ffs if all i'm going to get is sarcasm, forget it.  what good is it to be in a forum where you have people unfriendly trying to get their +1 post count and put down others in the process? ffs

Sorc.Polgara

Quote from: Stealth on August 05, 2004, 01:12 PM
You just pasted in nearly all the information you need to assemble that packet. The rest you can find on BNetDocs.

Yes, i've read many posts with that exact answer.  i wouldn't of posted if i hadn't of looked there.  I haven't come here without having tried myself... i've practically memorized everything that i've read there, i've even saved pages, copy and pasted to text files everything.

maybe i'm just dumb, if so then i guess i'm just wasting my time.

Falcon[anti-yL]

Or maybe you should actually learn the language first before making a bot?

Sorc.Polgara

#8
Quote from: Falcon[anti-yL] on August 05, 2004, 01:25 PM
Or maybe you should actually learn the language first before making a bot?

I know the basics of vb6 and probably more.  C++ was just the class i refered to... they don't offer vb6 classes ofc.

like i said, I'm not coming in here totally unprepared.  I even have bought a book like ppl have suggested to others.   I know the basics and probably more. :\

I'm not a total noob :\ sigh

I can make a bot easily with CSB but that is not what i want to not use!  i feel that it is even lamer to use CSB than ask for a working example of code.

i can make a bot probably just as good as veebers triviabot, but what does that use? CSB.  The ez way out,  Nothing would be accomplished if I just used CSB.  If i can't get any help with a packet then perhaps I should just give up, b/c for ffs i'm not using CSB!

PaiD


Public Sub Send0x50()
frmMain.sckBNCS.SendData Chr$(1)
With PBuffer
 .InsertDWORD &H0
 .InsertNonNTString "68XI" & StrReverse(BNCS.Product)
 .InsertDWORD "&H" & Hex(VerByte)
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertNTString "USA"
 .InsertNTString "United States"
 .SendBNCS SID_AUTH_INFO
 .InsertDWORD &H0
 .SendBNCS SID_PING
End With
End Sub


This is what I use
For the Product I Store it as STAR or SEXP

Flame

Instead of just asking for a working example, try doing it yourself, and if you run into problems ask for help.  People will be more likely to help you with things that you've attempted, and can show that you've attempted, rather than just give out free code.  This has been discussed MANY times, so also try using the Search feature for help.

Sorc.Polgara

#11
Ok, here is my code, very simple and basically is just giving me feedback.  I'm also using DarkMinion's packet buffer.


'// fires when form is loaded
Sub Form_Load()
   '// nothing here
   '// lstDebug - ist I use to just let me know what is happening
   '// ws - name of the winsock object

End Sub

'// menu event fired when clicked
Private Sub mnuConnect_Click()

   Dim wsHost As String
   Dim wsPort As Long
   
   wsHost = "useast.battle.net"    '// host
   wsPort = 6112                   '// port
   
   '// make connection...
   ws.Connect wsHost, wsPort
   
End Sub

'// menu event fired when clicked
Private Sub mnuDisconnect_Click()
   
   '// closes the winsock, ws
   ws.Close
   '// clears the debug list
   lstDebug.Clear
   
End Sub

'// fires when a connection is made
Private Sub ws_Connect()
   
   '// shows me that the connection was successful
   lstDebug.AddItem "Successfully Connected!"
   
   '// calls Private Sub SID_AUTH_INFO
   SID_AUTH_INFO

End Sub

'// winsock event that fires when a packet has been sent
Private Sub ws_SendComplete()

   '// shows me that the packet has been sent
   lstDebug.AddItem "Packet has been sent."

End Sub

'// winsock event that fires when data is recieved
Private Sub ws_DataArrival(ByVal bytesTotal As Long)
   
   '// shows me that data from the server has been recieved/arrived
   lstDebug.AddItem "Data Recieved!"
   
End Sub

'// winsock event that fires when the connection has been terminated
Private Sub ws_Close()

   '// shows me that the connection has been terminated/disconnected
   lstDebug.AddItem "Disconnected!"

End Sub

'// assembles SID_AUTH_INFO (0x50) bnet packet
Private Sub SID_AUTH_INFO()

   '// create a packetbuffer object named PBuf
   Dim PBuf As PacketBuffer
   '// Make PBuf a new packetbuffer
   Set PBuf = New PacketBuffer
   
   '// with statement using the PBuf object
   With PBuf
       .InsertDWORD 0                      '// Protocol ID. Always 0.
       .InsertNonNTString "68XI"           '// Platform ID. 'IX86'
       .InsertNonNTString "RATS"           '// Product ID. 'STAR'
       .InsertDWORD &HC9                   '// Version byte.
       .InsertDWORD 0                      '// Product language.*
       .InsertDWORD 0                      '// Local IP, for NAT compatibility.*
       .InsertDWORD 0                      '// Time zone.*
       .InsertDWORD 0                      '// Locale ID.*
       .InsertDWORD 0                      '// Language ID.*
       .InsertNTString "USA"                 '// Country abbreviation. "USA"
       .InsertNTString "United States"  '// Country name.
       .SendPacket ws, &H50                '// Send packet.
                                                           '// ws = winsock
                                                           '// &H50 (0x50) = Packet ID
   End With
End Sub


After clicking the mnuConnect.  This is what I get in the lstDebug.
Quote
Successfully Connected!
Packet has been sent.
Disconnected!

There must be something wrong with the packet else Bnet would return a packet and I would see:
Quote
Successfully Connected!
Packet has been sent.
Data Recieved!
Disconnected!

....

MyndFyre

Just out of curiousity....  Why are you using // after the ' comment delimiter?

It really just looks funny....  I'm not saying that there's anything wrong with it, but VB programmers unfamiliar with C++-style comments might say, "what's that?"
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Tuberload

Quote from: Myndfyre on August 05, 2004, 03:25 PM
Just out of curiousity....  Why are you using // after the ' comment delimiter?

It really just looks funny....  I'm not saying that there's anything wrong with it, but VB programmers unfamiliar with C++-style comments might say, "what's that?"

My guess would be personal preference.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Sorc.Polgara

#14
Quote from: DueL on August 05, 2004, 02:14 PM

Public Sub Send0x50()
frmMain.sckBNCS.SendData Chr$(1)
With PBuffer
 .InsertDWORD &H0
 .InsertNonNTString "68XI" & StrReverse(BNCS.Product)
 .InsertDWORD "&H" & Hex(VerByte)
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertDWORD &H0
 .InsertNTString "USA"
 .InsertNTString "United States"
 .SendBNCS SID_AUTH_INFO
 .InsertDWORD &H0
 .SendBNCS SID_PING
End With
End Sub


This is what I use
For the Product I Store it as STAR or SEXP

Hmm what is the buffer class u are using?

@mynd
Its more easy on the eyes?  I mean it helps make the comments stand out more for me.  I've also seen other peeps u it and I find that their way of doing is something that suits me better to.  I learned basic C++ before I VB so I kind of am more... well hard to explain.