• Welcome to Valhalla Legends Archive.
 

Visual Basic - BNLS_AUTHORIZEPROOF

Started by shadypalm88, October 18, 2003, 08:27 PM

Previous topic - Next topic

shadypalm88

Please excuse my newbish question, but I'm having a problem generating a checksum to send using BNLS_AUTHORIZEPROOF (0x0f).  I am using Yoni's VB CRC32 checksum functions that are listed in the BNLS protocol spec.  I wrote a packet parsing sub that returns divided packet data in a user-defined type array, with the actual data in a Variant.  Problem is, the checksum function's server key argument is a Long.  Trying to pass the key directly causes a type mismatch error.  I've tried using combinations of CLng, Val, and Fix, but they either cause the same error or destroy the data.

So here's my question:  How can I convert the BNLS server key data (stored in a variant or string) into an equivalent long that I can use to get a valid CRC32 checksum?

Soul Taker

Do something like this:
CopyMemory lngKey, ByVal Mid$(strData, 4, 4), 4
lngKey of course being a long where the key will be stored.

iago

<insert argument about why C++ is better here>
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


shadypalm88


Banana fanna fo fanna

Quote from: iago on October 18, 2003, 09:24 PM
<insert argument about why C++ is better here>

shadypalm obviously is not a n00b, thus he does not deserve vb flaming.

shadypalm: +1

Kp

Quote from: St0rm.iD on October 18, 2003, 10:10 PMshadypalm obviously is not a n00b, thus he does not deserve vb flaming.
Why are veterans excused from being flamed for using a language that doesn't even have an unsigned 32 bit type?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Adron

Quote from: Kp on October 19, 2003, 12:08 AM
Why are veterans excused from being flamed for using a language that doesn't even have an unsigned 32 bit type?

They're excused because they may be under pressure from others to use it. That's punishment enough without being flamed as well.