mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Use getpass instead of input
This commit is contained in:
parent
dacc0173f1
commit
b4a2490da2
@ -18,6 +18,7 @@
|
||||
|
||||
import base64
|
||||
import binascii
|
||||
import getpass
|
||||
import json
|
||||
import logging
|
||||
import math
|
||||
@ -498,7 +499,7 @@ class Client(Methods, BaseClient):
|
||||
|
||||
if self.password is None:
|
||||
print("Hint: {}".format(r.hint))
|
||||
self.password = input("Enter password: ") # TODO: Use getpass
|
||||
self.password = getpass.getpass("Enter password: ")
|
||||
|
||||
if type(self.password) is str:
|
||||
self.password = r.current_salt + self.password.encode() + r.current_salt
|
||||
|
Loading…
x
Reference in New Issue
Block a user