remove color codes when running on windows

This commit is contained in:
moritz 2019-05-29 14:23:57 +02:00
parent 8cfba9eb4d
commit b1fb5f34cc

View File

@ -25,6 +25,7 @@
# - add feature: keepass integration? isnt there something like this already?
from os import name
from sys import argv, stdout, exit
from argparse import ArgumentParser
from hashlib import sha1
@ -32,9 +33,12 @@ from getpass import getpass
from requests import get
RED = "\033[1;31m"
GREEN = "\033[0;32m"
RESET = "\033[0;0m"
if name == 'nt':
(RED, GREEN, RESET) = ("", "", "")
else:
RED = "\033[1;31m"
GREEN = "\033[0;32m"
RESET = "\033[0;0m"
API = 'https://api.pwnedpasswords.com/range/'
API_MAIL = 'https://haveibeenpwned.com/api/v2/breachedaccount/'
ROW = '{:<30}{:<10}{:<45}'