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