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