• Welcome to Valhalla Legends Archive.
 

Handing out a BNLS Connection...

Started by MyndFyre, September 30, 2003, 06:46 PM

Previous topic - Next topic

MyndFyre

Hi all,

Many cheers to those of you who helped me out.  I've gotten it to connect to bnet with SC/BW, and I guess the reason I haven't been able to get it to connect with WC2 or D2 is that I haven't set it up to send ASCII strings (just UTF-8) yet.  No big deal.

I was wondering if you guys would mind terribly if I freely handed out a bot sort of API....  Basically, when I designed my bot, I tried to make the connection mechanism as abstract and high-level as possible.  That way, anyone could pick up my library (correction... anyone with the .NET runtime) and plug it into their own bot - kind of like CSB, but without a chat window preprogrammed for you.

It would include basic options - what kind of connection/game, whether or not to enable UDB, cd keys, Username/passwords, etc.

My way to secure it and make sure that I have some idea of who is using this API is to have it retrieve _my_ BNLS bot name and password from my webserver...  This would be a quick, single call, but at least I'd get to see who was using it (if I set up my own registration system).

Which brings me back around to my question - would you all mind terribly if I did this?  I don't want to do something that could jeopardize what you have set up with BNLS, so I won't do anything if you don't want me to.

Thanks for the help!  I look forward to showing you guys the final product.  =)

--Rob
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Hitmen

As long as it's much less newb-friendly than CSB I'm sure no one would mind, at least make it so people need to know *something* about programming to use it.

And I don't think anyone could really "jeopardize what they have set up with BNLS" right now :P

iago

I would recommend encryping it, although it doesn't seem like the best idea to do that.

Actually, I would suggest just pretending to do that, expecting to get back certain verification information that would allow them to use it, and don't let it connect unless it gets that information.  That is, I'm assuming that you're doing this because you want to know who's using it, not because you want to get the code but because you want to find out who's using it :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


MyndFyre

Well, I'm not sure if it's much-less-newb-friendly...  Right now, I've got:

-- public enumerations for the games.
-- abstract Packet class, inherited by BnlsPacket, BnetPacket, and RealmPacket that provide automatic implementation of the correct ordering of headers and correct string encoding (ASCII vs. UTF-8), and automatic string reversal for the InsertNonNTString(string) method.
-- single Connection class.  Basically, you call InitializeConnection.  It has one event to handle in and of itself (StateChanged), which sends yet another flags-type enumeration back to any consumers about what is connected and what isn't.
-- The Connection class has an EventHost property which holds an EventHost class.  This class is instantiated only once per connection, and anything that wants to consume the events from Bnet is required to wire into these events....  Basically:
EventHost.Disconnected
EventHost.JoinedChannel
EventHost.LeftChannel
EventHost.WhisperReceived
EventHost.WhisperSent
EventHost.Talk
EventHost.Broadcast
EventHost.ChannelInfo
EventHost.User // fired for 0x01 ShowUser or 0x09 UserFlags
EventHost.ChannelFull
EventHost.ChannelDNE
EventHost.ChannelRestricted
EventHost.Info
EventHost.Error
EventHost.Emote
EventHost.Unknown

That's it.  As many clients as they want can wire into this event host (per the .NET model), and boom, that's it.

Right now, obfuscation is a technology a little beyond my (monetary) grasp, although if people donate to the project (once I have a website setup), perhaps I'll buy it to obfuscate my API assembly.  At least for now, though, I'll make it so that the consumer can't get onto BNLS without contacting my webservice with his/her own username and password (to use my API assembly).

-Rob
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

K

#4
Google for Dotfuscator. the community edition is free.  If you have a function like this:

public static void DoSomething(MyClass first, string second)
{    MyClass first = new MyClass(first, second); }


You can end up with something like this:


public static void a(a a, string b)
{   a c = new a(a, b); }
}


Which can get very confusing very quickly, since it can rename instances and types to the same thing :-D.

iago

haha, I should use that for my CS assignments! :)

but isn't obfuscation a bad thing?
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


dxoigmn

Quote from: iago on October 02, 2003, 10:56 AM
haha, I should use that for my CS assignments! :)

but isn't obfuscation a bad thing?

that is how a lot of people's code looks like in my class.  Is very annoying.

K

#7
Right, but dotfuscator does it on the assembly after it's compiled -- it doesn't touch your original source code. You'll only see the obfuscated code if you look at or decompile the MSIL.

MyndFyre

Dotfuscator (the community edition) ships free with VS 2003 right?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

K

Yup.  I'm not really sure what it's capabilities are, since I use the pro one.