• Welcome to Valhalla Legends Archive.
 

BNLS_VERSIONCHECKEX2

Started by Chriso, December 04, 2006, 05:17 AM

Previous topic - Next topic

Chriso

When should this be sent? I keep getting Invalid version response from S=>C SID_AUTH_CHECK
I am currently sending it after I receive SID_AUTH_INFO response

Ersan


l2k-Shadow

you can send any BNLS packet anytime.
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.

Ersan


l2k-Shadow

I posted a more detailed description of what you posted. :-*
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.

Hdx

BNCS C->S Protocol Byte: 0x01
BNCS C->S 0x50
BNCS S->C 0x50
If Client.protocol == NLS
  BNLS C->S 0x0D
  BNLS S->C 0x0D
End If
BNCS S->C 0x25
BNCS C->S 0x25
BNLS C->S 0x1A
BNLS S->C 0x1A
BNLS C->S 0x0C
BNLS C->S 0x51
If Client.protocol != NLS
  BNLS C->S 0x0B
  BNLS S->C 0x0B
  BNCS C->S 0x3A
  BNCS S->C 0x3A
Else
  BNLS C->S 0x02
  BNLS S->C 0x02
  BNCS C->S 0x53
  BNCS S->C 0x53
  BNLS C->S 0x03
  BNLS S->C 0x03
  BNCS C->S 0x53
  BNCS S->C 0x53
  BNCS S->C 0x45
End If
If Client.UDPGames == True
  BNCS C->S UDP 0x09
  BNCS C->S UDP 0x09
  BNCS C->S UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS S->C UDP 0x09
  BNCS C->S 0x14
End If
BNCS C->S 0x0A
BNCS C->S 0x0B
BNCS C->S 0x0C
Bah I'm bored, but that should be correct. (Its off the top of my head)
~-~(HDX)~-~

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

MysT_DooM

I assume your parsing out ur 0x1A responce correctly, but also use the exeinfo provided in 0x1A , you cant have it like "DDA-TRiCk`BoT" or watever , bnet now checks that


vb6, something about that combination of numbers and letters is sexy

Hero

When does bnls send back the exe information?

(BOOL) Success*
(DWORD) Version.
(DWORD) Checksum.
(STRING) Version check stat string.
(DWORD) Cookie.
(DWORD) The latest version code for this product.


Do any of those mean exe information, I'm stumped here.

l2k-Shadow

#8
Quote from: heRo on December 04, 2006, 04:43 PM
When does bnls send back the exe information?

(BOOL) Success*
(DWORD) Version.
(DWORD) Checksum.
(STRING) Version check stat string.
(DWORD) Cookie.
(DWORD) The latest version code for this product.


Do any of those mean exe information, I'm stumped here.

well let's see, exe info is a string, and there is only one string in there.  ::)
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.

Hero

Quote from: l2k-Shadow on December 04, 2006, 04:48 PM
Quote from: heRo on December 04, 2006, 04:43 PM
When does bnls send back the exe information?

(BOOL) Success*
(DWORD) Version.
(DWORD) Checksum.
(STRING) Version check stat string.
(DWORD) Cookie.
(DWORD) The latest version code for this product.


Do any of those mean exe information, I'm stumped here.

well let's see, exe info is a string, and there is only one string in there.  ::)

Actually, thats what I was going to edit my post w/, but I didn't know if I was even looking at the right packet for the info. Why don't they match bnetdocs; for example in 0x51 it says EXE Info, shouldn't it in the BNLS packet?

@School so typing fast btw.

Chriso

#10
Oh maybe it's the ULONGLONG? I just assumed that was FILETIME? does it have a different format/size? how many bytes should it be in length?



0x1A

(DWORD) Product ID.*
(DWORD) Flags.**
(DWORD) Cookie.
(ULONGLONG) Timestamp for version check archive.
(STRING) Version check archive filename.
(STRING) Checksum formula.




Heres what I'm getting from BNLS compared to hashing


D2DV

Using Hashes
version: 16780032
checksum: 522892090
exeinfo: Game.exe 07/19/06 11:54:27 2125824

Using BNLS
version: 0
checksum: -1895759861
exeinfo: í~Game.exe 08/17/05 01:11:43 2125824

l2k-Shadow

Quote from: DDA-TriCk-E on December 04, 2006, 04:59 PM
Oh maybe it's the ULONGLONG? I just assumed that was FILETIME? does it have a different format/size? how many bytes should it be in length?



0x1A

(DWORD) Product ID.*
(DWORD) Flags.**
(DWORD) Cookie.
(ULONGLONG) Timestamp for version check archive.
(STRING) Version check archive filename.
(STRING) Checksum formula.




#include <iostream.h>
void main() {
cout << sizeof(unsigned long long) << "\n";
}

It's the timestamp of the MPQ file so that the client would know if the mpq was updated in case it has an outdated file in it's cache.
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.

Chriso

#12
Quote from: l2k-Shadow on December 04, 2006, 05:04 PM
Quote from: DDA-TriCk-E on December 04, 2006, 04:59 PM
Oh maybe it's the ULONGLONG? I just assumed that was FILETIME? does it have a different format/size? how many bytes should it be in length?



0x1A

(DWORD) Product ID.*
(DWORD) Flags.**
(DWORD) Cookie.
(ULONGLONG) Timestamp for version check archive.
(STRING) Version check archive filename.
(STRING) Checksum formula.




#include <iostream.h>
void main() {
cout << sizeof(unsigned long long) << "\n";
}

It's the timestamp of the MPQ file so that the client would know if the mpq was updated in case it has an outdated file in it's cache.

Is that the same as the 'FILETIME' of the MPQ received in 0x50?


Heres what I'm getting from BNLS compared to hashing


D2DV

Using Hashes
version: 16780032
checksum: 522892090
exeinfo: Game.exe 07/19/06 11:54:27 2125824

Using BNLS
version: 0
checksum: -1895759861
exeinfo: í~Game.exe 08/17/05 01:11:43 2125824

l2k-Shadow

#13
yes it's the FILETIME, however, it looks like you're parsing the data wrong, considering you have some crap in front of the Game.exe, maybe if you pasted your parsing code for parsing 0x50 and sending/receiving 0x1A..?
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.

Chriso

Okay heres 0x50


Private Sub Recv0x50()
    Dim lngRevision As Long
    ClientToken = GetTickCount
   
    With objPacket
        lngRevision = .GetDWORD
        ServerToken = .GetDWORD
        .Skip 4
        MpqFileTime = .GetULONG
        MpqArchive = .GetCString
        ChecksumFormula = .GetCString
        If lngRevision = 2 Then useNLS = True Else useNLS = False
    End With
   
    With objPacketBNLS
        .InsertDWORD CLng(IIf(lngRevision = 0, 1, lngRevision))
        .SendBNLSPacket ObjectIndex, BNLS_CHOOSENLSREVISION
    End With
End Sub



Heres 0x1A send

Case BNLS_CHOOSENLSREVISION '(0x0D)
            With objPacketBNLS
                If .GetDWORD = &H1 Then
                    ProductID = BNLSGetProductID(Profile(Index).Config.ProductID)
                    With objPacketBNLS
                        .InsertDWORD ProductID
                        .InsertDWORD &H0
                        .InsertDWORD ServerToken
                        .InsertULONG MpqFileTime
                        .InsertCString MpqArchive
                        .InsertCString ChecksumFormula
                        .SendBNLSPacket ObjectIndex, BNLS_VERSIONCHECKEX2
                    End With
                    AddChat ObjectIndex, GetColor(COL_SUCCESS), "BNLS: Login information authenticated!"
                Else
                    AddChat ObjectIndex, GetColor(COL_FAILED), "BNLS: Revision number was not recognized."
                End If
            End With


And heres 0x1A recv

Case BNLS_VERSIONCHECKEX2
            With objPacketBNLS
                If .GetBYTE = &H1 Then
                    EXEversion = .GetDWORD
                    Checksum = .GetDWORD
                    EXEinfo = .GetCString
                    Debug.Print EXEversion
                    Debug.Print Checksum
                    Debug.Print EXEinfo
                   
                    AddChat ObjectIndex, GetColor(COL_SUCCESS), "BNLS: Version check passed!"
                    If Profile(Index).Config.ProductID = "D2XP" Or Profile(Index).Config.ProductID = "W3XP" Then
                        .InsertDWORD &H1
                        .InsertBYTE &H2
                        .InsertDWORD &H1
                        .InsertDWORD ServerToken
                        .InsertCString Profile(Index).Config.Cdkey
                        .InsertCString Profile(Index).Config.CdkeyExp
                        .SendBNLSPacket ObjectIndex, BNLS_CDKEY_EX
                    Else
                        .InsertDWORD &H1
                        .InsertBYTE &H1
                        .InsertDWORD &H1
                        .InsertDWORD ServerToken
                        .InsertCString Profile(Index).Config.Cdkey
                        .SendBNLSPacket ObjectIndex, BNLS_CDKEY_EX
                    End If
                    AddChat ObjectIndex, GetColor(col_info), "BNLS: Hashing cdkeys.."
                End If
           End With