Module change_pswd_func.find_pswd
View Source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 | #!/usr/bin/env python
from typing import List
def find_pswd(pswd: str) -> bool:
return pswd in load_system_pswd()
def load_system_pswd(filepath='change_pswd_func/file/pswds_on_system') -> List[str]:
pswds = []
with open(filepath, 'r') as fr:
for line in fr.readlines():
pswds.append(line.strip())
return pswds
|
Functions
find_pswd
def find_pswd(
pswd: str
) -> bool
View Source
def find_pswd(pswd: str) -> bool:
return pswd in load_system_pswd()
load_system_pswd
def load_system_pswd(
filepath='change_pswd_func/file/pswds_on_system'
) -> List[str]
View Source
def load_system_pswd(filepath='change_pswd_func/file/pswds_on_system') -> List[str]:
pswds = []
with open(filepath, 'r') as fr:
for line in fr.readlines():
pswds.append(line.strip())
return pswds