Beispiel #1
0
#Time to wait between each cycle in seconds
wait = round(uniform(0, 1), 2)
wait_load = round(uniform(1, 5), 2)

c = Console(api)
u = Update(api)
b = Botnet(api)
updatecount = 0
attackneeded = False

while True:
    attackneeded = False

    stat = "0"
    while "0" in stat:
        stat = u.startTask(updates[updatecount])
        if "0" in stat:
            print "updating " + updates[updatecount] + " level +1"
            #print "Started Update
            print "Waiting... in update"
            #u.useBooster()
            time.sleep(wait_load)
            updatecount += 1
            if updatecount == 14:
                while updatecount > 0:
                    print(u.getTasks())
                    #u.useBooster()

                if updatecount:
                    pass
                    #u.finishAll()
Beispiel #2
0
class run:
    def __init__(self):
        """
        Pull all variables from config.py file.
        """
        self.player = Player()
        self.database = config.database
        self.Max_point_tournament = config.Max_point_tournament
        self.BotNet_update = config.BotNet_update
        self.joinTournament = config.joinTournament
        self.tournament_potator = config.tournament_potator
        self.booster = config.booster
        self.Use_netcoins = config.Use_netcoins
        self.attacks_normal = config.attacks_normal
        self.updates = config.updates
        self.updatecount = config.updatecount
        self.maxanti_normal = config.maxanti_normal
        self.active_cluster_protection = config.active_cluster_protection
        self.mode = config.mode
        self.min_energy_botnet = config.minimal_energy_botnet_upgrade
        self.stat = "0"
        self.wait_load = config.wait_load
        self.c = Console(self.player)
        self.u = Update(self.player)
        # disable botnet for > api v13
        self.b = Botnet(self.player)
        self.ddos = ddos.Ddos(self.player)
        self.m = Mails(self.player)
        self.init()

    def init(self):
        logger.info(
            "Welcome to ZeusBot v2.2 (Patch 1) for 'vHackXT 1.66' (API Version 16) by ATVG-Studios and OlympicCode!"
        )
        while True:
            # update the player
            time.sleep(self.wait_load)
            stat = "0"
            # prepare account
            self.get_max_update = int(self.u.infoUpdate("ram", "new")) - 1
            self.running_all = self.u.runningtasks()
            logger.info("You have {} of {} tasks running.".format(
                self.running_all, self.get_max_update))

            if int(self.running_all) < int(self.get_max_update):
                while "0" in stat or "3" in stat:
                    if int(self.u.runningtasks()) < int(
                            self.u.infoUpdate("ram", "new")) - 1:
                        try:
                            moneyforupdate = int(
                                self.u.infoUpdate(
                                    self.updates[self.updatecount]))
                        except IndexError:
                            logger.info("reset")
                            self.updatecount = 0
                            moneyforupdate = int(
                                self.u.infoUpdate(
                                    self.updates[self.updatecount]))
                            stat = "1"
                        mymoney = int(json.loads(self.c.myinfo())["money"])

                        if mymoney < moneyforupdate:
                            self.updatecount += 1

                            try:
                                logger.info(
                                    "You neeed {}$ for the update '{}', but you only have {}$"
                                    .format(moneyforupdate,
                                            self.updates[self.updatecount],
                                            mymoney))
                            except IndexError:
                                stat = "1"

                            totaltask = int(self.u.runningtasks()) + int(
                                self.updatecount)
                            if int(totaltask) == int(self.get_max_update):
                                stat = "1"
                        else:
                            (stat, levelupdates) = self.u.startTask(
                                self.updates[self.updatecount])
                            if "3" in stat or "0" in stat:
                                logger.info(
                                    "I am updating '{}' to level {}".format(
                                        self.updates[self.updatecount],
                                        int(levelupdates) + 1))
                                # print "Started Update
                                logger.info("Waiting! Doing updates..")
                                # u.useBooster()
                                self.updatecount += 1
                                totaltask = int(self.u.runningtasks()) + int(
                                    self.updatecount)
                                if int(totaltask) == int(self.get_max_update):
                                    stat = "1"
                    else:
                        break

            # recheck running ask for boost and netcoins
            self.running_all = self.u.runningtasks()

            self.ddos.run_ddos()
            if self.BotNet_update:
                botnet = json.loads(self.b._botnetInfo())
                if int(botnet['count']) > 0 and int(
                        botnet['energy']) > self.min_energy_botnet:
                    for count, i in enumerate(botnet['data']):
                        self.b.upgradebotnet(i['hostname'], int(i['running']),
                                             count)
                else:
                    if int(botnet['count']) == 0:
                        logger.info("You don't have a botnet!")

                    if int(botnet['energy']) == 0:
                        logger.info(
                            "You don't have enough energy to update you'r botnet!"
                        )
                    else:
                        logger.info("Your botnet energy (" +
                                    str(botnet['energy']) + ") is less than " +
                                    str(self.min_energy_botnet) +
                                    "! Please wait for regeneration..")

            # attack botnet
            #number_botnet = json.loads(self.b._botnetInfo())
            #if int(number_botnet['count']) > 0:
            #    self.b.attack()

            if self.joinTournament and self.c.getTournament():
                self.mode = "Potator"
                logger.info("** Force Mode to 'Potator' for Tournament **")
            # task = self.u.doTasks(self.wait_load)
            if self.booster and self.running_all > 1:
                try:
                    vtasks = self.u.getrunningtasks()
                    json_data = json.loads(vtasks)
                    while len(json_data["data"]) > 1:
                        if int(json_data["boost"]) > 5:
                            json_data = json.loads(self.u.useBooster())
                            logger.info("Using booster on rest {}".format(
                                json_data["boost"]))
                            if int(json_data['fAllCosts']) < 50:
                                break
                        # UPDATE Value
                        else:
                            logger.info("You have less than 5 boost's.")
                            break
                except Exception as e:
                    logger.error("Connection Error try again.. {0}".format(e))
                    pass
            if self.Use_netcoins:
                time.sleep(2)
                if self.player.netcoins > 1 and self.running_all > 1:
                    self.u.finishAll()
                    self.player.refreshinfo()  # update player info
                    logger.info("I used Netcoins for finish all you'r task.")
            if self.player.email > 0:
                time.sleep(self.wait_load)
                logger.info('Reading mails..')
                self.m.read_mails()

            # attack players
            self.c.attack(self)
Beispiel #3
0
class run:
    def __init__(self):
        """
        Pull all variables from config.py file.
        """
        self.player = Player()
        self.database = config.database
        self.Max_point_tournament = config.Max_point_tournament
        self.BotNet_update = config.BotNet_update
        self.joinTournament = config.joinTournament
        self.tournament_potator = config.tournament_potator
        self.booster = config.booster
        self.Use_netcoins = config.Use_netcoins
        self.attacks_normal = config.attacks_normal
        self.updates = config.updates
        self.updatecount = config.updatecount
        self.maxanti_normal = config.maxanti_normal
        self.active_cluster_protection = config.active_cluster_protection
        self.mode = config.mode
        self.stat = "0"
        self.wait_load = config.wait_load
        self.c = Console(self.player.username, self.player.password)
        self.u = Update(self.player.username, self.player.password)
        self.b = Botnet(self.player)
        self.ddos = ddos.Ddos()
        self.init()

    def init(self):
        while True:
            # update the player

            time.sleep(self.wait_load)
            stat = "0"
            # prepare account
            self.get_max_update = int(self.u.infoUpdate("ram", "new"))
            self.running_all = self.u.runningtasks()
            print("your are running " + str(self.running_all) + "/" +
                  str(self.get_max_update) + " tasks")

            if int(self.running_all) < int(self.get_max_update):
                while "0" in stat or "3" in stat:

                    try:
                        moneyforupdate = int(
                            self.u.infoUpdate(self.updates[self.updatecount]))
                    except IndexError:
                        print("reset")
                        self.updatecount = 0
                        moneyforupdate = int(
                            self.u.infoUpdate(self.updates[self.updatecount]))

                    time.sleep(self.wait_load)
                    mymoney = int(json.loads(self.c.myinfo())["money"])

                    if mymoney < moneyforupdate:
                        self.updatecount += 1

                        try:
                            print "require " + str(
                                moneyforupdate
                            ) + "$ for update " + self.updates[
                                self.updatecount] + " your money " + str(
                                    mymoney) + "$"
                        except IndexError:
                            stat = "1"

                        totaltask = int(self.u.runningtasks()) + int(
                            self.updatecount)
                        time.sleep(self.wait_load)
                        if int(totaltask) == int(self.get_max_update):
                            stat = "1"
                    else:
                        time.sleep(self.wait_load)
                        stat = self.u.startTask(self.updates[self.updatecount])
                        if "3" in stat:
                            print "updating " + self.updates[
                                self.updatecount] + " level +1"
                            #print "Started Update
                            print "Waiting... in update"
                            #u.useBooster()
                            time.sleep(self.wait_load)
                            self.updatecount += 1
                            totaltask = int(self.u.runningtasks()) + int(
                                self.updatecount)
                            if int(totaltask) == int(self.get_max_update):
                                stat = "1"

            # recheck running ask for boost and netcoins
            self.running_all = self.u.runningtasks()

            self.ddos.run_ddos()
            if self.BotNet_update:
                self.b.upgradebotnet()
            # attack botnet
            self.b.attack()
            if self.joinTournament and self.c.getTournament():
                self.mode = "Potator"
                print "** Force Mode to 'Potator' for Tournament **"
            # task = self.u.doTasks(self.wait_load)
            if self.booster and self.running_all > 1:
                try:
                    # usebooster = self.u.getTasks()
                    usebooster = None
                    json_data = json.loads(usebooster)
                    while len(json_data["data"]) > 1:
                        if int(json_data["boost"]) > 5:
                            self.u.useBooster()
                            print "Using booster on rest " + str(
                                int(json_data["boost"]) - 1)
                        # UPDATE Value
                        else:
                            print "you have < 5 boost."
                            break
                        # usebooster = self.u.getTasks()
                        usebooster = None
                        json_data = json.loads(usebooster)
                except Exception as e:
                    print "Connection Error try again...{0}".format(e)
                    pass
            if self.Use_netcoins:
                time.sleep(2)
                if self.player.netcoins > 1 and self.running_all > 1:
                    self.u.finishAll()
                    self.player.refreshinfo()  # update player info
                    print "I used Netcoins for finish all task."
            # attack players
            self.c.attack(self)
Beispiel #4
0
class run:
    def __init__(self):
        """
        Pull all variables from config.py file.
        """
        self.player = Player()
        self.database = config.database
        self.Max_point_tournament = config.Max_point_tournament
        self.BotNet_update = config.BotNet_update
        self.joinTournament = config.joinTournament
        self.tournament_potator = config.tournament_potator
        self.booster = config.booster
        self.Use_netcoins = config.Use_netcoins
        self.attacks_normal = config.attacks_normal
        self.updates = config.updates
        self.updatecount = config.updatecount
        self.maxanti_normal = config.maxanti_normal
        self.active_cluster_protection = config.active_cluster_protection
        self.mode = config.mode
        self.stat = "0"
        self.wait_load = config.wait_load
        self.c = Console(self.player)
        self.u = Update(self.player)
        self.b = Botnet(self.player)
        self.ddos = ddos.Ddos(self.player)
        self.init()

    def init(self):
        while True:
            # update the player

            time.sleep(self.wait_load)
            stat = "0"
            # prepare account
            self.get_max_update = int(self.u.infoUpdate("ram", "new")) - 1
            self.running_all = self.u.runningtasks()
            logger.info("you are running {}/{} tasks".format(self.running_all, self.get_max_update))

            if int(self.running_all) < int(self.get_max_update):
                while "0" in stat or "3" in stat:
                    if int(self.u.runningtasks()) < int(self.u.infoUpdate("ram", "new")) - 1:
                        try:
                            moneyforupdate = int(self.u.infoUpdate(self.updates[self.updatecount]))
                        except IndexError:
                            logger.info("reset")
                            self.updatecount = 0
                            moneyforupdate = int(self.u.infoUpdate(self.updates[self.updatecount]))
                            stat = "1"
                        mymoney = int(json.loads(self.c.myinfo())["money"])

                        if mymoney < moneyforupdate:
                            self.updatecount += 1

                            try:
                                logger.info("require {}$ for update {} your money {}$".format(moneyforupdate, self.updates[self.updatecount], mymoney))
                            except IndexError:
                                stat = "1"

                            totaltask = int(self.u.runningtasks()) + int(self.updatecount)
                            if int(totaltask) == int(self.get_max_update):
                                stat = "1"
                        else:
                            stat = self.u.startTask(self.updates[self.updatecount])
                            if "3" in stat or "0" in stat:
                                logger.info("updating {} level +1".format(self.updates[self.updatecount]))
                                # print "Started Update
                                logger.info("Waiting... in update")
                                # u.useBooster()
                                self.updatecount += 1
                                totaltask = int(self.u.runningtasks()) + int(self.updatecount)
                                if int(totaltask) == int(self.get_max_update):
                                    stat = "1"
                    else:
                        break

            # recheck running ask for boost and netcoins
            self.running_all = self.u.runningtasks()

            self.ddos.run_ddos()
            if self.BotNet_update:
                self.b.upgradebotnet()
            # attack botnet
            self.b.attack()
            if self.joinTournament and self.c.getTournament():
                self.mode = "Potator"
                logger.info("** Force Mode to 'Potator' for Tournament **")
            # task = self.u.doTasks(self.wait_load)
            if self.booster and self.running_all > 1:
                try:
                    vtasks = self.u.getrunningtasks()
                    json_data = json.loads(vtasks)
                    while len(json_data["data"]) > 1:
                        if int(json_data["boost"]) > 5:
                            json_data = json.loads(self.u.useBooster())
                            logger.info("Using booster on rest {}".format(json_data["boost"]))
                            if int(json_data['fAllCosts']) < 50:
                                break
                        # UPDATE Value
                        else:
                            logger.info("you have < 5 boost.")
                            break
                except Exception as e:
                    logger.error("Connection Error try again...{0}".format(e))
                    pass
            if self.Use_netcoins:
                time.sleep(2)
                if self.player.netcoins > 1 and self.running_all > 1:
                    self.u.finishAll()
                    self.player.refreshinfo()  # update player info
                    logger.info("I used Netcoins for finish all task.")
            # attack players
            self.c.attack(self)