Valhalla Legends Forums Archive | Battle.net Bot Development References | Packet 0x0B Discussion

AuthorMessageTime
CrAz3D
[code]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[/code]

ANy help is appreciated.
October 12, 2003, 5:32 PM
DaRk-FeAnOr
0x0A, 0x0B, 0x0C are used to enter chat. If you do not want to make an account, I recommend you do this:
[code]
InsertNTString varuser
InsertBYTE 0
sendPacket &HA
InsertNonNTString varproduct
sendPacket &HB
InsertDWORD 2
InsertNTString varhome
sendPacket &HC
[/code]
October 12, 2003, 7:00 PM
Freeware
If you do want to create an account here is the code:

[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

[/code]
October 12, 2003, 7:08 PM
UserLoser
he's talking about using BNLS, not local hashed
October 13, 2003, 1:41 AM
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)
October 13, 2003, 8:49 PM
Adron
[quote author=CrAz3D link=board=17;threadid=3067;start=0#msg24087 date=1066078191]
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)
[/quote]

No extra _ or @ or other decorations?
October 13, 2003, 10:41 PM
UserLoser
No decorations, Adron. Maybe you need updated Visual C++ runtimes.
October 13, 2003, 11:51 PM
CrAz3D
[quote author=Adron link=board=17;threadid=3067;start=0#msg24102 date=1066084886]
[quote author=CrAz3D link=board=17;threadid=3067;start=0#msg24087 date=1066078191]
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)
[/quote]

No extra _ or @ or other decorations?
[/quote]

Mind explaining that for me?
October 15, 2003, 1:53 AM
St0rm.iD
Sometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17
October 15, 2003, 2:06 AM
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.
October 15, 2003, 2:26 AM
Skywing
[quote author=UserLoser link=board=17;threadid=3067;start=0#msg24108 date=1066089112]
No decorations, Adron. Maybe you need updated Visual C++ runtimes.
[/quote]
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.
October 15, 2003, 1:51 PM
Kp
[quote author=St0rm.iD link=board=17;threadid=3067;start=0#msg24208 date=1066183579]Sometimes, exported DLL functions have whacked out names, I think they may have something to do with parameter types, i.e. Genhash@XYGGGZ17[/quote]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.
October 15, 2003, 7:57 PM
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.
October 15, 2003, 10:46 PM
Kp
[quote author=Adron link=board=17;threadid=3067;start=0#msg24300 date=1066258012]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 @.[/quote]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.
October 16, 2003, 4:14 PM
Adron
[quote author=Kp link=board=17;threadid=3067;start=0#msg24351 date=1066320861]
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.
[/quote]

[code]
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;
}
[/code]
[code]
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
[/code]
October 16, 2003, 5:36 PM

Search