• 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 - Ozzapoo

#1
I'll just port it all from java then, because I found a working unsigned right shift function, and I find java more understandable that C.
#2
Hi. Is there any public implementation for Warden in Vb.net? I'm looking for the crypto and hashing code for VB.Net in particular, because porting it all from java is long and tedious, not to mention .NET doesn't have the '>>>' operator.
#3
Yes...Are there mac hashes anywhere though?
#4
is it just me, or isn't neglected fury working? Or even stealthbot, for that matter.
#5
Battle.net Bot Development / Parsing Statstrings
March 08, 2009, 07:20 AM
Hi. How can I parse the Warcraft III Statstrings received in SID_GETADVLISTEX (0x09)? I only found the following link, which says Warcraft II, and doesn't really explain how to use the data. Could someone please explain? I use VB.Net/C#.

http://bnetdocs.com/?op=doc&did=13
#6
Oh no. I was looking at the completely wrong thing >.< It was PASSWORD hashes >.<

The password hash is sent in SID_AUTH_ACCOUNTLOGONPROOF (0x54), right?
#7
I'm trying but I can't seem to find where it actually hashes the password >.<

I'm not all that good on C.

EDIT: I think I've pinpointed the calculate hash functions in both PvPGN and MBNCSUtil....But now I'm lost.

PvPGN:

extern t_uint32 bn_int_get(bn_int const src)
{
    t_uint32 temp;
   
    if (!src)
    {
eventlog(eventlog_level_error,__FUNCTION__,"got NULL src");
        return 0;
    }
   
    temp =  ((t_uint32)src[0])    ;
    temp |= ((t_uint32)src[1])<< 8;
    temp |= ((t_uint32)src[2])<<16;
    temp |= ((t_uint32)src[3])<<24;
    return temp;
}

The code that executes this (PvPGN):

extern void bnhash_to_hash(bn_int const * bnhash, t_hash * hash)
{
    unsigned int i;
   
    if (!bnhash)
    {
eventlog(eventlog_level_error,__FUNCTION__,"got NULL bnhash");
        return;
    }
    if (!hash)
    {
eventlog(eventlog_level_error,__FUNCTION__,"got NULL hash");
        return;
    }
   
    for (i=0; i<5; i++)
        (*hash)[i] = bn_int_get(bnhash[i]);
}

MBNCSUtil:

        private void calculateHash(uint clientToken, uint serverToken)
        {
            if (!valid)
                throw new InvalidOperationException(Resources.invalidCdKeyHashed);


            MemoryStream ms = new MemoryStream(26);
            BinaryWriter bw = new BinaryWriter(ms);
            bw.Write(clientToken);
            bw.Write(serverToken);


            switch (key.Length)
            {
                case 13:
                case 16:
                    bw.Write(product);
                    bw.Write(val1);
                    bw.Write((int)0);
                    bw.Write(val2);
                    bw.Write((short)0);


                    hash = XSha1.CalculateHash(ms.GetBuffer());
                    break;
                case 26:
                    bw.Write(product);
                    bw.Write(val1);
                    bw.Write(val2);
                    byte[] buffer = ms.GetBuffer();
                    SHA1 sha = new SHA1Managed();
                    hash = sha.ComputeHash(buffer);
                    break;
                default:
                    break;
            }
            ms.Close();
        }


I don't see how these two piece of code have got ANYTHING to do with eachother...=/ Can anyone explain it to me?
#8
Well isn't there any online source that details whats wrong with the hashing? Or did everyone who ever made a bot for PvPGN look at the source themselves =/?
#9
If PvPGN hashes passwords incorrectly then wouldn't it have been fixed a long time ago?
#10
Battle.net Bot Development / PvPGN Login Sequence
January 31, 2009, 06:48 PM
Hi. What's different with the PvPGN login sequence (and its packets), as opposed to the Battle.Net one? The password never seems to work and I can't find any documentation or anything.
#11
Hi, does anyone know how the Battle.Net flood detection works? I want to be be able to make an anti-flood system on my bot.
#12
Battle.net Bot Development / Re: Warcraft III GS
December 16, 2008, 07:36 PM
What does RShift() do? Can someone post the code here? EDIT: Nevermind, found it.

Why does the function always just return three random characters? The characters are the same depending on the game, but they just seem random. Did I do something wrong?

I modifed the function slightly and made it return the decoded string directly. Please tell me if something is wrong:

    Public Function DecodeMapData(ByVal Encoded As String) As String
        Dim enc() As Byte
        Dim dec() As Byte
        Dim I As Long
        Dim J As Long
        Dim D As Byte
        Dim lngLen As Long
        enc = System.Text.UnicodeEncoding.Unicode.GetBytes(Encoded)
        For I = 0 To UBound(enc)
            If (I Mod 8) Then
                ReDim Preserve dec(lngLen)
                dec(lngLen) = (enc(I) And (D >> (1 + J) Or Not 1))
                J = J + 1
                lngLen = lngLen + 1
            Else
                J = 0
                D = enc(I)
            End If
        Next I
        Return System.Text.UnicodeEncoding.Unicode.GetString(dec)
    End Function

Does the length matter?
#13
Battle.net Bot Development / Re: Warcraft III GS
December 16, 2008, 06:31 PM
Battle.Net sends you 20 games every time you request a games list I think..
#14
Battle.net Bot Development / Re: Warcraft III GS
December 16, 2008, 05:32 PM
There's no vbFromUnicode in VB.Net =/
Could you explain to be how the statstring is encoded, so I can try to make a decoding function myself?
#15
Battle.net Bot Development / Re: Warcraft III GS
December 16, 2008, 03:16 PM
I can't see a comma though.. (nor can I find one)

Perhaps only the Starcraft statstrings are comma-delimited?