custom error + better code + some things

This commit is contained in:
piair338
2022-10-31 14:32:39 +00:00
parent 945497c1d4
commit c9aa75e61c
4 changed files with 132 additions and 70 deletions

View File

@ -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
View File

@ -0,0 +1,5 @@
class Banned(Exception):
pass
class NotBanned(Exception):
pass

View File

@ -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 :