mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
18 lines
606 B
Python
Executable File
18 lines
606 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""
|
|
Password hashing utility for PyLink IRC Services.
|
|
"""
|
|
|
|
from pylinkirc.coremods.login import 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 pwd_context, 'Cannot hash passwords because passlib is missing! Install it via "pip3 install passlib".'
|
|
assert args.password, "Password cannot be empty!"
|
|
print(pwd_context.encrypt(args.password))
|