MCPcopy Create free account
hub / github.com/chasingboy/Xtools / select_weak_password

Function select_weak_password

lib/format_tools_result.py:78–95  ·  view source on GitHub ↗
(text:str)

Source from the content-addressed store, hash-verified

76
77
78def select_weak_password(text:str) -> str:
79 weak_password_list = re.findall(
80 r'\[\+\]\s*((ftp|Mysql|Mssql|SMB|RDP|Postgres|SSH|Oracle|SMB2-shares|redis|Mongodb|Memcached)(:|\s).+)\n', text, re.I
81 )
82 if weak_password_list == []:
83 return '弱口令检查结果为空'
84
85 weak_password_list = sorted([line[0] for line in weak_password_list])
86
87 weak_password, server = '',''
88 for line in weak_password_list:
89 if server == line.split(':',1)[0]:
90 weak_password += '[+] {}\n'.format(line)
91 else:
92 weak_password += '\n[+] {}\n'.format(line)
93 server = line.split(':',1)[0]
94
95 return weak_password
96
97
98def select_os_info(text:str) -> str:

Callers 1

classify_fscan_resultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected