Advertisement
TheonlyTazz

Old DCAA with Multithread Exploit.py

Mar 15th, 2013
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.46 KB | None | 0 0
  1.                                                                      
  2.                                                                      
  3.                                                                      
  4.                                              
  5. import msvcrt
  6. import time
  7. import urllib2
  8. import cookielib
  9. import thread
  10. import re
  11. import os
  12. import getpass
  13. import webbrowser
  14. import color_console as cons
  15.  
  16. def room():
  17.      for x in range(len(field)):
  18.           if field[x] == " ":
  19.                print field[x]
  20.                sys.stdout.flush()
  21.           elif field[x]=="O":
  22.                default_colors = cons.get_text_attr()
  23.                default_bg = default_colors & 0x0070
  24.                default_fg = default_colors & 0x0007
  25.                cons.set_text_attr(cons.BACKGROUND_RED | default_bg |
  26.                           cons.BACKGROUND_INTENSITY)
  27.                print(" ")
  28.                cons.set_text_attr(default_colors)
  29.                sys.stdout.flush()
  30.           if x == 6 and x == 13:
  31.                print ""
  32.  
  33.  
  34. loop = 1
  35. server=""
  36. use=""
  37. info = "Server: ["+server+"] | RGA: ["+use+ "]\n"
  38. Header = """
  39. ____________________________
  40.     |   |_____| ____/ ____/
  41.     |   |     |/_____/_____                                                                  
  42. -------------------------------
  43. """
  44.  
  45. #getch()
  46. def getch():
  47.      os.system("bash -c \"read -n 1\"")
  48. #Cookiejar and Opener
  49. cj = cookielib.CookieJar()
  50. opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  51. opener.addheaders = [('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6')]
  52.  
  53.  
  54. f = lambda v, l: [v[i*l:(i+1)*l] for i in range(int(math.ceil(len(v)/float(l))))]
  55.  
  56. def header():
  57.     os.system("cls")
  58.     print Header
  59.     print info
  60. #anti-lag
  61. def openurl(url):
  62.     lagsafe = 1
  63.     while lagsafe == 1:
  64.         try:
  65.             site = opener.open(url)
  66.             lagsafe = 0
  67.         except IOError:
  68.             print "Lag..."
  69.         return site
  70. #
  71. def alo2(url, urla):
  72.  
  73.     lagsafe = 1
  74.     while lagsafe == 1:
  75.         try:
  76.             site = opener.open(url, urla)
  77.             lagsafe = 0
  78.         except IOError:
  79.             print "Lag..."
  80.         return site
  81.  
  82. # Define a function for the thread
  83. def Questfinish( threadName, delay):
  84.     count = 0
  85.     while count != 1:
  86.         count += 1
  87.        
  88.         openurl("http://"+server+".outwar.com/"+finish[0])
  89.  
  90.          
  91. # Define a function for the thread
  92. def Wildthread( threadName, delay):
  93.     count = 0
  94.     while count != 1:
  95.         count += 1
  96.        
  97.         openurl("http://"+server+".outwar.com/newattack.php?attackid="+attack[y]+"&r=wilderness&wilderness=0")
  98.  
  99. amountsockets= range(25)
  100. print Header+info
  101. print "Login:"
  102. #login = msvcrt.getch()
  103. login = raw_input(">")
  104. users = []
  105. servers = []
  106.  
  107.  
  108.  
  109. server = servers[int(login)-1]
  110. use = users[int(login)-1]
  111. info = "Server: ["+server+"] | RGA: ["+use+ "]"
  112. header()
  113. pas = raw_input("Pass:\n")
  114.  
  115.  
  116.  
  117. loginrpg = alo2("http://"+server+".outwar.com/myaccount.php", "login_username="+use+"&login_password="+pas+"")
  118.  
  119. cookie = str(cj)
  120. cooksplit = cookie.split('<')
  121. cooki = re.findall('rg_sess_id=(.*?) for .outwar.com/>', cooksplit[6])
  122.  
  123. #webbrowser.open("http://"+server+".outwar.com/world.php?rg_sess_id="+cooki[0])
  124. #raw_input("Opening Session in Browser\nPress any Key to Continue.")
  125. #webbrowser.open("http://"+server+".outwar.com/world.php?rg_sess_id="+cooki[0])
  126. while 1:
  127.     room = openurl("http://quiver.outwar.com/ajax_changeroomb.php").read()
  128.     mobname = []
  129.     moblvl = []
  130.     attack = []
  131.     attacklvl=[]
  132.     attackname=[]
  133.     #Mob reading
  134.     try:
  135.         mobinfo = re.findall("""size=\\\\"2\\\\"><b>(.*?)\\\\"><font color=\\\\""", room)
  136.         for x in range(len(mobinfo)):
  137.              try:
  138.                   mobname.append(str(x)+") "+re.findall("Attack",mobinfo[x])[0]+" "+re.findall("""(.*?)<\\\\/b><br>Level""", mobinfo[x])[0])
  139.                   attackname.append(re.findall("""(.*?)<\\\\/b><br>Level""", mobinfo[x])[0])
  140.                   moblvl.append(re.findall("""Level: (.*?)<\\\\""", mobinfo[x])[0])
  141.                   attacklvl.append(re.findall("""Level: (.*?)<\\\\""", mobinfo[x])[0])
  142.                   attack.append(re.findall("attackid=(.*?)&r=world", mobinfo[x])[0])
  143.              except:
  144.                   mobname.append(str(x)+") Quest "+re.findall("""(.*?)<\\\\/b><br>Level""", mobinfo[x])[0])
  145.                   moblvl.append(re.findall("""Level: (.*?)<\\\\""", mobinfo[x])[0])
  146.                                      
  147.        # mobname = re.findall("""size=\\\\"2\\\\"><b>(.*?)<\\\\/b><br>Level:""", room)
  148.         #moblvl = re.findall("""Level: (.*?)<\\\\""", room)
  149.  
  150.  
  151.     except:
  152.         print ""
  153.     #rooms
  154.     curroom = re.findall('curRoom":"(.*?)",', room)[0]
  155.     north = re.findall('north":"(.*?)",', room)[0]
  156.     south = re.findall('south":"(.*?)",', room)[0]
  157.     east = re.findall('east":"(.*?)",', room)[0]
  158.     west = re.findall('west":"(.*?)",', room)[0]
  159.     #map Creating
  160.     map = room[:10000]
  161.     field = re.findall(""""text-align:center;vertical-align:middle;color:white;background-color:(.*?);\\\\" """, map)
  162.     for x in range(len(field)):
  163.             if field[x] == "#333333;background-image:url(\\/landing\\/defroom.gif)":
  164.                     field[x] = " "
  165.             else:
  166.                     field[x] = "O"
  167.  
  168.    
  169.     line1 = field[0]+field[1]+field[2]+field[3]+field[4]+field[5]+field[6]+"|    What to do??"
  170.     line2 = field[7]+field[8]+field[9]+field[10]+field[11]+field[12]+field[13]+"|    W)Move North    R) Refresh Room"
  171.     line3 = field[14]+field[15]+field[16]+field[17]+field[18]+field[19]+field[20]+"|    A)Move West     O) Open in Browser"
  172.     line4 = field[21]+field[22]+field[23]+"Y"+field[25]+field[26]+field[27]+"|    S)Move South    P) Prefences*NOT WORKING*"
  173.     line5 = field[28]+field[29]+field[30]+field[31]+field[32]+field[33]+field[34]+"|    D)Move East"
  174.     line6 = field[35]+field[36]+field[37]+field[38]+field[39]+field[40]+field[41]+"|    E)Attack Whole Room"
  175.     line = [line1,line2,line3,line4,line5,line6]
  176.  
  177.     header()
  178.     print "\n________"
  179.     for x in range(6):
  180.         print "|"+line[x]
  181.     print "________\n"
  182.     try:
  183.         for x in range(len(mobname)):
  184.             print mobname[x] + " - Level: " + moblvl[x]
  185.     except:
  186.         dummy = 0
  187.     #print "\nAction:"
  188.     action = raw_input("Action: ")
  189.    # action = msvcrt.getch()
  190.     print ""
  191.  
  192.     try:
  193.         if action == "w":
  194.             room = openurl("http://"+server+".outwar.com/ajax_changeroomb.php?room="+north+"&lastroom="+curroom).read()
  195.         elif action == "a":
  196.             room == openurl("http://"+server+".outwar.com/ajax_changeroomb.php?room="+west+"&lastroom="+curroom).read()
  197.         elif action == "s":
  198.             room = openurl("http://"+server+".outwar.com/ajax_changeroomb.php?room="+south+"&lastroom="+curroom).read()
  199.         elif action == "d":
  200.             room = openurl("http://"+server+".outwar.com/ajax_changeroomb.php?room="+east+"&lastroom="+curroom).read()
  201.         elif action == "e":
  202.              for y in range(len(attack)):
  203.                for x in amountsockets:
  204.                        thread.start_new_thread( Wildthread, ("attack mobs3", 0, ) )
  205.                        header()
  206.                        print "Killing " + attackname[y] + " | Level: " +attacklvl[y]
  207.                time.sleep(1)
  208.                room = openurl("http://quiver.outwar.com/ajax_changeroomb.php").read()
  209.         elif action == "r":
  210.             print "Refreshing Room. Please Wait..."
  211.             room = openurl("http://"+server+".outwar.com/ajax_changeroomb.php").read()
  212.            
  213.         elif action == "o":
  214.             webbrowser.open("http://"+server+".outwar.com/world.php?rg_sess_id="+cooki[0])
  215.  
  216.         elif action == "q":
  217.                talk = openurl("http://"+server+".outwar.com/mob.php?userpawn=&id="+quest[0]).read()
  218.                text = re.findall("<p>(.*?)</p>", talk)
  219.                a = re.findall("""font size="3"><b>(.*?)</b>""", talk)
  220.                quest = re.findall("""a href="(.*?)"><""", talk)
  221.                header()
  222.                print text[0]
  223.                raw_input(a[0])
  224.                talk1 = openurl("http://"+server+".outwar.com/"+quest[0]).read()
  225.                finish = re.findall("""a href="(.*?)"><""", talk1)
  226.                for x in amountsockets:
  227.                         thread.start_new_thread( Questfinish, ("Quest", 0, ) )
  228.                print "quest finish"
  229.                
  230.            
  231.     except:
  232.         print "unknown error"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement