diff --git a/autoHack.random.py b/autoHack.random.py index cb9ed6b..ac1b2ad 100644 --- a/autoHack.random.py +++ b/autoHack.random.py @@ -77,65 +77,65 @@ os.system("cls") if config.checkerFile != "" and config.useTestlib: - checkerResFile = open("checkerResult","r") - checkerRes = checkerResFile.read() - checkerResFile.close() - os.system("del checkerResult /q") - print("{0}".format(checkerRes)) - logger.debug("{0} Exit code: {1}.".format(checkerRes.replace("\n"," | "),result[8])) - if result[0]==-1: + checkerResFile = open("checkerResult","r") + checkerRes = checkerResFile.read() + checkerResFile.close() + os.system("del checkerResult /q") + print("{0}".format(checkerRes)) + logger.debug("{0} Exit code: {1}.".format(checkerRes.replace("\n"," | "),result[8])) + if result[0]==-1: + os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) + os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + print("Checker failed!") + sys.exit(0) + if result[0]!=1: + os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) + os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + time.sleep(config.waitTime) + diffCount += 1 + + elif result[1]==True: os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - print("Checker failed!") - sys.exit(0) - if result[0]!=1: + os.system("cls") + print("Time Limit Exceeded!") + logger.warning("Time Limit Exceeded! Exceed {0} ms".format(result[2])) + time.sleep(config.waitTime) + diffCount += 1 + + elif result[5]!=0: os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + os.system("cls") + print("Runtime Error! Exit code: {0}".format(result[5])) + logger.warning("Runtime Error! Exit code: {0}".format(result[5])) time.sleep(config.waitTime) diffCount += 1 - elif result[1]==True: - os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) - os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - os.system("cls") - print("Time Limit Exceeded!") - logger.warning("Time Limit Exceeded! Exceed {0} ms".format(result[2])) - time.sleep(config.waitTime) - diffCount += 1 - - elif result[5]!=0: - os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) - os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - os.system("cls") - print("Runtime Error! Exit code: {0}".format(result[5])) - logger.warning("Runtime Error! Exit code: {0}".format(result[5])) - time.sleep(config.waitTime) - diffCount += 1 - - elif result[6]==True: - os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) - os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - os.system("cls") - print("Memory Limit Exceeded!") - logger.warning("Memory Limit Exceeded! Exceed {0} MB".format(result[7])) - time.sleep(config.waitTime) - diffCount += 1 + elif result[6]==True: + os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) + os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + os.system("cls") + print("Memory Limit Exceeded!") + logger.warning("Memory Limit Exceeded! Exceed {0} MB".format(result[7])) + time.sleep(config.waitTime) + diffCount += 1 - elif result[0]==0: - os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) - os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - os.system("cls") - print("Catch diff!") - logger.warning("Catch diff!") - time.sleep(config.waitTime) - diffCount += 1 + elif result[0]==0: + os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) + os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + os.system("cls") + print("Catch diff!") + logger.warning("Catch diff!") + time.sleep(config.waitTime) + diffCount += 1 - elif result[0]!=0 and result[0]!=1: - os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) - os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) - print("Checker failed! Exit code: {0}".format(result[0])) - logger.error("Checker failed! Exit code: {0}".format(result[0])) - sys.exit(0) + elif result[0]!=0 and result[0]!=1: + os.system("move .\\{0} .\\hackData\\{0}".format(refer[0])) + os.system("move .\\{0} .\\hackData\\{0}".format(refer[1])) + print("Checker failed! Exit code: {0}".format(result[0])) + logger.error("Checker failed! Exit code: {0}".format(result[0])) + sys.exit(0) if diffCount == config.wrongLimits: sys.exit(0) diff --git a/dataGenerator.py b/dataGenerator.py index 7489332..73ac9ac 100644 --- a/dataGenerator.py +++ b/dataGenerator.py @@ -341,7 +341,7 @@ def mainPage(self): self.mainPage() class Meta: - _version = "6.1.5" + _version = "6.1.8" if __name__ == "__main__":