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

#1
Battle.net Bot Development / Re: Your bots :)
March 01, 2010, 03:32 PM
I'm not currently working on any bots, but I'll post some highlights of past projects.

Backdoored`Bot
Language: Visual Basic 6
http://iroxu.com/src/uploads/idiat/bdb.png

pibot/pichat
Language: Python (PyGTK for GUI)
http://iroxu.com/src/uploads/idiat/pibot.jpg

JavaBot
Language: Python (wxPython for GUI)
Reasonably updated description: http://forum.x86labs.org/index.php/topic,12463.0.html
http://iroxu.com/src/uploads/idiat/javabot501.PNG
http://iroxu.com/src/uploads/idiat/22%20Chanug.png
http://iroxu.com/src/uploads/idiat/23%20Friends.PNG
http://iroxu.com/src/uploads/idiat/Profile.PNG

ManBot
Language: Python (Tkinter for GUI), XML (to describe logon sequence and BNLS/BNCS packets)
http://iroxu.com/src/uploads/idiat/splooge5.png

idiat's Bot
Language: C
http://iroxu.com/src/uploads/idiat/ib2.png

I'm missing screenshots of several bots in Python, several in VB, a few in PHP, and one in Java. These are just the ones I could find with a quick look and are not necessarily reflective of the current state of the projects (if I even know where the source code/binaries are).
#2
Here is something I wrote. It's a very close port from either JBLS or BNCSutil, I forget which. It's pretty shitty, but, to my knowledge, it works, and perhaps you can improve upon it.

from ctypes import c_byte, c_int32, c_uint32


def insert_byte(buf, loc, b):
    the_int = loc / 4
    the_byte = loc % 4

    replace_int = buf[the_int]

    new_byte = ord(b) << (8 * the_byte)

    if the_byte == 0:
        replace_int &= 0xFFFFFF00
    elif the_byte == 1:
        replace_int &= 0xFFFF00FF
    elif the_byte == 2:
        replace_int &= 0xFF00FFFF
    elif the_byte == 3:
        replace_int &= 0x00FFFFFF

    replace_int |= new_byte

    buf[the_int] = replace_int
   

def calc_hash_buffer(hash_data):
    hash_buffer = [0x67452301,
                   0xEFCDAB89,
                   0x98BADCFE,
                   0x10325476,
                   0xC3D2E1F0] + [0] * 0x10
    i = 0
    while i < len(hash_data):
        sub_len = len(hash_data) - i

        if sub_len > 0x40:
            sub_len = 0x40

        j = 0
        while j < sub_len:
            insert_byte(hash_buffer, j + 20, hash_data[j + i])
            j += 1

        if sub_len < 0x40:
            j = sub_len
            while j < 0x40:
                insert_byte(hash_buffer, j + 20, '\0')
                j += 1

        do_hash(hash_buffer)

        i += 0x40

    return hash_buffer[:5]

def do_hash(hash_buffer):
    buf = [0] * 0x50

    i = 0
    while i < 0x10:
        buf[i] = hash_buffer[i + 5]
        i += 1

    while i < 0x50:
        dw = buf[i - 0x3] ^ buf[i - 0x8] ^ buf[i - 0x10] ^ buf[i - 0xE]
        dw = c_byte(dw).value
        buf[i] = rol(1, dw)
        i += 1
                   
    a = c_uint32(hash_buffer[0]).value
    b = c_uint32(hash_buffer[1]).value
    c = c_uint32(hash_buffer[2]).value
    d = c_uint32(hash_buffer[3]).value
    e = c_uint32(hash_buffer[4]).value
    p = 0

    while p < 20:
        dw = rol(a, 5) + ((~b & d) | (c & b)) + e + buf[p] + 0x5a827999
        dw = c_uint32(dw).value
        e = d
        d = c
        c = c_uint32(rol(b, 0x1E)).value
        b = a
        a = dw
       
        p += 1
        i += 1

    while p < 40:
        dw = (d ^ c ^ b) + e + rol(a, 5) + buf[p] + 0x6ED9EBA1
        dw = c_uint32(dw).value
        e = d
        d = c
        c = c_uint32(rol(b, 0x1E)).value
        b = a
        a = dw

        p += 1

    while p < 60:
        dw = ((c & b) | (d & c) | (d & b)) + e + rol(a, 5) + buf[p] - 0x70E44324
        dw = c_uint32(dw).value
        e = d
        d = c
        c = c_uint32(rol(b, 0x1E)).value
        b = a
        a = dw

        p += 1

    while p < 80:
        dw = rol(a, 5) + e + (d ^ c ^ b) + buf[p] - 0x359D3E2A
        dw = c_uint32(dw).value
        e = d
        d = c
        c = c_uint32(rol(b, 0x1E)).value
        b = a
        a = dw

        p += 1

    hash_buffer[0] = c_int32(hash_buffer[0] + a).value
    hash_buffer[1] = c_int32(hash_buffer[1] + b).value
    hash_buffer[2] = c_int32(hash_buffer[2] + c).value
    hash_buffer[3] = c_int32(hash_buffer[3] + d).value
    hash_buffer[4] = c_int32(hash_buffer[4] + e).value


def rol(num, shift):
    shift &= 0x1F
    return lshift(num, shift) | rshift(num, 32 - shift)

def lshift(val, shift):
    if shift > 32:
        return 0
    elif shift < 0:
        return 0

    return val << shift

def rshift(val, shift):
    if shift > 32:
        return 0
    elif shift < 0:
        return 0

    return val >> shift


I appear to have called it in this manner:
    def single(self):
        a = xsha1.calc_hash_buffer(self.bot.connfig['login']['password'].lower())
        self.bot.status['new_pwhash'] = pack('<5l', *a)
        self.bot.events.call('hashing', 'recv', 'new_pwhash')

        return False

    def double(self):
        a = xsha1.calc_hash_buffer(self.bot.connfig['login']['password'].lower())
        bu = pack('<2L5l', self.bot.status['ctoken'],
                  self.bot.status['stoken'],
                  *a)
        b = xsha1.calc_hash_buffer(bu)
        self.bot.status['pwhash'] = pack('<5l', *b)
        self.bot.events.call('hashing', 'recv', 'pwhash')
       
        return False
#3
Battle.net Bot Development / Re: Making a Chat Bot
September 25, 2008, 10:25 PM
my definition of "enters chat' must suck. I mean, I will make a bot that connects to Diablo II using BNLS and joins its product-specific channel, handles SID_CHATEVENT.


sorry!
#4
Battle.net Bot Development / Re: Making a Chat Bot
September 24, 2008, 08:59 PM
omg i would totally make a bot in python that enters chat for $10
#5
I am interested in creating a bot using the methods suggested in this topic. My language of choice is Python, though if somebody can convince me to use something else, or if Hdx or whoever is starting their own implementation, I am flexible.
#6
So apparently Taiwanese is no longer available as a language choice for Diablo II. Does anyone have additional information on this?

QuoteGreetings,

You are receiving this e-mail because you recently purchased a copy of either Diablo II, or the expansion Diablo II: The Lord of Destruction. When you claimed the games in your Blizzard account, you were asked to choose a language. In doing so, you selected the option to have the game in Taiwanese. Unfortunately, this option is currently unavailable.

Due to this error we have de-claimed your key. This simply put, means that you will need to "re-claim" your key, choosing a different language. We apologize for any inconvenience this may have caused.

Thank you for your patience and understanding.

If you have any further questions or concerns regarding the Digital Download option from the Blizzard Online Store, please feel free to reply to this email or contact our Billing and Account Services Department by phone.  Billing representatives are on hand to take your call Monday thru Friday between 8am and 8pm Pacific Time, at 1-800-592-5499.

Andrew P.
Billing & Accounts Services
Blizzard Entertainment
#7
Well I get wrong product using both BNLS and local CD key decoding with my bot. I also get wrong product with SphtBot, which is supposed to work. On the off chance that it actually is the wrong product, I also tested with Starcraft, Warcraft II, and Warcraft III. Same results. Did Blizzard give me bad keys?
#8
Does anyone know if they haven't enabled new Diablo II keys yet? I get wrong product when I try to connect. Starcraft works on the same bot.

QuoteYour new Diablo II game key is valid for online play, and will allow you to download the game when that functionality becomes available.

implies that Diablo II keys are valid right now. Maybe not yet?
#9
I can't find the source code to my old PHP bot, but I have a PacketBuffer I wrote in Python which uses pack/unpack:

def InsertWORD(self, txt):
self.Buffer = self.Buffer + struct.pack("<H", txt)

def InsertDWORD(self, txt):
self.Buffer = self.Buffer + struct.pack("<L", txt)


unpack to extract DWORDs, WORDs, bytes, etc:

header = struct.unpack("<2cH", packet)

("packet" has the BNCS packet header only)
header[0] = 0xff
header[1] = ID
header[2] = packet length
#10
Isn't the Debug function inside the PBuffer class the "hex dumper" you guys are talking about?

Is there any reason fapiko doesn't use pack/unpack? The PacketBuffer seems incomplete.

I could fix this up a bit if fapiko's okay with that and if no one else has a "framework" which they feel would better suit Smarter's needs and if Smarter hasn't decided to do it on his own. I really don't feel like starting another PHP bot right now (I'm not even properly working on my Python bot), but I'm interested to see what others have come up with.
#12
General Discussion / Re: Website List
July 08, 2007, 12:25 PM
http://iroxu.com - A little forum-based community, mostly people from my local area
http://idiat.com - Points to this box, currently rebuilding a personal site on it
http://guild-asylum.net - A WoW guild my friend never made, I'm not renewing this domain

I guess you all know that I'm a web development wiz now.
#13
Battle.net Bot Development / Re: hmm
June 11, 2007, 10:51 PM
Quote from: Chriso on June 11, 2007, 07:58 PM
Rob and I figured out the problem, I was using iago's screen dumps instead of his.

Heres the download to his screen dumps:
http://www.onlythechosen.com/w2bn.bin
http://www.onlythechosen.com/star.bin
http://www.onlythechosen.com/sexp.bin

Updated CheckRevision.dll:
http://www.onlythechosen.com/CheckRevision.dll


What about DRTL?!?!?! If nobody has the game, I could get it myself if I knew how.
#15
Battle.net Bot Development / Re: hmm
June 07, 2007, 12:50 PM
Does anybody have a drtl.bin for the Rob/betawarz CheckRevision.dll?