• Welcome to Valhalla Legends Archive.
 

0x3a....

Started by BreW, October 28, 2006, 10:21 PM

Previous topic - Next topic

BreW

okay, so i want to make this bot. But bnet isn't replying to my 0x3a i send, and i have no clue why.
I'm using bncs for the hash password stuff
so its like this:

Private Sub Send0x3A()
Name = GetStuff("Main", "Username")
Pass = LCase(GetStuff("Main", "Password"))
  With pbuffer
    .InsertDWORD ClientToken
    .InsertDWORD ServerToken
    .InsertNonNTString doubleHashPassword(Pass, ClientToken, ServerToken)
    .InsertNTString Name
    .sendPacket &H3A
  End With
End Sub

okay it looks good, doesn't it? i don't get what's wrong though!



also, i know &w/e is the way you get a pointer ov a varible from c++, what's the vb equivalent?
this is off topic too, but why did I need to put a copy of bncsutil.dll in my system32 folder in order for vb to recognize it? does it have to be in other people's system32 folders too in order to connect my bot? if so then how do other people get it to work by just having it in the folder with the .exe!

FrostWraith

#1
Structurally, that is correct.  Show a packet log.  Could be your packet buffer I suppose.

BreW

i *ripped* the packet buffer from somechat src... too bad it doesn't even connect-.- (it crashes vb)
Here ill show you those functions....

Public Sub sendPacket(PPacketID As Byte)
On Error GoTo Err
    If Not Connected Then
      Dim sPacketString As String
      Select Case PPacketID
        Case &H25, &H14, &HB, &HC, &H3D
        Case &HA
          If Client = "WAR3" Then sPacketString = "A-B-C"
        Case Else
          sPacketString = Hex(PPacketID)
      End Select
      If LenB(sPacketString) > 0 Then AddChat vbYellow, "[BNET] Sending 0x" & sPacketString & "..."
    End If
    frmMain.WS.SendData Chr$(&HFF) & Chr$(PPacketID) & MakeWORD(Len(Buffer) + 4) & Buffer
    Buffer = vbNullString
Err:
End Sub

Public Function InsertNTString(Data As String)
    Buffer = Buffer & Data & vbNullChar
End Function

Public Function InsertNonNTString(Data As String)
    Buffer = Buffer & Data
End Function

Public Function InsertDWORD(Data As Long)
    Buffer = Buffer & MakeDWORD(Data)
End Function

as for the packetlog, ill do that later

FrostWraith

#3
You shouldn't be leeching code unless you know exactly how it works.  The code, unfortunatly should function, assuming the objects have been named correctly.  Are you saying that you get no response at all from bnet or just a failed message?  A packet log would be nice ....

BreW

#4
i was just gonna edit my second post with the packetlog...
anyways after the 0x51 responce, im sending the 0x3a perfect, but its not sending anything (according to packetmon) I totaly think its the pbuffer im using right now, and as for the leeching code part, I do know how it works.

i am not getting any error code of any kind, and if i bothered showing a packetlog it would be absolutely nothing but the raw header :(
and yes, all of the objects are named correctly, or else vb would've gave me a runtime error wouldn't it?

*2nd edit*
ive thought it over a bit more, and i think something is clearing the buffer just before the packet's sent. this bot isn't terribly different then the million others out there, i'm sure i'm not doing something wrong.

FrostWraith

Just do this for your packet log.  When packets are going out, addchat it to ur rtb (or wutever you are  using) and use a tohex() function on the data. Use grok's debug output function or something.

BreW

#6
where would i get this debug output function from.....

as for the display packets being sent think iv done that from the start:

[12:45:26 AM] >> Welcome to BreW Bot 1.0 by BreW!
[12:45:27 AM] [BNET] Winsock Connecting...
[12:45:27 AM] [BNET] Winsock Connected to 211.233.0.51!
[12:45:27 AM] [BNET] Sending 0x50...
[12:45:28 AM] [BNET] Received 0x50!
[12:45:28 AM] [BNET] Sending 0x51...
[12:45:28 AM] [BNET] Received 0x51!
[12:45:28 AM] [BNET] Sending 0x3A...

Hdx

http://botdev.valhallalegends.com/documents/vbdebugoutput.html
And try useing WPE it give a nice clean log. No header TCP info.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

BreW

okay, i will add the debug thing to my bot to see whats going on, as for the WPE kaspersky said its a virus and deleted it (Sniffer.Win32.WpePro.a), so i guess thats out.

Hdx

Eah jsut turn off your anti-virus when you run it. its not a virus, it just acts like one (hooks on to sockets and gains access to all its info, including sending custom packets)
Its a really good tool if you know how to use it.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

BreW

is it okay if i just stick to packetmon.... i really doubt this is about my packet monitor, its probably something in the pbuffer clearing my buffer right before i send it.
evidence: i send nothing, and i get a responce back from bnet of Nothing

topaz

#11
Your write -> packetbuffer sucks ass

Edit:

I forgot to mention that you must be a really bad coder if you can mess this up.
RLY...?

l2k-Shadow

BreW, even though you're a dumbass,  try switching the server you are connecting to, sometimes certain servers don't respond to 0x3A for an unknown reason.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

rabbit

Quote from: BreW on October 28, 2006, 11:27 PM
I do know how it works.

i am not getting any error code of any kind
Those two are mutually exclusive, kid.  "On Error GoTo Err" with no error handling at "Err:" will result in you not getting any error code of any kind.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

BreW

#14
okay, i think i know what MIGHT be the problem, im gonna try it out *brb*
and filip its not that, iv tried at least 10 diff servers

edit:

Okay, so i added a simple addchat to Err: on send packet and this is what i get:

[9:40:00 AM] >> Welcome to BreW Bot 1.0 by BreW!
[9:40:01 AM] [BNET] Winsock Connecting...
[9:40:01 AM] [BNET] Winsock Connected to 63.240.202.131!
[9:40:01 AM] [BNET] Sending 0x50...
[9:40:01 AM] Error at w/e
[9:40:01 AM] Error at w/e
[9:40:01 AM] [BNET] Received 0x50!
[9:40:01 AM] [BNET] Sending 0x51...
[9:40:01 AM] Error at w/e
[9:40:01 AM] [BNET] Received 0x51!
[9:40:01 AM] Error at w/e
[9:40:01 AM] [BNET] Sending 0x3A...
[9:40:01 AM] Error at w/e
[9:40:01 AM] 0x3A doesn't work

An error at every single packet? wtf!!!