• Welcome to Valhalla Legends Archive.
 

BotNet Client, Help Please

Started by Hdx, January 15, 2005, 03:56 PM

Previous topic - Next topic

Hdx

Public Function SendBOTNPacket(Index As Integer, PacketID As Byte)
    If Bots(Index).wsBotNet.State <> sckConnected Then: Exit Function
    Bots(Index).wsBotNet.SendData Chr(BotNetProVer) & Chr(PacketID) & MakeWORD(Len(buffer) + 4) & Buffer
    If Deebug Then AddChat Index, vbBlue, "[BotNet] C->S 0x" & IIf(Len(Hex(PacketID)) = 1, "0" & Hex(PacketID), Hex(PacketID))
    Clear
End Function

BotNetProVer = &H1 (i've tryed &H1 - &H12)
PacketID = &H1
Buffer = "TestName" & Chr(&H0) & "TestPass" & chr(&H0)

[Info From BNetDocs]
(BYTE)      Protocol Version (Currently 0x01)
(BYTE)      Message ID
(WORD)     Message Length, including this header
(VOID)      Message Data

Upon sending this, I should recive 0x01 back with 0x00 as a response. But Insted my cnnection gets kicked.
Does anyone have any suggestions as to what I can do to stop from getting kicked off?
I'm working on getting a username and password but SkyWing I guess didnt get my PM, I'll try again.
Any help would be good.
I'm connecting to BotNet.Valhallalegends.com : &H5555
Plz dont state "Try a working Username and pass" because 0x00 dosen't even work, it kicks me off.
~-~(HDX)~-~

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

Kp

The server will close your connection if the username/password pair supplied is unacceptable.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Warrior

When I last tried to make a BotNet client I saw two different versions of the Protocol a version (I think) made by Kp which appeared to be the current one then a different one on the official protocol / BnetDocs then again I havn't looked into it in a few weeks (before BnetDocs was updated) maybe this was updated as well ?
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Hdx

OK well I guess I'll hold off till Skywing gets back to me on the account name >.<
But I should get 0x01 back with the failed response, not just diconnect.
~-~(HDX)~-~

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

Kp

Hdx: why?  There's nothing a client is permitted to do without a successful hub logon, and if the client knows a valid hub password, it should send one.  It's perfectly reasonable for the server to disconnect someone who fails the hub challenge, and this is what in fact occurs.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Hdx

Well I was thinking sence BnetDocs states that 0x01 has a failed response that BotNet woul send that befor disconnecting. S you can b sure thats the cause of the failure not something else.But hay w/e I dont run the thing.
~-~(HDX)~-~

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

Mephisto

Assuming an error response from 0x01 has no additional information in its error report regarding *why* you were disconnected for sending that packet, then you should be able to figure out why you were disconnected anyways.  If you get disconnected after sending 0x01 it's safe to assume that you were disconnected because of an invalid password or account combo.  Also, if BnetDocs says there's an error response from a disconnection resulting from a bad 0x01 message, then it's probably out-dated as IIRC, Kp updated BotNet recently.

Warrior

My point in the post above I made.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?


Mephisto

So if you're using revision 4 then a response is an automatic success, if there is no response then it's a failure.

tA-Kane

Quote from: Mephisto on January 16, 2005, 03:53 PMIf you get disconnected after sending 0x01 it's safe to assume that you were disconnected because of an invalid password or account combo.
That has never really made sense to me; how do you know that it's not your network just keeps failing immediately after you send that packet? Sure, it's most likely will never ever happen that many times at that specific packet, but it's certainly possible.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Hdx

I agree with you, I think BotNet should Send the Failed Login packet, and then disconnect. So that the users know that they failed the login, and it wasnt just some random dropage.
Also does anyone know who can setup an account for me. For some reason Skywing is eaither ignoting me, or failing to get my messages.
~-~(HDX)~-~

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

Mephisto

Just assume it was a forced disconnection from the BotNet server due to an error in your message.  If it continues to happen and you know 100% sure based on your code and packet dumps that everything is correct, verify to make sure that you even have a registered account.  If after that you still disconnect on that packet and you have a registered account then you should see if you can connect to BotNet without disconnecting (with the same code) on another computer/connection and if after that it still continues to disconnect you're probably doing something wrong.  You could also use revision 3 which replys with an error IIRC; and IIRC BotNet has backwards compatability with older versions.

Kp

Backward compatibility mostly works, but it's flaky in some areas.  Due to a complete lack of TS capable users, I'm unable to install a replacement version to correct these deficiencies.  As for why it drops you without a message: during my testing, I found that the socket-sending code I'd inherited had a tendency to close the connection and *then* try to send the "you've been kicked" message (which of course doesn't work), so I just gave up and removed the notification altogether since it wasn't working.  I've since replaced that design with one of my own that should work better.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

tA-Kane

Quote from: Mephisto on January 18, 2005, 08:46 AMJust assume it was a forced disconnection from the BotNet server due to an error in your message.
Assumption is the mother of all fuckups.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com