From b4a2490da275ed16d0e04c7f2edf33a007221185 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 1 Jun 2018 19:27:05 +0200 Subject: [PATCH] Use getpass instead of input --- pyrogram/client/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 3ec22181..e38d752e 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -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