• Welcome to Valhalla Legends Archive.
 

Rudimentary Warden information

Started by iago, February 28, 2008, 05:07 PM

Previous topic - Next topic
|

iago

Quote from: Rob on March 10, 2008, 09:12 PM
Quote from: Hdx on March 10, 2008, 08:58 PM
Unless I was mistaken while reading Maiev.mod [SC's warden loader] only packets 0-2 are supported. It simply ignores other opcodes.

You are correct.  Maiev.mod only has handling for 0x00, 0x01, and 0x02.  Once the new module is prepared, Maive is unloaded and the new module is loaded in its place.  The new module takes over for Maive to handle packets, crypto, etc.

That's exactly what I said on my wiki. :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Ringo

hmm, im trying to read the ASM for the defalt module's 0x02 handler, but i dunno if im reading this correctly.
From what i can see at the moment, it checks the 1st byte into the packet (after 0x02), if that lengh if over 0x00 it does the following:
grabs the byte, reads that lengh into the packet, then creates a SHA1 hash and a MD5 hash of that string and sends it back.
If the lengh is 0x00, it sends back a SHA1 and MD5 hash of "" (nothing)
If the lengh byte contains a lengh that exeeds the lengh of the following data, it does nothing/sends back no responce?

Basicly, the following?
Request:

(BYTE) 0x02 - packet ID
(BYTE) Lengh of data to read
(VOID) data

Responce:

(BYTE) 0x02 - Packet ID
(VOID[20]) SHA1 hash of string
(VOID[16]) MD5 hash of string

unless im missing somthing, isnt that pretty pointless?
Unless, like in d2, the string is a file name of an MPQ file to hash, but im not seeing anything that would do this.. odd.
Can anyone verify this?

Barabajagal

Any info on how the checksums are generated yet?

Ringo

hmm, anyone else willing to contribute to this?
I dont really feel like working on any of this stuff anymore, not untill I see some input from others, its gone kind of dead.
I would have thought many people would have jumped at continueing where iago left off, there is still much to do!
Lets see some team spirit :)

Quote from: Andy on March 18, 2008, 03:11 AM
Any info on how the checksums are generated yet?
With a mathmatical algorithm found with in the warden module you download!
I have made a start on reverseing it, but I have no plans on continueing.
Why dont you start working on this stuff, rather than waiting for info to use to get your bot working.
Who knows, you might even learn somthing!
Afaik, After all, that is what iago started this for, right?
Big thx iago!

Aside, can anyone verify this, for the defalt module?
Request:

(BYTE) 0x02 - packet ID
(BYTE) Lengh of data to read
(VOID) data

Responce:

(BYTE) 0x02 - Packet ID
(VOID[20]) SHA1 hash of data
(VOID[16]) MD5 hash of data

Barabajagal

Cause, as I've stated many times before, I have no interest in reversing the work of others, only in creating my own.

And for packet 0x02... I thought it worked like:
    (BYTE) Event #
    Loop until one byte is left:
        (WORD) Command
        (DWORD) Address
        (BYTE) Length to Read
    (BYTE) Unknown

(BYTE) Event #
    (DWORD) Checksum
    Loop for each item requested:
        (BYTE) 0
        (VOID) Raw memory data

Or are we talking about different things?

Ringo

Quote from: Andy on March 19, 2008, 01:48 AM
Cause, as I've stated many times before, I have no interest in reversing the work of others, only in creating my own.
Then why do you want to use the work of others? :p aside, your missing the point.
Quote
And for packet 0x02... I thought it worked like:
    (BYTE) Event #
    Loop until one byte is left:
        (WORD) Command
        (DWORD) Address
        (BYTE) Length to Read
    (BYTE) Unknown

(BYTE) Event #
    (DWORD) Checksum
    Loop for each item requested:
        (BYTE) 0
        (VOID) Raw memory data

Or are we talking about different things?
Yeah, im talking about the defalt module, maive.mod or w/e its called -- the one built into the client

replaced

#81
My bot gets on bnet on starcraft but then when it responds to the warden it gets disconnected.  Here is packet log of this.


1  192.168.0.100:3539  63.240.202.126:6112  59  Send 
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45    ..P:.....68XIPXE
0010  53 D1 00 00 00 00 00 00 00 00 00 00 00 00 00 00    S...............
0020  00 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69    .........USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                             ted States.

2  63.240.202.126:6112  192.168.0.100:3539  70  Recv 
0000  FF 25 08 00 4A 61 A4 EE FF 50 3E 00 00 00 00 00    .%..Ja...P>.....
0010  6D 2F AE 03 E0 4C 13 00 00 BA F7 D9 72 FC C6 01    m/...L......r...
0020  6C 6F 63 6B 64 6F 77 6E 2D 49 58 38 36 2D 31 33    lockdown-IX86-13
0030  2E 6D 70 71 00 B5 EE 5D A9 2A E6 33 2A C4 77 3B    .mpq...].*.3*.w;
0040  4C DA 53 76 F6 00                                                      L.Sv..

3  192.168.0.100:3539  63.240.202.126:6112  8  Send 
0000  FF 25 08 00 00 00 00 00                            .%......

4  192.168.0.100:3539  63.240.202.126:6112  86  Send 
0000  FF 51 56 00 D2 02 96 49 01 02 0F 01 D6 1E B2 89    .QV....I........
0010  01 00 00 00 00 00 00 00 0D 00 00 00 02 00 00 00    ................
0020  E1 30 1F 00 00 00 00 00 43 8F D7 37 D8 B0 80 23    .0......C..7...#
0030  95 AF D8 17 7A 79 11 17 72 D9 1D F0 E5 3B 9A FB    ....zy..r....;..
0040  6E 70 92 12 96 32 95 F0 21 28 B8 92 00 4B 7A 55    np...2..!(...KzU
0050  4C 5A 70 49 56 00                                                     LZpIV.

5  63.240.202.126:6112  192.168.0.100:3539  9  Recv 
0000  FF 51 09 00 00 00 00 00 00                         .Q.......

6  192.168.0.100:3539  63.240.202.126:6112  53  Send 
0000  FF 14 08 00 74 65 6E 62 FF 3A 2D 00 59 49 6E 01    ....tenb.:-.YIn.
0010  6D 2F AE 03 A8 61 3A BE 7D 75 AD E8 DA 2D BA A9    m/...a:.}u...-..
0020  F4 28 4C 26 CC 9F 64 28 69 68 61 74 65 77 61 72    .(L&..d(ihatewar
0030  64 65 6E 33 00                                                           den3.

7  63.240.202.126:6112  192.168.0.100:3539  12  Recv 
0000  FF 59 04 00 FF 3A 08 00 00 00 00 00                .Y...:......

8  192.168.0.100:3539  63.240.202.126:6112  6  Send 
0000  FF 0A 06 00 00 00                                  ......

9  63.240.202.126:6112  192.168.0.100:3539  41  Recv 
0000  FF 5E 29 00 44 0D 06 0F 85 C0 E4 F3 D6 14 C1 EB    .^).D...........
0010  B7 F9 82 25 74 D8 7A 2F 07 25 4A 21 4B 65 02 07    ...%t.z/.%J!Ke..
0020  EC B6 52 D0 8C CE 27 02 57                                      ..R...'.W

10  192.168.0.100:3539  63.240.202.126:6112  47  Send 
0000  FF 5E  2F 00 01 CF 7C 29 30 78  F4 12 97 54 F5 A4      .^/...|)0x...T..
0010  36 4B 3D 39 47 EA 4E 6C DE 0D 3B 8C 0B F1 0F B1    6K=9G.Nl..;.....
0020  49 09 74 6D 88 48 CA C7 33 CB 7F B9 22 0F 00          I.tm.H..3..."..

BOOM DISCONNECT


After sending my response to warden (5E) I get disconnected I used code that ANDY posted.

Anyone see what I did wrong?  I'm really tired atm, so its possible i made some big mistakes -
Don't program when your really tired because you waste time   ;D

-CODE-

        With clsP
        .SetBuffer dAta
            .Skip 1
            .Skip 2
            PackID = .GetByte
        End With
    Select Case PackID
        Case &H0
            pMD5 = clsP.GetString '(16)
            pKey = clsP.GetString '(16)
            pLen = clsP.GetDWORD

with clsp
                .InsertBYTE &H1
                ToSend = DoCryptWarden(dAta, wKeyOut)
                .InsertString ToSend
                .sendPacket frmMain.sckBot, &H5E, iNdex
end with


Thats it, nothing else


Public Function DoCryptWarden(ByVal sData As String, ByRef sKey As String) As String
Dim bKey() As Byte
Dim dAta() As Byte
Dim i      As Long
Dim temp   As Byte
Dim Y      As Long
Dim Z      As Long

    StrToByteArrayWarden sKey, bKey

    Y = bKey(&H100)
    Z = bKey(&H101)
    StrToByteArrayWarden sData, dAta
    For i = 0 To UBound(dAta)
        Y = (Y + 1) And &HFF
        Z = (Z + bKey(Y)) And &HFF
        temp = bKey(Y)
        bKey(Y) = bKey(Z)
        bKey(Z) = temp
        dAta(i) = dAta(i) Xor bKey((CInt(bKey(Y)) + CInt(bKey(Z))) And &HFF)
    Next i
    bKey(&H100) = Y
    bKey(&H101) = Z
    sKey = ByteArrayToStrWarden(bKey)
    DoCryptWarden = ByteArrayToStrWarden(dAta)
End Function


instead of class module i moved it to a regular module


Option Explicit
Private Declare Function StandardSHA Lib "RSHA.dll" (sVal As String) As String
Private Position        As Long
Private RandomData()    As Byte
Private RandomSource1() As Byte
Private RandomSource2() As Byte


Also, is position,RandomData, RandomSource1, RandomSource2 something that needs to be saved for later use?


dim stringforwarden as string * 20
            InitializeWarden Left$(stringforwarden , 4)


string for warden doesn't contain anything but 20 null values when passed onto InitializeWarden


wKeyOut = SimpleCryptWarden(GetBytesWarden(&HF))
wKeyIn = SimpleCryptWarden(GetBytesWarden(&HF))



Public Function GetBytesWarden(ByVal Bytes As Long) As String
Dim i           As Integer
Dim Buffer()    As Byte
    ReDim Buffer(Bytes) As Byte
    For i = 0 To Bytes
        Buffer(i) = GetByteWarden
    Next i
    GetBytesWarden = ByteArrayToStrWarden(Buffer)
End Function


Public Function ByteArrayToStrWarden(ByRef bByt() As Byte) As String
Dim sStr As String
Dim i    As Integer
    For i = 1 To UBound(bByt) + 1
        sStr = sStr & Chr$(bByt(i - 1))
    Next i
    ByteArrayToStrWarden = sStr
End Function


Help pls, I havn't gotten enough sleep last night and the sun is going to rise soon.

brew

#82
Hyyyy replaced, why wont my vee bee six code work? I ripped it straight from AssBot and it doesnt even connekct lol!!1 W T F!! I dee kay what i might be doing RONG, bekauze i was teird whan i waz implomenting the BOT in my PORGRAM (lol u shuld never kode when u r tierd):
-CODE-
Private Sub cboChat_KeyPress(KeyAscii As Integer)
    Dim i&
    Dim s$
    Dim r&
   
    If Len(cboChat.Text) > 255 Then KeyAscii = 0
    If (KeyAscii = vbKeyReturn) And (cboChat.Text <> "") And (wskBNet.State = 7) Then
        wskBNet.SendData cboChat.Text & vbCrLf
        If g_Telnet Then
            tmrDelay.Enabled = True
            Do While tmrDelay.Enabled
                DoEvents
            Loop
        End If
        If Left(cboChat.Text, 1) <> "/" Then AddChat vbCyan, "<" & g_ConnectedUsername & "> ", vbWhite, cboChat.Text
        s = cboChat.Text
        For i = (cboChat.ListCount - 1) To 1 Step -1
            cboChat.List(i) = cboChat.List(i - 1)
        Next i
        cboChat.List(0) = s
        cboChat.Text = ""
    ElseIf (KeyAscii = vbKeyReturn) And (cboChat.Text <> "") And (wskBNet.State <> 7) Then
        r = MsgBox("You are currently not connected.  You need to be connected to send messages." & _
vbNewLine & "Would you like to connect now?", vbYesNo + vbQuestion, App.Title & " Error")
        If r = vbYes Then mnuConnect_Click
    End If
End Sub

leik i saids it doent evn konect so pls help me pls pls pls
im pretty sure that is the conect coed so tell me wut is rong with that
her is my Packet Log.

03 04 49 20 4C 4F 56 45 20 52 45 53 45 52 56 45 44 0D 0A 21 21 31 0D 0A


thankx in advanced


On a serious note, do you understand what you're supposed to be passing as the first parameter of initalizewarden? The entire point of the encryption is to use the first dword of the cdkey hash as the base encryption seed. I've lost count of how many times that was said in this thread.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Dale

Quote from: brew on March 30, 2008, 08:11 AM
Hyyyy replaced, why wont my vee bee six code work? I ripped it straight from AssBot and it doesnt even connekct lol!!1 W T F!! I dee kay what i might be doing RONG, bekauze i was teird whan i waz implomenting the BOT in my PORGRAM (lol u shuld never kode when u r tierd):
-CODE-
Private Sub cboChat_KeyPress(KeyAscii As Integer)
    Dim i&
    Dim s$
    Dim r&
   
    If Len(cboChat.Text) > 255 Then KeyAscii = 0
    If (KeyAscii = vbKeyReturn) And (cboChat.Text <> "") And (wskBNet.State = 7) Then
        wskBNet.SendData cboChat.Text & vbCrLf
        If g_Telnet Then
            tmrDelay.Enabled = True
            Do While tmrDelay.Enabled
                DoEvents
            Loop
        End If
        If Left(cboChat.Text, 1) <> "/" Then AddChat vbCyan, "<" & g_ConnectedUsername & "> ", vbWhite, cboChat.Text
        s = cboChat.Text
        For i = (cboChat.ListCount - 1) To 1 Step -1
            cboChat.List(i) = cboChat.List(i - 1)
        Next i
        cboChat.List(0) = s
        cboChat.Text = ""
    ElseIf (KeyAscii = vbKeyReturn) And (cboChat.Text <> "") And (wskBNet.State <> 7) Then
        r = MsgBox("You are currently not connected.  You need to be connected to send messages." & _
vbNewLine & "Would you like to connect now?", vbYesNo + vbQuestion, App.Title & " Error")
        If r = vbYes Then mnuConnect_Click
    End If
End Sub

leik i saids it doent evn konect so pls help me pls pls pls
im pretty sure that is the conect coed so tell me wut is rong with that
her is my Packet Log.

03 04 49 20 4C 4F 56 45 20 52 45 53 45 52 56 45 44 0D 0A 21 21 31 0D 0A


thankx in advanced


On a serious note, do you understand what you're supposed to be passing as the first parameter of initalizewarden? The entire point of the encryption is to use the first dword of the cdkey hash as the base encryption seed. I've lost count of how many times that was said in this thread.

By reading your retarded post I think I just left this thread more of an idiot as when I opened it.

replaced

WTF is wrong with you people!

first someone tell me what value exactly do i put in InitializeWarden??

then is this code correct?


            With clsP
                .InsertBYTE &H1
                ToSend = DoCryptWarden(Data, wKeyOut)
                .InsertString ToSend
                .sendPacket frmMain.sckBot, &H5E
            End With


what does Data supposed to consist of?  The entire packet?

Barabajagal

Make a clsWarden file, with the following (trimmed and updated) code:
Option Explicit
Private Declare Function StandardSHA Lib "RSHA.dll" (sVal As String) As String
Private Position        As Long
Private RandomData()    As Byte
Private RandomSource1() As Byte
Private RandomSource2() As Byte
Private Function RShift(ByVal pnValue As Double, ByVal pnShift As Long) As Long
Dim Shft As String
  Shft = Str$(pnValue / (2 ^ pnShift))
  If InStr(Shft, ".") > 0 Then
    RShift = CLng(Left$(Shft, InStr(Shft, ".") - 1))
  Else
    RShift = CLng(Shft)
  End If
End Function
Public Sub Initialize(Seed As String)
Dim Length1 As Long
Dim Length2 As Long
Dim Seed1() As Byte
Dim Seed2() As Byte
Dim I       As Long
  Length1 = RShift(Len(Seed), 1)
  Length2 = Len(Seed) - Length1
  ReDim Seed1(Length1 - 1)
  ReDim Seed2(Length2 - 1)
  StrToByteArray Mid$(Seed, 1, Length1), Seed1
  StrToByteArray Mid$(Seed, Length1 + 1, Length2), Seed2
  ReDim RandomData(&H13) As Byte
  StrToByteArray StandardSHA(ByteArrayToStr(Seed1)), RandomSource1
  StrToByteArray StandardSHA(ByteArrayToStr(Seed2)), RandomSource2
  Update
  Position = 0
End Sub
Private Sub Update()
  StrToByteArray StandardSHA(ByteArrayToStr(RandomSource1) & ByteArrayToStr(RandomData) & ByteArrayToStr(RandomSource2)), RandomData
End Sub
Private Function GetByte() As Byte
  GetByte = RandomData(Position)
  Position = Position + 1
  If Position >= &H14 Then
    Position = 0
    Update
  End If
End Function
Public Function GetBytes(ByVal bytes As Long) As String
Dim I        As Integer
Dim Buffer() As Byte
  ReDim Buffer(bytes) As Byte
  For I = 0 To bytes
    Buffer(I) = GetByte
  Next I
  GetBytes = ByteArrayToStr(Buffer)
End Function
Public Sub StrToByteArray(ByVal sStr As String, ByRef Ary() As Byte)
Dim I As Integer
  ReDim Ary(Len(sStr) - 1) As Byte
  RtlMoveMemory Ary(0), ByVal sStr, Len(sStr)
End Sub
Public Function ByteArrayToStr(ByRef bByt() As Byte, Optional ByVal lLoc As Long = 0) As String
Dim sStr As String
Dim I    As Integer
  sStr = String$(UBound(bByt) + 1, 0)
  RtlMoveMemory ByVal sStr, bByt(lLoc), UBound(bByt) + 1
  ByteArrayToStr = sStr
End Function
Public Sub SimpleCrypt(ByRef bBase() As Byte, ByRef bKey() As Byte)
Dim lVal    As Long
Dim I       As Long
Dim lPos    As Long
Dim temp    As Byte
  ReDim bKey(&H101) As Byte
  For I = 0 To &HFF
    bKey(I) = I
  Next I
  For I = 1 To &H40
    lVal = lVal + bKey(I * 4 - 4) + bBase(lPos Mod (UBound(bBase) + 1))
    lPos = lPos + 1
    temp = bKey(I * 4 - 4)
    bKey(I * 4 - 4) = bKey(lVal And &HFF)
    bKey(lVal And &HFF) = temp
    lVal = lVal + bKey(I * 4 - 3) + bBase(lPos Mod (UBound(bBase) + 1))
    lPos = lPos + 1
    temp = bKey(I * 4 - 3)
    bKey(I * 4 - 3) = bKey(lVal And &HFF)
    bKey(lVal And &HFF) = temp
    lVal = lVal + bKey(I * 4 - 2) + bBase(lPos Mod (UBound(bBase) + 1))
    lPos = lPos + 1
    temp = bKey(I * 4 - 2)
    bKey(I * 4 - 2) = bKey(lVal And &HFF)
    bKey(lVal And &HFF) = temp
    lVal = lVal + bKey(I * 4 - 1) + bBase(lPos Mod (UBound(bBase) + 1))
    lPos = lPos + 1
    temp = bKey(I * 4 - 1)
    bKey(I * 4 - 1) = bKey(lVal And &HFF)
    bKey(lVal And &HFF) = temp
  Next I
End Sub
Public Sub DoCrypt(ByRef bData() As Byte, ByRef bKey() As Byte, ByRef bRet() As Byte)
Dim I      As Long
Dim temp   As Byte
Dim Y      As Long
Dim Z      As Long
  ReDim bRet(UBound(bData))
  RtlMoveMemory bRet(0), bData(0), UBound(bData) + 1
  Y = bKey(&H100)
  Z = bKey(&H101)
  For I = 0 To UBound(bData)
    Y = (Y + 1) And &HFF
    Z = (Z + bKey(Y)) And &HFF
    temp = bKey(Y)
    bKey(Y) = bKey(Z)
    bKey(Z) = temp
    bRet(I) = bRet(I) Xor bKey((CInt(bKey(Y)) + CInt(bKey(Z))) And &HFF)
  Next I
  bKey(&H100) = Y
  bKey(&H101) = Z
End Sub


In your BNCS connection code, add the following private declarations:
Private cWarden         As New clsWarden
Private wKeyOut()       As Byte
Private wKeyIn()        As Byte


In SID_AUTH_CHECK, somewhere after hashing your CDKey, add:
    cWarden.Initialize Left$(KeyHash, 4)
    cWarden.StrToByteArray cWarden.GetBytes(&HF), bRet()
    cWarden.SimpleCrypt bRet(), wKeyOut()
    cWarden.StrToByteArray cWarden.GetBytes(&HF), bRet()
    cWarden.SimpleCrypt bRet(), wKeyIn()


To handle SID_Warden (5E):
Private Sub SID_Recv_Warden()
Dim bData()       As Byte
Dim bRet()        As Byte
Dim sData         As String
Dim lPos          As Long
Dim nFile         As Integer
Dim EventNo       As Byte
Dim I             As Long
Dim Loops         As Long
Dim Vals()        As String
Dim addr()        As Long
Dim readlen       As Byte
Dim ToSend        As String
Dim Checksum      As Long
Const Req1        As Long = &H497FB0
Const Req2        As Long = &H49C33D
Const Req3        As Long = &H4A2FF7
  sData = Packet.GetNull
  cWarden.StrToByteArray sData, bData()
  cWarden.DoCrypt bData(), wKeyIn(), bRet()
  Select Case bRet(0)
    Case &H0
      Packet.ClearOutbound
      ReDim bData(0)
      bData(0) = &H1
      cWarden.DoCrypt bData(), wKeyOut(), bRet()
      Packet.InsertString cWarden.ByteArrayToStr(bRet())
      AddQueue Packet.SendBNCSPacket(SID_WARDEN)
    Case &H2
      If LenB(Dir$(CFm_HashPath & "\StarCraft.exe")) > 0 Then
        EventNo = bRet(1)
        Loops = (Len(sData) - 3) / 7
        ReDim Vals(Loops - 1) As String
        ReDim addr(Loops - 1) As Long
        nFile = FreeFile
        Open CFm_HashPath & "\StarCraft.exe" For Binary Access Read As #nFile
        lPos = 2
        For I = 0 To Loops - 1
          lPos = lPos + 2
          RtlMoveMemory addr(I), bRet(lPos), 4
          lPos = lPos + 4
          readlen = bRet(lPos)
          lPos = lPos + 1
          Vals(I) = String$(readlen, 0)
          Get #nFile, addr(I) - &H400000 + 1, Vals(I)
        Next I
        Close #nFile
        If addr(0) = Req1 And addr(1) = Req2 And addr(2) = Req3 Then
          Checksum = &H193E73E8
        ElseIf addr(0) = Req2 And addr(1) = Req1 And addr(2) = Req3 Then
          Checksum = &HD6557DEF
        ElseIf addr(0) = Req1 And addr(1) = Req3 And addr(2) = Req2 Then
          Checksum = &H2183172A
        ElseIf addr(0) = Req2 And addr(1) = Req3 And addr(2) = Req1 Then
          Checksum = &HCA841860
        ElseIf addr(0) = Req3 And addr(1) = Req2 And addr(2) = Req1 Then
          Checksum = &H9F2AD2C3
        ElseIf addr(0) = Req3 And addr(1) = Req1 And addr(2) = Req2 Then
          Checksum = &HC04CF757
        Else
          RaiseEvent BNetError("Unknown Warden Request! You will be disconnected in two minutes.")
          Exit Sub
        End If
        Packet.ClearOutbound
        For I = 0 To Loops - 1
            Packet.InsertByte &H0
            Packet.InsertString Vals(I)
        Next I
        ToSend = Packet.GetOutbound
        ToSend = Chr$(&H2) & Packet.CreateWORD(Len(ToSend)) & Packet.CreateDWORD(Checksum) & ToSend
        cWarden.StrToByteArray ToSend, bData()
        Packet.ClearOutbound
        cWarden.DoCrypt bData(), wKeyOut(), bRet()
        Packet.InsertString cWarden.ByteArrayToStr(bRet())
        AddQueue Packet.SendBNCSPacket(SID_WARDEN)
      Else
        RaiseEvent BNetError("Can't respond to Warden without StarCraft.exe!")
      End If
    Case Else
      RaiseEvent BNetError("Unknown Warden Packet: " & StH(sData))
  End Select
End Sub


That may make things a bit easier to understand.

brew

Quote from: Dale on March 30, 2008, 01:15 PM
By reading your retarded post I think I just left this thread more of an idiot as when I opened it.
Holy shit, if you think that post was retarded, then why not say the same about replaced's?
And I don't ever remember asking for your opinion.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Barabajagal


Dale

Quote from: brew on March 30, 2008, 02:32 PM
Quote from: Dale on March 30, 2008, 01:15 PM
By reading your retarded post I think I just left this thread more of an idiot as when I opened it.
Holy shit, if you think that post was retarded, then why not say the same about replaced's?
And I don't ever remember asking for your opinion.

I believe posting on a public forum has nothing to do with accepting one's opinions.

replaced

#89
Still does not work, found the problem but not the solution.

I get the msgbox "hello", but not hi1 or hi2
I don't have an "on error resume next" code in the sub


Dim clsP As New clsPacket
        With clsP
            .SetBuffer datA
            .Skip 1
            .Skip 2
            PackID = .GetByte
        End With
        bRet(0) = PackID
  datA = clsP.GetNTString
msgbox("hello")
cWarden.StrToByteArray datA, bData()
  MsgBox ("hi1")
  cWarden.DoCrypt bData(), wKeyIn(), bRet()
  MsgBox ("hi2")


"datA = clsP.GetNTString"  what code should this be??  I replaced "sData = Packet.GetNull" with that.

getnull same as get null terminated string?

whats packet.getnull do?

I just added this code ontop


Dim stringx As String
stringx = StrToHex(bData())
Open App.Path & "/debug.txt" For Append As #1
Print #1, stringx
stringx = StrToHex(wKeyIn())
Print #1, stringx
stringx = StrToHex(bRet())
Print #1, stringx
Close #1


this is what comes in my txt file

3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 4D 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 52 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 00


thats it, 1 null value, then a bunch of 3F's, then another null value

Just post which values come from where, just like bnet docs b/c i've been playing around this for hours i'll even give war3 keys if some1 helps me ><!!

in my text file is now

FF 5E 29 00 06 FA C1 FC FB 0A DA 38 8A 2C A1 47 83 C3 31 11 E7 35 11 18 CF A8 9A 77 CD 38 42 98 34 C1 F4 DF 41 18 32 F3 B0
3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 4D 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 52 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 00



now i get "Unknown Warden Packet: ΓΏ^)"

|