Skip to content

Commit

Permalink
?
Browse files Browse the repository at this point in the history
  • Loading branch information
gi-b716 committed Nov 24, 2024
1 parent fa9a4c4 commit 4bbaa22
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
100 changes: 50 additions & 50 deletions autoHack.random.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion dataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def mainPage(self):
self.mainPage()

class Meta:
_version = "6.1.5"
_version = "6.1.8"


if __name__ == "__main__":
Expand Down

0 comments on commit 4bbaa22

Please sign in to comment.