• Welcome to Valhalla Legends Archive.
 

Packet 0x0B Discussion

Started by CrAz3D, October 12, 2003, 12:32 PM

Previous topic - Next topic

CrAz3D

vb6
For some reason this doesn't work, in theory it should but is doesn't.
[cpde]Case &HB
   Dim HASH(2) As String
       If cb = True Then
           HASH(0) = MakeDWORD(GTC)
           HASH(1) = MakeDWORD(Servers)
           HASH(2) = Mid(data, 4, Len(data) - 3)
           InsertWORD &H1C
           InsertDWORD &H1
           InsertNonNTString HASH(0) & HASH(1) & HASH(2)
           sendBNLSPacket &HB
           'InsertDWORD Len(varPass)
           'InsertDWORD &H0
           'InsertNonNTString varPass
           'sendBNLSPacket &HB
               cb = False
       ElseIf cb = False Then
           InsertDWORD GTC
           InsertDWORD Servers
           InsertNonNTString Mid(data, 4, Len(data) - 3)
           InsertNTString varUser
           sendPacket &H3A
               cb = False
       End If


ANy help is appreciated.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Dark-Feanor

#1
0x0A, 0x0B, 0x0C are used to enter chat. If you do not want to make an account, I recommend you do this:

InsertNTString varuser
InsertBYTE 0
sendPacket &HA
InsertNonNTString varproduct
sendPacket &HB
InsertDWORD 2
InsertNTString varhome
sendPacket &HC
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

Freeware

If you do want to create an account here is the code:



Private Sub CreateAccount()
Dim accounthash As String
Dim result As Variant
accounthash = String(5 * 4, vbNullChar)
result = X(accounthash, m_Password)

   pBuffer.InsertNonNTString accounthash
   pBuffer.InsertNTString m_Username
   pBuffer.SendPacket &H3D
End Sub


UserLoser

he's talking about using BNLS, not local hashed

CrAz3D

Yes, userloser was right.  But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Adron

Quote from: CrAz3D on October 13, 2003, 03:49 PM
Yes, userloser was right.  But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)

No extra _ or @ or other decorations?

UserLoser

No decorations, Adron.  Maybe you need updated Visual C++ runtimes.

CrAz3D

Quote from: Adron on October 13, 2003, 05:41 PM
Quote from: CrAz3D on October 13, 2003, 03:49 PM
Yes, userloser was right.  But if anyone has any suggestions on how to make my stupid computer work & call bnetauth.dll that'd work too.(for some reason it cannot find entry points into bnetauth.dll when they do exist)

No extra _ or @ or other decorations?

Mind explaining that for me?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Banana fanna fo fanna

Sometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17

CrAz3D

The stupid thing about this one is that it works when I am in Design mode of VB.  I don't have any clue on the face of this earth about why my computer semi-randomly picks things out not to work.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Skywing

Quote from: UserLoser on October 13, 2003, 06:51 PM
No decorations, Adron.  Maybe you need updated Visual C++ runtimes.
I'd like to know just what that has to do with this.  Last time I checked, only using the /EXPORT linker option directly or using a .def file and setting the external name had any relevance to what the exported symbol is named.

Kp

Quote from: St0rm.iD on October 14, 2003, 09:06 PMSometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17
This behavior results from exporting the mangled name of languages which use name mangling to support overloading (such as C++).  In C, there can be no more than one function named foo, so its name in the assembly and in the DLL is simply foo.  In C++, you can have foo(int), foo(double), etc.  Each of these needs to be distinguishable during the link phase, so the names are mangled to reflect the parameter types.  Unfortunately, these names usually end up in the DLL's export list in their mangled form.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Adron

That's one part. The other is that calling conventions sometimes also change the naming of the functions, adding a _ or an @8 to the name. For stdcall, I think the number of bytes on stack is added after an @.

Design mode and run mode might differ in search paths, check if you have more than one dll of different versions with different exported symbols.

Kp

Quote from: Adron on October 15, 2003, 05:46 PMThe other is that calling conventions sometimes also change the naming of the functions, adding a _ or an @8 to the name. For stdcall, I think the number of bytes on stack is added after an @.
Yes.  However, in all the cases I've checked, the leading underscore and/or stdcall notation is stripped back off automatically before it gets put into a DLL as an export.  It's entirely possible that there's some tool(s) out there which don't do this, but I haven't seen them.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Adron

Quote from: Kp on October 16, 2003, 11:14 AM
Yes.  However, in all the cases I've checked, the leading underscore and/or stdcall notation is stripped back off automatically before it gets put into a DLL as an export.  It's entirely possible that there's some tool(s) out there which don't do this, but I haven't seen them.


extern "C" __declspec(dllexport) int testfunc1(int a, int b)
{
   return a*b;
}

extern "C" __declspec(dllexport) int __stdcall testfunc2(int a, int b)
{
   return a*b;
}

__declspec(dllexport) int testfunc3(int a, int b)
{
   return a*b;
}

__declspec(dllexport) int __stdcall testfunc4(int a, int b)
{
   return a*b;
}


Dump of file testdll.dll

File Type: DLL

        Section contains the following exports for testdll.dll

                  0 characteristics
           3F8ED6E0 time date stamp Thu Oct 16 19:35:28 2003
               0.00 version
                  1 ordinal base
                  4 number of functions
                  4 number of names

           ordinal hint RVA      name

                 1    0 00001014 ?testfunc3@@YAHHH@Z
                 2    1 00001005 ?testfunc4@@YGHHH@Z
                 4    2 0000100A _testfunc2@8
                 3    3 0000100F testfunc1