Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: MyndFyre on September 18, 2003, 11:55 AM

Title: BNLS Response Ports
Post by: MyndFyre on September 18, 2003, 11:55 AM
Hey fellas,

How do I know ahead of time what port BNLS will reply to?  I've been examining packet captures, wondering why I haven't received the reply, and lo, I am consistently on the wrong port.  Aside from the random times when I'll get lucky, how can I fix this?

Thanks!

--Rob
Title: Re:BNLS Response Ports
Post by: Camel on September 18, 2003, 12:10 PM
By using the correct port (9367).

QuoteBNLS General Info
-----------------

The BNLS server listens on TCP/IP port 9367.
The official BNLS server is bnls.valhallalegends.com.

http://www.valhallalegends.com/yoni/BNLSProtocolSpec.txt (http://www.valhallalegends.com/yoni/BNLSProtocolSpec.txt)
Title: Re:BNLS Response Ports
Post by: Spht on September 18, 2003, 12:54 PM
Quote from: Myndfyre on September 18, 2003, 11:55 AM
Hey fellas,

How do I know ahead of time what port BNLS will reply to?  I've been examining packet captures, wondering why I haven't received the reply, and lo, I am consistently on the wrong port.  Aside from the random times when I'll get lucky, how can I fix this?

Thanks!

--Rob

Try filtering to the static remote port (9367) instead of local port which changes depending on free ports on your system.
Title: Re:BNLS Response Ports
Post by: MyndFyre on September 21, 2003, 02:41 PM
Quote from: Spht on September 18, 2003, 12:54 PM
Try filtering to the static remote port (9367) instead of local port which changes depending on free ports on your system.

I found it....  .NET sockets implementation just uses a random port, but since I needed to listen to your server's response, I needed to first bind to the local port.
Title: Re:BNLS Response Ports
Post by: Yoni on September 21, 2003, 04:11 PM
That's a bad idea.

Follow Spht's suggestion instead.