diff options
| author | repliqa <sarzilhossain@proton.me> | 2025-07-23 14:06:15 +0600 |
|---|---|---|
| committer | repliqa <sarzilhossain@proton.me> | 2025-07-23 14:06:15 +0600 |
| commit | 69acb7a82a68eeb439e55b994281056df52c81b1 (patch) | |
| tree | 7c6a53694e11511a3014470c213255a503f9c95e /filter_plugins/custom_filters.py | |
Diffstat (limited to 'filter_plugins/custom_filters.py')
| -rwxr-xr-x | filter_plugins/custom_filters.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/filter_plugins/custom_filters.py b/filter_plugins/custom_filters.py new file mode 100755 index 00000000..64054884 --- /dev/null +++ b/filter_plugins/custom_filters.py @@ -0,0 +1,16 @@ +#/usr/bin/python3 + +class FilterModule(object): + def filters(self): + return { + 'format_userpass_output': self.format_userpass_output + } + + def format_userpass_output(self, htpasswd_dict, hostname): + msg = [] + msg.append("##################################################################") + msg.append("################### CHANGED USERS - HTPASSWD ###################") + for user in htpasswd_dict.keys(): + msg.append(f"{user}: {htpasswd_dict[user]} [LINK: http://{hostname}:80/{user}/index.html]") + msg.append("##################################################################") + return '\n'.join(msg) |
