Support checking multiple passwords with a single invocation
This commit is contained in:
parent
df6a0f1007
commit
366b730905
12
pwned.py
12
pwned.py
@ -18,12 +18,14 @@ def lookup_pwned_api(pwd):
|
|||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
api_return = lookup_pwned_api(args[0])
|
for pwd in args:
|
||||||
if api_return:
|
api_return = lookup_pwned_api(pwd)
|
||||||
print(args[0], "was found")
|
if (api_return):
|
||||||
print("Hash {0}, {1} occurences".format(api_return[0], api_return[1]))
|
print(pwd, "was found")
|
||||||
|
print("Hash {0}, {1} occurences".format(
|
||||||
|
api_return[0], api_return[1]))
|
||||||
else:
|
else:
|
||||||
print(args[0], "was not found")
|
print(pwd, "was not found")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user