mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
18 lines
516 B
Plaintext
18 lines
516 B
Plaintext
|
#!/usr/bin/env python3
|
||
|
"""
|
||
|
Password hashing utility for PyLink IRC Services.
|
||
|
"""
|
||
|
|
||
|
import passlib
|
||
|
from passlib.apps import custom_app_context as pwd_context
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
import argparse
|
||
|
|
||
|
parser = argparse.ArgumentParser(description='Hashes a password for use with PyLink IRC Services.')
|
||
|
parser.add_argument('password', help='specifies the password to hash')
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
assert args.password, "Password cannot be empty!"
|
||
|
print(pwd_context.encrypt(args.password))
|