mirror of
https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
synced 2025-06-12 22:24:47 +02:00
custom error + better code + some things
This commit is contained in:
@ -18,11 +18,30 @@ Setup for option, like --override or --fulllog
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument(
|
||||
"-o", "--override", help="override", dest="override", action="store_true"
|
||||
"-o",
|
||||
"--override",
|
||||
help="override",
|
||||
dest="override",
|
||||
action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-l", "--log", dest="log", help="enable logging in terminal", action="store_true"
|
||||
"-u",
|
||||
"--unban",
|
||||
help="unban an account",
|
||||
dest="unban",
|
||||
action="store_true"
|
||||
)
|
||||
|
||||
|
||||
parser.add_argument(
|
||||
"-l",
|
||||
"--log",
|
||||
dest="log",
|
||||
help="enable logging in terminal",
|
||||
action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-fl",
|
||||
"--fulllog",
|
||||
@ -31,15 +50,23 @@ parser.add_argument(
|
||||
action="store_true",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-r", "--risky", help="make the program faster, probably better risk of ban", dest="fast", action="store_true"
|
||||
"-r",
|
||||
"--risky",
|
||||
help="make the program faster, probably better risk of ban",
|
||||
dest="fast",
|
||||
action="store_true"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-c", "--config", help="Choose a specific config file", type=argparse.FileType('r')
|
||||
"-c",
|
||||
"--config",
|
||||
help="Choose a specific config file",
|
||||
type=argparse.FileType('r')
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
CUSTOM_START = args.override
|
||||
UNBAN = args.unban
|
||||
LOG = args.log
|
||||
FULL_LOG = args.fulllog
|
||||
FAST = args.fast
|
||||
@ -115,3 +142,7 @@ else :
|
||||
g.close()
|
||||
|
||||
|
||||
with open(CREDENTIALS_PATH) as f:
|
||||
reader = reader(f)
|
||||
Credentials = list(reader)
|
||||
shuffle(Credentials)
|
5
modules/error.py
Normal file
5
modules/error.py
Normal file
@ -0,0 +1,5 @@
|
||||
class Banned(Exception):
|
||||
pass
|
||||
|
||||
class NotBanned(Exception):
|
||||
pass
|
@ -90,7 +90,6 @@ def CustomSleep(temps):
|
||||
passe += 0.125
|
||||
print(f"{points[i]} - {round(float(temps) - passe, 3)}", end="\r")
|
||||
print(" ", end="\r")
|
||||
|
||||
else:
|
||||
sleep(temps)
|
||||
except KeyboardInterrupt :
|
||||
|
Reference in New Issue
Block a user