Skip to content

Commit d818c53

Browse files
committed
use getpass
1 parent e968e7f commit d818c53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dailyFudan3.0.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from json import loads as json_loads
33
from os import path as os_path
44
from sys import exit as sys_exit
5+
from getpass import getpass
56

67
from lxml import etree
78
from requests import session
@@ -203,7 +204,7 @@ def get_account():
203204
else:
204205
print("未找到account.txt, 判断为首次运行, 请接下来依次输入学号密码")
205206
uid = input("学号:")
206-
psw = input("密码:")
207+
psw = getpass("密码:")
207208
with open("account.txt", "w") as new:
208209
tmp = "uid:" + uid + "\npsw:" + psw + "\n\n\n以上两行冒号后分别写上学号密码,不要加空格/换行,谢谢\n\n请注意文件安全,不要放在明显位置\n\n可以从dailyFudan.exe创建快捷方式到桌面"
209210
new.write(tmp)

0 commit comments

Comments
 (0)