2014/07/13

Marapets Bot

Marapets bot fixed - cheat engine forum
Marapets bot - mediafire link

# Marabot v1.4.2 coded by SciExTron import re import sys import time import random import urllib import urllib2 import cookielib import getpass print "MaraBot v1.4.2 by SciExTron" if len(sys.argv) != 3: print "enter", sys.argv[0], " " print sys.stdout.write("enter username: ") username = sys.stdin.readline().strip() if len(username) == 0: sys.exit(0) password = getpass.getpass("enter password: ") if len(password) == 0: sys.exit(0) else: username = sys.argv[1] password = sys.argv[2] sys.stdout.write("enter loop rounds: ") rounds = sys.stdin.readline().strip() if len(rounds) == 0: rounds = 3 rounds = int(rounds) gameid = ["1001", "1002", "1003", "1004", "1005", "1006", "1007", "1008", "1009", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "3002", "3003", "3004", "3005", "3006", "3008", "3010", "3011", "3012", "3013", "3014", "3015", "3017", "4007", "4009", "4016", "4018", "4020", "4021", "4022", "4023", "4025", "5002", "5003", "5005", "5008", "5009", "6000", "6003", "6004", "6005", "6006"] random.shuffle(gameid) cookieJar = cookielib.LWPCookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookieJar)) opener.addheaders = [('User-agent', "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)")] url = "http://www.marapets.com/login.php" form = { "username" : username, "do" : "dologin"} print "Logging in..." encodedForm = urllib.urlencode(form) request = urllib2.Request(url, encodedForm) try: page = opener.open(request) except Exception,errObj: print errObj contents = page.read() matches = re.compile("") userid = re.findall(matches, contents) if len(userid) == 0: print "Can't log in!" sys.exit(0) print "Logged in!" url2 = "http://www.marapets.com/login.php?do=login" form2 = {"id" : userid[0], "password" : password, "submit" : "Login to Marapets"} print "Your userid is:", userid encodedForm2 = urllib.urlencode(form2) request2 = urllib2.Request(url2, encodedForm2) try: page2 = opener.open(request2) except Exception,errObj: print errObj contents2 = page2.read() for x in xrange(rounds): print print "Round:",x+1 print for i in xrange(len(gameid)): sleeptime = round(random.random()*3+3,2) rndtime = random.randint(1,4000) rndscore = random.randint(1,1000000) url4 = 'http://www.marapets.com/games/flash_game_'+gameid[i]+'.php' page4 = opener.open(url4) url3 = "http://www.marapets.com/gameover.php" form3 = {"playtime" : rndtime, "gamescore" : rndscore, "gameid" : gameid[i], "userid" : "undefined"} #userid[0]} encodedForm3 = urllib.urlencode(form3) request3 = urllib2.Request(url3, encodedForm3) request3.add_header('Referer', url4) try: page3 = opener.open(request3) except Exception, errObj: print errObj contents3 = page3.read() print "----------------------------------------" print "Playing game:",gameid[i] print "Sending Score:",rndscore print "Sending Time:",rndtime matchpoint = re.compile("(.*?)") points = re.findall(matchpoint, contents3) if len(points[0]) > 0: print "You currently have",points[0] if contents3.find("Your score has timed out as it took you too long to submit your score") > -1: print "Score was not accepted by server!" elif contents3.find("This score could not be submitted because it was less than 1.") > -1: print "This score could not be submitted because it was less than 1." else: print "Waiting for",sleeptime,"secs" time.sleep(sleeptime) f = open("okscore.txt","a+") data = "Score: " + str(rndscore) + "\t\tTime: " + str(rndtime) + "\t\tGame ID: " + str(gameid[i]) + "\n" f.write(data) f.close() random.shuffle(gameid) print "Exit"
Written in Python