• Welcome to Valhalla Legends Archive.
 

BotNet 0x0B "issues"

Started by R.a.B.B.i.T, May 06, 2005, 01:17 PM

Previous topic - Next topic

R.a.B.B.i.T

I'm sending different 0x0B packets following the spec (I don't get any errors), but nothing happens.  Messages are sent, but not received.  I'm using SphtBot3 as my control, but I don't receive messages from that either, so I assume I'm doing something wrong.  Anyone help?

UserLoser.

#1
Make sure you're sending to the correct bot (it's based on bot id numbers), the user is allowing messages, and I can't tell from your post, but don't think that when you send a message it will echo it back to you (i.e. private message like on b.net).  Maybe you are receiving them and your handler is broken?  Have you used a network monitor utility yet?

R.a.B.B.i.T

I watched my entire test with Ethereal.  I received TCP packets, but they had no data in them; they were only headers.  I sent these messages:
My bot -> itself
My bot -> SphtBot
SphtBot -> my bot
SphtBot -> itself

I never received an 0x0B packet from BotNet.  I did, however, still receive 0x06 and 0x07 packets.

UserLoser.

Quote from: rabbit on May 06, 2005, 04:34 PM
I watched my entire test with Ethereal.  I received TCP packets, but they had no data in them; they were only headers.  I sent these messages:
My bot -> itself
My bot -> SphtBot
SphtBot -> my bot
SphtBot -> itself

I never received an 0x0B packet from BotNet.  I did, however, still receive 0x06 and 0x07 packets.

You must be sending a message with a bad bot id.  Try hardcoding the bot id to 1 and see if you get a reply ;).  It seems odd that you don't recieve messages from SphtBot

R.a.B.B.i.T

#4
Even messaging everyone on BotNet from SphtBot doesn't get an 0x0B to my bot or even another SphtBot.

[edit]
Control between two SphtBots:
Quote from: SphtBot A[17:42:10] (Broadcast) <*SphtBotv3%4918> test
[17:44:38] (BotNet) <To: thefuzzyone> hrm
Quote from: SphtBot B[17:44:00] (Broadcast) <thefuzzyone> test
[17:44:29] (BotNet) <To: *SphtBotv3%4918> grr

Neither received any messages, so at this point I'm assuming something's up with the server itself.

UserLoser.

Quote from: rabbit on May 07, 2005, 04:35 PM
Even messaging everyone on BotNet from SphtBot doesn't get an 0x0B to my bot or even another SphtBot.

[edit]
Control between two SphtBots:
Quote from: SphtBot A[17:42:10] (Broadcast) <*SphtBotv3%4918> test
[17:44:38] (BotNet) <To: thefuzzyone> hrm
Quote from: SphtBot B[17:44:00] (Broadcast) <thefuzzyone> test
[17:44:29] (BotNet) <To: *SphtBotv3%4918> grr

Neither received any messages, so at this point I'm assuming something's up with the server itself.

You can't send broadcasts over botnet unless you have permission to (ex: an administrator).  Try logging onto an account, then whispering

tA-Kane

Messaging everyone from nonauthorized clients has been disabled, for security reasons. You must have write access to the database you are a part of in order to broadcast to database, and you must have special permission (server admin, I think) in order to broadcast to all.

As for not receiving messages, it's most likely because of the server-side chat filters.

Make sure you're using the latest version of SphtBotv3, then try playing with these two commands (ripped directly from the SphtBotv3 Documentation... did you read that?):
/chatdropoptions *** Displays the current BotNet chat drop options
/setchatdropoptions <0|1|2> <0|1|2> <0|1|2> <0|1> *** Sets BotNet chat drop options.  See BotNet protocol specification for more information

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

UserLoser.

I don't think the SphtBotv3 documentation states where the BotNet documentation is.  So, here it is.

tA-Kane

BnetDocs also contains a fair amount of documentation on BotNet. It's a lot more readable there than in that document in my opinion.
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

R.a.B.B.i.T

I've used both BotNet specs and BnetDocs to construct my BotNet handler.  I also downloaded a fresh copy of SphtBot.

About 0x10, the docs specify that if not received, the server sets all values to 0, which is global accept.

UserLoser.

#10
Quote from: rabbit on May 07, 2005, 09:50 PM
I've used both BotNet specs and BnetDocs to construct my BotNet handler.  I also downloaded a fresh copy of SphtBot.

About 0x10, the docs specify that if not received, the server sets all values to 0, which is global accept.

Just show us packet logs of what you're doing.  Make sure you know the correct format:
Quote
(send to server) id 0x0b: botnet chat
Contents:
   (DWORD) command
      0   : message to all bots
      1   : message to bots on the same database
      2   : message to bot specified by id.
   (DWORD) action   : 0x00=talk, 0x01=emote, any other is dropped
   (DWORD) id   : for command 0x02, id of bot to send to, otherwise ignored.
   (STRING:496) message: blank messages are dropped
Response: the server generates 0xb to the specified other clients.  No
response is sent to the sending client.

R.a.B.B.i.T

#11
I'll do that, but a note: I get 0x08 messages when any packet is malformed.

[edit]
Logs; ethereal isn't liking me and won't save right now, so here's WPEAlpha:

SphtBot A
1  192.168.2.9:3127  63.161.183.205:21845  20  Send 
0000  01 0B 14 00 02 00 00 00 00 00 00 00 70 13 00 00    ............p...
0010  72 72 72 00                                        rrr.


SphtBot B
1  192.168.2.9:3138  63.161.183.205:21845  20  Send 
0000  01 0B 14 00 02 00 00 00 00 00 00 00 6E 13 00 00    ............n...
0010  68 72 6D 00                                        hrm.


My Bot
4  192.168.2.9:3157  63.161.183.205:21845  20  Send 
0000  01 0B 14 00 00 00 00 00 02 00 00 00 73 13 00 00    ............s...
0010  68 72 6D 00                                        hrm.

UserLoser.

Quote from: rabbit on May 08, 2005, 09:41 AM
My Bot
4  192.168.2.9:3157  63.161.183.205:21845  20  Send 
0000  01 0B 14 00 00 00 00 00 02 00 00 00 73 13 00 00    ............s...
0010  68 72 6D 00                                        hrm.


Quote
   (DWORD) command
      0   : message to all bots
      1   : message to bots on the same database
      2   : message to bot specified by id.
   (DWORD) action   : 0x00=talk, 0x01=emote, any other is dropped
   (DWORD) id   : for command 0x02, id of bot to send to, otherwise ignored.
   (STRING:496) message: blank messages are dropped
Response: the server generates 0xb to the specified other clients.  No
response is sent to the sending client.

What you're doing is in bold.

R.a.B.B.i.T

An extra DWORD was being inserted, but I'm not sure why, I'll check my code again, but even still:
0000:  01 0B 15 00 02 00 00 00 00 00 00 00 9E 13 00 00    ........ž..
0010:  74 65 73 74 00                                    test............

No respense.

UserLoser.

Like I said many times now, hardcode 1 as botid and see if you get a response