Ow guides n tricks

Macros ow guides etc

Most active topics

Latest topics

» Badlands macro
Sun Jan 10, 2016 4:58 pm by Admin

» Trading wow stuff for ow stuff
Tue Dec 08, 2015 11:26 pm by Admin

» Gold pot buyer
Tue Dec 08, 2015 10:28 pm by Admin

» Underling buffer
Tue Dec 08, 2015 10:25 pm by Admin

» Woz transfer python made by c0d3r
Wed May 07, 2014 11:59 am by Admin

» Edcaa mob lists
Mon Apr 07, 2014 5:33 pm by Admin

» Bookmark login
Sun Jan 12, 2014 5:08 pm by Admin

» Py Kix Potion quest items transfer
Mon Sep 09, 2013 7:17 pm by Admin

» py edited version God arj
Thu Mar 21, 2013 3:28 pm by Admin

Poll


    Woz transfer python made by c0d3r

    Share

    Admin
    Admin

    Posts : 39
    Join date : 2011-11-18

    Woz transfer python made by c0d3r

    Post  Admin on Wed May 07, 2014 11:59 am

    Code:
    import threading
    import time
    import datetime
    import urllib2
    import cookielib
    import os
    import sys
    import socket
    import re


    cj = cookielib.CookieJar()
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    opener.addheaders = [('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1 ID:20120614114901')]


    USERNAME = ""
    PASSWORD = ""
    SEC_WORD = ""
    RG_SESS_ID = ""
    SERVER = ""
    SERVER_ID = ""
    START_TIME = datetime.datetime.now()
    FINISH_TIME = datetime.datetime.now()
    acctName = []
    acctID = []
    NUM_CHARS = 0
    transferToID = ""
    transferToName = ""
    countMinionCloth = 0
    countDecayTomb = 0
    countMieroMiro = 0
    countKineticForce = 0
    countSecretPurse = 0
    countLostFeather = 0
    countKineticRemains = 0
    countAllSeeingEye = 0
    countKineticBracer = 0
    countShrunkenSpirit = 0
    countKineticSpirit = 0
    countRingofKineticPower = 0
    TIMEOUT = 60 # Set higher if program crashes due to the amount you are sending over OW may take a long time to load.
    socket.setdefaulttimeout(TIMEOUT)

    def setServerID():
        global SERVER_ID
        if SERVER.lower() == "sigil":
            SERVER_ID = 1
        elif SERVER.lower() == "torax":
            SERVER_ID = 2  
        elif SERVER.lower() == "fabar":
            SERVER_ID = 3
        elif SERVER.lower() == "zimbob":
            SERVER_ID = 4
        elif SERVER.lower() == "rancid":
            SERVER_ID = 5
        elif SERVER.lower() == "quiver":
            SERVER_ID = 6
        else:
            SERVER_ID = 1



    #anti-lag-opener
    def alo(url):
        lagsafe = 1
        while lagsafe == 1:
            try:
                site = opener.open(url)
                lagsafe = 0
            except IOError:
                print "URLError: Site not loading. Retrying..."
        return site

    def alo2(url, urla):
        lagsafe = 1
        while lagsafe == 1:
            try:
                site = opener.open(url, urla)
                lagsafe = 0
            except IOError:
                print "URLError: Site not loading. Retrying..."
        return site


    def msg(out):
        thetime = time.strftime("[%H:%M:%S]", time.localtime(time.time()))
        message = thetime + " " + out
       print message
        return message

    def iB(src, start, end):
        try:
            return src.split(start)[1].split(end)[0]
        except IndexError:
            msg("Could not retrieve the inbetween value.")
            return

    def configure():
        sess = raw_input("Login with session ID? yes/no: ")
        global SERVER
        if sess.lower() == "yes":
            global RG_SESS_ID
            RG_SESS_ID = raw_input('RG Session ID: ')
            SERVER     = raw_input('Server (sigil, torax, fabar, zimbob, rancid, quiver): ')
            setServerID()
            loginRGSessionID()
        else:  
            global USERNAME, PASSWORD

            USERNAME = raw_input('RGA Username: ')
            PASSWORD = raw_input('RGA Password: ')
            SERVER   = raw_input('Server (sigil, torax, fabar, zimbob, rancid, quiver): ')
            setServerID()
            login()

            
    def loginRGSessionID():
        loginRGA = alo("http://"+SERVER+".outwar.com/accounts.php?ac_serverid="+str(SERVER_ID)+"&rg_sess_id="+RG_SESS_ID).read()
        print 'Loading Accounts...'
        AccountSelector(SERVER, SERVER_ID)

    def login():
        loginRGA = alo2("http://"+SERVER+".outwar.com/myaccount.php", "login_username="+USERNAME+"&login_password="+PASSWORD).read()
        print 'Loading Accounts...'
        AccountSelector(SERVER, SERVER_ID)

    def getCharName(src):
        #<option value="2236250" selected>Eag1e</option>
        charName = "Unknown"
        try:
            charName = src.split('" selected>')[1].split('</option>')[0]
        except:
            msg("Could not retrieve character name.")

        return charName

    def AccountSelector(server, serverid):
        x = 1
        c = 0
        global acctName, acctID
        acctName = []
        acctID = []
        totalName = 0
        
        name = alo("http://" + server + ".outwar.com/accounts.php?ac_serverid=" + str(serverid)).read()
        nameReader = name
        #print nameReader
        nameReader = nameReader.split("\n")

        while x == 1:
            nameCode = nameReader[c].strip()


            if nameCode.find('star.jpg') != -1:
                c = c + 3
                nameCode = nameReader[c].split('</b>')
                nameCode = nameCode[0].split('<b>')
                #print nameCode
                nameCode = nameCode[1]
                acctName.append(nameCode)
                totalName = totalName + 1
                
            if nameCode == "</body>" or nameCode.find('Trustee Access') != -1:
                x = 0
            else:
                c = c + 1

        x = 1
        c = 0
        while x == 1:
            nameCode = nameReader[c].strip()

            if nameCode.find('world.php?suid=') != -1:
                nameCode = nameReader[c].split('"><font color=')[0].split('href="')[1]
                acctID.append(nameCode)
            if nameCode == '</body>':
                x = 0
            else:
                c = c + 1

        c = 0
        c2 = 1
        print ''
        while totalName > c:
            temp = acctName[c]
            print str(c2) + ' - ' + temp
            c = c + 1
            c2 = c2 + 1


        x = 1
        while x == 1:
            print ''
            print 'Select Account to Send Items to'
            num = raw_input('Enter #: ')
            number = int(num)
            if number > totalName or number <= 0:
                print 'Invalid Selection'
            else:
                global NUM_CHARS
                NUM_CHARS = totalName
                x = 0
        global transferToID, transferToName
        transferToID = acctID[number-1]
        transferToName = acctName[number-1]
        print "Sending items to " + acctName[number-1] + "!"
        
        # Answer security code for access to itemtransfer.php
        alo("http://"+SERVER+".outwar.com/world.php?suid="+acctID[number-1]+"&serverid="+str(SERVER_ID))
        secret = alo2("http://"+SERVER+".outwar.com/security_prompt.php", "prompt_number=1&answer="+SEC_WORD+"&security_submitted=Continue")
        print "Security word answered"
        
        # Remove character to transfer to from chars list
        acctID.remove(acctID[number-1])
        acctName.remove(acctName[number-1])

        # Remove trustees that were added too
        while len(acctID) > totalName-1:
            try:
                acctID.pop()
            except IndexError:
                pass

    ###################################    
    ###############MAIN################
    ###################################
            
    configure()
    START_TIME = datetime.datetime.now()

    for account in acctID:
        account_ID = iB(account, "suid=", "&")
        
        alo('http://'+SERVER+'.outwar.com/world.php?suid=' + account_ID + '&serverid='+str(SERVER_ID))
        secret = alo2("http://"+SERVER+".outwar.com/security_prompt.php", "prompt_number=1&answer="+SEC_WORD+"&security_submitted=Continue")
        src = alo('http://'+SERVER+'.outwar.com/itemtransfer.php').read()

        MinionCloth = []
        DecayTomb = []
        MieroMiro = []
        KineticForce = []
        SecretPurse = []
        LostFeather = []
        KineticRemains = []
        AllSeeingEye = []
        KineticBracer = []
        ShrunkenSpirit = []
        KineticSpirit = []
        RingofKineticPower = []
        ALL = []
        
        x = 1
        c = 0

        try:
            exp = re.compile('items/item_minioncloth.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            MinionCloth.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_decaytomb.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            DecayTomb.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_mieromiro.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            MieroMiro.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_kineticforce.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            KineticForce.extend(x)
        except IndexError:
            pass

        try:
            exp = re.compile('items/item_secretpurse.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            SecretPurse.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_lostfeather.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            LostFeather.extend(x)
        except IndexError:
            pass

        try:
            exp = re.compile('items/item_kineticremains.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            KineticRemains.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_allseeingeye.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            AllSeeingEye.extend(x)
        except IndexError:
            pass

        try:
            exp = re.compile('items/item_kineticbracer.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            KineticBracer.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/item_shrunkenspirit.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            ShrunkenSpirit.extend(x)
        except IndexError:
            pass

        try:
            exp = re.compile('items/item_kineticspirit.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            KineticSpirit.extend(x)
        except IndexError:
            pass
        
        try:
            exp = re.compile('items/ringofkineticpower.jpg" ONMOUSEOVER="itempopup\(event,([0-9]+)\)"; ')
            x = re.findall(exp, src)
            RingofKineticPower.extend(x)
        except IndexError:
            pass
        
        print "Found: " + str(len(MinionCloth)) + " MinionCloths, " + str(len(DecayTomb)) + " DecayTombs, " + str(len(MieroMiro)) + " MieroMiros, " + str(len(KineticForce)) + " KineticForces, " + str(len(SecretPurse)) + " SecretPurses, " + str(len(LostFeather)) + " LostFeathers, " + str(len(KineticRemains)) + " KineticRemainss, " + str(len(AllSeeingEye)) + " AllSeeingEyes, " + str(len(KineticBracer)) + " KineticBracers, " + str(len(ShrunkenSpirit)) + " ShrunkenSpirits, " + str(len(KineticSpirit)) + " KineticSpirits, " + str(len(RingofKineticPower)) + " RingofKineticPowers on " + getCharName(src)

        ALL.extend(MinionCloth)
        ALL.extend(DecayTomb)
        ALL.extend(MieroMiro)
        ALL.extend(KineticForce)
        ALL.extend(SecretPurse)
        ALL.extend(LostFeather)
        ALL.extend(KineticRemains)
        ALL.extend(AllSeeingEye)
        ALL.extend(KineticBracer)
        ALL.extend(ShrunkenSpirit)
        ALL.extend(KineticSpirit)
        ALL.extend(RingofKineticPower)
        
        if len(ALL) > 0:
            
            countMinionCloth = countMinionCloth + len(MinionCloth)
            countDecayTomb = countDecayTomb + len(DecayTomb)
            countMieroMiro = countMieroMiro + len(MieroMiro)
            countKineticForce = countKineticForce + len(KineticForce)
            countSecretPurse = countSecretPurse + len(SecretPurse)
            countLostFeather = countLostFeather + len(LostFeather)
            countKineticRemains = countKineticRemains + len(KineticRemains)
            countAllSeeingEye = countAllSeeingEye + len(AllSeeingEye)
            countKineticBracer = countKineticBracer + len(KineticBracer)
            countShrunkenSpirit = countShrunkenSpirit + len(ShrunkenSpirit)
            countKineticSpirit = countKineticSpirit + len(KineticSpirit)
            countRingofKineticPower = countRingofKineticPower + len(RingofKineticPower)
            
            postData = ""
            for itemid in ALL:
                if itemid == ALL[0]:
                    postData = postData + "checkbox[]=" + itemid
                else:
                    postData = postData + "&checkbox[]=" + itemid

            postData = postData + "&self=" + str(iB(transferToID, "suid=", "&")) + "&submit=Send items!"
            transfer = alo2('http://'+SERVER+'.outwar.com/itemtransfer.php', postData).read()
            if "backpack is full" in transfer:
                print transferToName + "'s backpack is full, please empty it and restart."
            else:
                print "Transferred "+str(len(ALL))+" items from " + getCharName(src)
        
    print ""
    print "Totals: " +str(countMinionCloth)+ " MinionCloths, " +str(countDecayTomb)+ " DecayTombs, " +str(countMieroMiro)+ " MieroMiros, " +str(countKineticForce)+ " KineticForces, " +str(countSecretPurse)+ " SecretPurses,  " +str(countLostFeather)+ " LostFeathers, " +str(countKineticRemains)+ " KineticRemainss, " +str(countAllSeeingEye)+ " AllSeeingEyes, " +str(countKineticBracer)+ " KineticBracers, " +str(countShrunkenSpirit)+ " ShrunkenSpirits, " +str(countKineticSpirit)+ " KineticSpirits, " +str(countRingofKineticPower)+ " RingofKineticPowers."

    FINISH_TIME = datetime.datetime.now()
     
    tTime = FINISH_TIME - START_TIME
    print "Total time taken for RGA: " + str(tTime.seconds) + " seconds."
    time.sleep(2222)

      Current date/time is Fri Sep 22, 2017 9:59 am