• 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

Messages - Homerlan

#1
Quote from: MysT_DooM on June 07, 2009, 02:34 PM
IFABot!
http://www.ifa-france.com/ifabot
Although my man Homerlan hasn't updated it for latest War3 warden support.  You can still probably use HDX's little program to fix that.
For information, IFABot just got updated to handle Warcraft III warden module.
#2
First of all, thank you for releasing this new version so fast.

I've spent couple of hours testing it. I've faced new problems. Thus, I'm trying to compare all the different computation steps with JavaOp SRP class.

First problem (in CalculateM1):
BigInteger local_S = ((s_modulus + local_B - verifier) % s_modulus);
local_S = local_S.ModPow((a + (u * x)), s_modulus);
byte[] bytes_s = local_S.GetBytes();

Here, bytes_s is 32-bytes long, so is local_k array (code below).

byte[] even_hash = s_sha.ComputeHash(even_s);
byte[] odds_hash = s_sha.ComputeHash(odds_s);
byte[] local_k = new byte[bytes_s.Length];

Hashing with SHA-1 returns a 20-bytes long array. So, even_hash and odds_hash are both 20-bytes long arrays.
But the loop following this code fills local_k (32-bytes long) alternatively with odds_hash & even_hash bytes : the loop stop condition is based on local_k length (32). So, the resulting array is a 32-bytes long array with 16 bytes from odds_hash and 16 bytes from even_hash.
Shouldn't it be a 40-bytes long array as a result?

PS: an exception is raised from CalculateM1 ("Index was outside the bounds of the array").

Second problem (in CalculateVerifier):
byte[] data2 = new byte[salt.Length + hash1.Length];
Array.Copy(salt, data2, salt.Length);
Array.Copy(data1, 0, data2, salt.Length, data1.Length);

In the third line, we can see a copy of data1 content that is actually "USERNAME:PASSWORD" string and not its hashed value. I think data1 has to be replaced by hash1 (hashed value of data1 string).

Currently, I didn't go further but I'll try to ;)
#3
Quote from: MyndFyre[vL] on October 20, 2007, 09:53 PM
Ahh, now I see what you're saying.

I don't have time to correct this right now.  I have, however, set the timeline for the next release to be 10/28 - over the next week, I'll be updating the code in Subversion.  If you correct it, you're welcome to submit a .patch - I'd welcome the help - or, you can simply wait on it.  At the moment, I don't have time to determine the right way to solve it.
Okay, take your time :)

By the way, I basically tried to initialize "k" variable with a byte[40] (then filled with the two hashes of 20 bytes long) and I got a "Wrong password" error from Battle.net. So, there might be something else than this single initialization but I think you know it better than I do ^^

Thanks Leax for the tip, I'm gonna try to see with JavaOp NLS class :)
#4
Sorry for not being enough clear: for my last post (about raised exception on "k"), I was using 2.0.3.16 BETA 1 which seems to be the newest.
Should I use another one ?
#5
Thanks for your reply ;)

Indeed, the correction is in the latest Beta versions (I was still including Reference of the 1.3.x version instead of Beta version actually ;D).

So, my problem changed: in this code from CalculateM1:
byte[] even_hash = s_sha.ComputeHash(even_s);
byte[] odds_hash = s_sha.ComputeHash(odds_s);
byte[] local_k = new byte[bytes_s.Length];
           
for (int i = 0; i < k.Length; i++)

Here, an exception is raised, "k" variable is "null". I just checked every occurrence of this variable in NLS class and I can't find any initializations of it.
Any ideas ? ???
#6
Battle.net Bot Development / [MBNCSUtil] LoginProof
October 19, 2007, 05:38 PM
I am currently developing a C# bot using MBNCSUtil library.

Unfortunately, I'm stuck in calling LoginProof method. Actually, my problem is exactly the one described in this topic. I got a "nullReferenceException" when calling this method with valid arguments and after "LoginAccount" method call as stated in the documentation.

Here's a simplified overview of how I proceed ("A", "B" and "salt" are byte[] typed and read from the previous received packets):
_nls = new NLS(_username, _password);
                       
byte[] A = new byte[33 + _username.Length];
_nls.LoginAccount(A, 0, A.Length);
_nls.LoginProof(M1, 0, 20, salt, B); // nullReferenceException here


If I rebuild and use the library according to the change suggested by MyndFyre in the previously quoted topic, I get the problem about "k" in "CalculateM1" (same as the one also described in the quoted topic).

So, I'd like to know where is my mistake in these methods calls or find a way to bypass this to make it work :D

Thanks in advance for your help ;)

PS: I used different versions of MBNCSUtil (1.3.X and the two last Beta versions).