• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - MyndFyre

#1
For those of you who don't already know from the x86 forums, I'm going to be joining Microsoft on April 2nd!

I'll be working on the Chakra Runtime team - that's Microsoft's JavaScript engine - as a Program Manager.  Pretty excited!

No, I won't actually be working with Skywing, who works in WinSec.  But it's kind of like working with him.  Sort of.
#4
General Discussion / Kind of annoyed
June 26, 2011, 12:18 AM
Someone sent me a private message, so I took the time to write a nice reply and the account either was deleted or never existed.  The author didn't bother to leave me any contact information.  So here it is, for the annals of time, in case you happen to be browsing.

Quote from: Piskota_TNT
Dear MyndFyre,

first of let me introduce myself. My name is Borko and as you are probably guessing I am a wanna-be-bot-creator.

That is partially correct, but I have been working with C# for almost a year and I have some experience in C as well (started off with C). I have been a shaman and a bot maintainer for a long time but since I think that SB is dying and the support on the website is awful I am trying to migrate from SB to jinxbot. As I could develop stuff for it since it's written in C#. Unfortunately your site was down when I started googling and cache version did not provide any download link :(
There isn't a proper build available for download.  However, you can SVN-checkout the latest JinxBot repository from SVN via http://jinxbot.googlecode.com/ and it should build and run fine.

Quote from: Piskota_TNT
But I am guessing that you've stopped working on it and left bnet development completely.
Eh, I come and go.  I think I might be getting back in, as I just found a library that parses JavaScript within a .NET environment (called Jurassic), so I'm thinking about adding that to JinxBot.  I've wanted to add script support to JinxBot for a long time, and now it seems like it might be workable.  So I'm investigating that.

Quote from: Piskota_TNTSo I am kindly asking you for some help in understanding how bnet works and how I should approach the logical/planning and programming phase in the development of my own bot. I have searched, I have googled, tried learning from other peoples source code, but mostly it was bad.
If you're interested in making your own bot, you might consider using BN#, which is the library I programmed to make it easy to make a bot in C# (JinxBot is built around it).  It handles all of the underlying connection pieces for you.  You can also get the latest version of that, Beta 3, from the same Google Code repository.  To make a bot using BN#, you have to do these things:
  • Implement IBattleNetSettings, which is a simple interface that provides the settings to the bot.
  • Pass your instance of IBattleNetSettings to the constructor of a BattleNetClient
  • Sign up for BattleNetClient's events, such as Connected, JoinedChannel, etc.
  • Call Connect on your instance of BattleNetClient.
Quote from: Piskota_TNT
Could you please provide me a step by step linking to what I need to know in order to start making my own bot?

Thank you,

Borko
Your alternative is to use BnetDocs, which describes the packet structure of what's actually going on under the hood.  Battle.net exchanges a series of messages with your client over port 6112.  You need to know how to prepare, send, receive, and decode those messages in order to make a bot, and is substantially out of the purview of what I'm willing to write in a PM.  You can, however, find good information by searching this forum, if that's the route you want to go.

I will say, it's good knowledge to have - understanding bytes, socket communication, and whatnot - it's a skill few people have.  However, it's a skill few have because few need it.  You may find it's a waste of time to learn how to do all that low-level stuff, in which case, BN# isn't a bad way to go.

GL.
#5
Battle.net Bot Development / MOVED: MultiBot BUG
March 08, 2010, 07:26 PM
Quote from: Spht on December 26, 2002, 09:42 AM
Keep in mind that this is a BOT DEVELOPMENT forum; not a Battle.net general discussions forum.  Any off-topic posts will be deleted.  Please post topics in the appropriate forums.

This topic has been moved to Trash Can.

http://forum.valhallalegends.com/index.php?topic=18185.0
#6


Booyeah!
#7
[17.01.09] /time
[17.01.09] [Server]: Battle.net time: Thu Feb 11 5:23 PM
[17.01.09] [Server]: Your local time: Thu Feb 11  10:23 AM

My time is accurate....  it's just after 5pm locally.
#9
Wanted to share something that I came up with the other day.

A classic CheckRevision value string looks like this:
A=166443184 B=361259356 C=197717253 4 A=A-S B=B-C C=C+A A=A+B

History has shown us that Crev generally has four "values" - A, B, C, and S, where A-C are state values and S is the current int32 being processed from the file.  My understanding from what people have told me is that the Battle.net issues similar value strings over a variable period, in which the formulae at the end are repeated, and just the state seeds are changed.  Our challenge is to execute the formulae efficiently.  Presently, MBNCSUtil and BN# don't do so well - memory usage is OK, but they are slow because they rely on some voodoo math and arrays (ported from iago's implementation in Java) to do the actual math.

This is generally OK for a normal client, but if I'd ever wanted to implement something like BNLS - where I'd be reusing the same formula for a short period of time - it'd be better to do something more efficient.  Well, I've started down the path to that.

CheckRevision as it is currently implemented in my code is here.  The modified form is here:

       public static int DoCheckRevision(
           string valueString,
           string[] files,
           int mpqNumber)
       {
           if (valueString == null)
               throw new ArgumentNullException("valueString");
           if (files == null)
               throw new ArgumentNullException("files");
           if (files.Length != 3)
               throw new ArgumentOutOfRangeException("files", files, "Files must be exactly 3 in length.");

           StdCrevImpl impl = FindOrConstructImpl(valueString);

           uint A, B, C, S;

           InitializeValues(valueString, out A, out B, out C);

           A ^= hashcodes[mpqNumber];

           byte[] currentOperandBuffer = new byte[1024];
           for (int i = 0; i < files.Length; i++)
           {
               using (FileStream currentFile = new FileStream(files[i], FileMode.Open, FileAccess.Read, FileShare.Read))
               {
                   while (currentFile.Position < currentFile.Length)
                   {
                       long currentFilePosition = 0;
                       long amountToRead = Math.Min(currentFile.Length - currentFilePosition, 1024);
                       currentFile.Read(currentOperandBuffer, 0, (int)amountToRead);

                       if (amountToRead < 1024)
                       {
                           byte currentPaddingByte = 0xff;
                           for (int j = (int)amountToRead; j < 1024; j++)
                           {
                               unchecked
                               {
                                   currentOperandBuffer[j] = currentPaddingByte--;
                               }
                           }
                       }

                       for (int j = 0; j < 1024; j += 4)
                       {
                           S = BitConverter.ToUInt32(currentOperandBuffer, j);

                           impl(ref A, ref B, ref C, ref S);
                       }
                   }
               }
           }

           return unchecked((int)C);
       }


The highlights of differences are:

  • It calls "FindOrConstructImpl(valueString)" and then initializes state values A, B, C, and S
  • Then it calls "InitializeValues(valueString, out A, out B, out C)" instead of running a loop to find the seeds and formulae
  • Finally, in the inner loop of reading the file, it calls the implementation retrieved before.
Right now I've been testing against the sample crev string posted above, and haven't yet written the code to translate the formula into actual non-hardcoded functions.  But it's promising.  I started with this:

           return (StdCrevImpl)((string valueString, out uint A, out uint B, out uint C) =>
           {
               A = A - S;
               B = B - C;
               C = C + A;
               A = A + B;
           });


Then I translated it into the equivalent IL:

       private static StdCrevImpl FindOrConstructImpl(string valueString)
       {
           if (dynamicMethod != null)
               return dynamicMethod;
           
           // A=166443184 B=361259356 C=197717253 4 A=A-S B=B-C C=C+A A=A+B
           string formula = "A=A-S B=B-C C=C+A A=A+B";
           Type paramTypes = typeof(uint).MakeByRefType();
           DynamicMethod method = new DynamicMethod(formula, typeof(void), new Type[] { paramTypes, paramTypes, paramTypes, paramTypes });
           var gen = method.GetILGenerator();
           
           gen.Emit(OpCodes.Ldarg_0); // A =
           gen.Emit(OpCodes.Ldarg_0); // A
           gen.Emit(OpCodes.Ldind_U4); // *A
           gen.Emit(OpCodes.Ldarg_3); // S
           gen.Emit(OpCodes.Ldind_U4); // *S
           gen.Emit(OpCodes.Sub); // *A - *S
           gen.Emit(OpCodes.Stind_I4); // *A = *A - *S

           gen.Emit(OpCodes.Ldarg_1); // B =
           gen.Emit(OpCodes.Ldarg_1); // B
           gen.Emit(OpCodes.Ldind_U4); // *B
           gen.Emit(OpCodes.Ldarg_2); // C
           gen.Emit(OpCodes.Ldind_U4); // *C
           gen.Emit(OpCodes.Sub); // *B - *C
           gen.Emit(OpCodes.Stind_I4); // *B = *B - *C

           gen.Emit(OpCodes.Ldarg_2); // C
           gen.Emit(OpCodes.Ldarg_2); // C
           gen.Emit(OpCodes.Ldind_U4); // *C
           gen.Emit(OpCodes.Ldarg_0); // A
           gen.Emit(OpCodes.Ldind_U4); // *A
           gen.Emit(OpCodes.Add); // *C + *A
           gen.Emit(OpCodes.Stind_I4);

           gen.Emit(OpCodes.Ldarg_0); // A =
           gen.Emit(OpCodes.Ldarg_0); // A
           gen.Emit(OpCodes.Ldind_U4); // *A
           gen.Emit(OpCodes.Ldarg_1); // B
           gen.Emit(OpCodes.Ldind_U4); // *B
           gen.Emit(OpCodes.Add); // *A + *B
           gen.Emit(OpCodes.Stind_I4);

           gen.Emit(OpCodes.Ret);

           dynamicMethod = method.CreateDelegate(typeof(StdCrevImpl)) as StdCrevImpl;
           return dynamicMethod;
       }


The dynamic method can then be stored according to the appropriate formula part of the string.  It executes about four times faster to emit and compile the method at runtime than to execute the loop/array-offset version that currently lives.

Some challenges to overcome:
* Decide whether to use a "standard Crev" with A, B, C, and S; or to be able to account for additional state (such as D, E, F?)
* Decide if and when to use this in a standard library or keep it completely separate.

Still, I thought it was cool - I just learned about dynamic methods, and didn't know they could be completely freed up like normal (non-.NET) programming.  That makes them cheap and easy - always a good combination!
#10
This was epically unhelpful and irrelevant.

This topic has been moved to Trash Can.

http://forum.valhallalegends.com/index.php?topic=18115.0
#11
Has anyone (*looks at Skywing*) worked on writing HID filter drivers?

I recently installed Windows 7 on my MacBook Pro with Boot Camp, and the system works great, except that the trackpad sucks balls.  It's entirely too sensitive.

I was thinking that for something like a scroll, I might just be able to filter out (for instance) every other or every third IRP from the trackpad to slow it down.  That could live between the user-mode system and the normal driver.

I'd also want to build a filter for the trackpad touch-click sensitivity.  It's ridiculous; it registers a click when I take my finger off of the touchpad.  So, if I tap the pad to select a checkbox, for instance, it will typically uncheck itself until I get pissed, tab to the checkbox, and press the spacebar.

I was thinking that I might be able to address this issue by writing a filter driver to live between the device and the normal driver, to process the packets and see if they include a pressure indicator (I'm assuming they would).

Any thoughts?
#13
My office intranet uses a Windows Server 2003 server for exchange and DHCP hosting.

What I'd like to do is be able to pin selected users or computers (computers would be preferable and I think the only thing that could work right) to a specific external IP range.  Supposing I have an external IP address range of 192.168.1.100-110, and I want my computer to be on 105, is it possible to do this within just Windows DHCP configuration?
#14
Warcraft / World of Warcraft: Cataclysm
August 21, 2009, 03:27 PM
It sounds like the rumors were true!

Level cap raised to 85.  No new talent trees, but more talent points!
New playable races: Goblin (Horde) and Worgen (Alliance)
New secondary skill: Archaeology
The Path of the Titans - a new addition that sounds kind of like a second talent system
New Race and Class combinations (Tauren Paladin anyone?)
Flying mounts in the Old Kingdoms.... as well as completely redone Old Kingdoms following the sundering caused by...
Deathwing!
Ragnaros will be back trying to burn down the World Tree.  Malfurion Stormrage is PISSED.
Underwater zones and dungeons

http://www.worldofwarcraft.com/cataclysm/
#15
This was possibly one of the most pointless advertisements for another site ever, especially considering that one of the two links to resources WAS TO THIS FORUM.

Not to discourage contribution, but come on....  REALLY?

This topic has been moved to Trash Can.

http://forum.valhallalegends.com/index.php?topic=18039.0
#17
I'm at a point where I can fairly confidently say that I've got the new Warden at a place where it's almost ready to go.  It's unencrypted, downloaded, etc.  For a number of reasons, in order to handle it, I'll need to spawn a surrogate process and interact with it via IPC.  Not a big deal, I've done IPC before, but what I'm most interested in from some of you guys are:

* If I mapped in the whole files of the games (so that it didn't depend, for instance, on the .ini files that have floated around on the forum), I'd need to create separate processes for each game, right?  I'd bet (I haven't checked) that their images overlap in memory.
* Do you recommend hosting my own code in a specific region in memory (i.e. by creating different base addresses for my assemblies)?  Obviously I'll have to avoid the game memory.
* Is it adequate to load the game files using LoadLibraryEx with DONT_RESOLVE_DLL_REFERENCES, or should I plan on loading them manually?
* Is it possible to execute multiple Warden sessions within a single process, or do I need to spawn multiple/recycle processes for each connected client?  I'm assuming it would be possible to execute multiple sessions provided with enough memory.

Thanks!
#18
General Programming / MOVED: help whit icons
July 30, 2009, 04:40 PM
Not really programming but I'll be generous.

This topic has been moved to Computer Support Issues.

http://forum.valhallalegends.com/index.php?topic=18023.0
#19
Quote from: Jailout2000 on July 28, 2009, 05:18 AM
Sorry if I lack the power of searching the forums for this, I just wanted a quick response. ;)

I'm sorry I lack the power to not trash your lack of searching post.

This topic has been moved to Trash Can.

http://forum.valhallalegends.com/index.php?topic=18019.0
#20
This really isn't related to 3rd-party client development for Battle.net, which is really what this forum is for.

Also, it's such a general question I just want to ask: really?

This topic has been moved to Web Development.

http://forum.valhallalegends.com/index.php?topic=18014.0