mirror of https://github.com/TriliumNext/Notes
login is now configured in the ini file instead of being hardcoded
parent
6efe28c283
commit
820768c572
@ -0,0 +1,5 @@
|
|||||||
|
[Login]
|
||||||
|
# Enter below credentials with with which you want to authenticate to Notecase web app
|
||||||
|
username=adam
|
||||||
|
# This is bcrypt password hash. You can use generate-password.py (in this directory) to hash your password
|
||||||
|
password-hash=$2b$12$jcbhRx6WRbCRogpCckH1hehWrHWgFaFYC3u3ebdVURJX36..fdAca
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import bcrypt # pip install bcrypt
|
||||||
|
import getpass
|
||||||
|
|
||||||
|
password1 = getpass.getpass()
|
||||||
|
|
||||||
|
print('Repeat the same password:')
|
||||||
|
|
||||||
|
password2 = getpass.getpass()
|
||||||
|
|
||||||
|
if password1 == password2:
|
||||||
|
salt = bcrypt.gensalt()
|
||||||
|
|
||||||
|
print('Generated hash:')
|
||||||
|
print(bcrypt.hashpw(password1, salt))
|
||||||
|
else:
|
||||||
|
print('Entered passwords are not identical!')
|
||||||
Loading…
Reference in New Issue