From 885767a2cbaec584fa48bd418e008a6cb92a67bb Mon Sep 17 00:00:00 2001 From: Pyro57000 <147988717+Pyro57000@users.noreply.github.com> Date: Thu, 23 May 2024 17:36:55 +0000 Subject: [PATCH] Create filter_password_list.fish --- fish_functions/filter_password_list.fish | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 fish_functions/filter_password_list.fish diff --git a/fish_functions/filter_password_list.fish b/fish_functions/filter_password_list.fish new file mode 100644 index 0000000..4df2707 --- /dev/null +++ b/fish_functions/filter_password_list.fish @@ -0,0 +1,22 @@ +function filter_password_list +set arg_len $(count $argv) +if test $arg_len != 3; or test $argv[1] = "-h"; or test $argv[1] = "--help"; or test $argv[1] = "--h"; or test $argv[1] = "help" +echo "This function filters a passwords list for a specific length" +echo "" +echo "" +echo "USAGE:" +echo "filter_password_list /path/to/password/list length /path/to/save" +else +set extension_type $(echo $argv[3] | /sbin/rev | cut -d "." -f 1 | /sbin/rev) +for pw in $(cat $argv[1]) +set len $(string length $pw) +if test $len -ge $argv[2] +if test $extension_type = "md" +echo "- [ ] $pw" | tee  -a $argv[3] +else +echo $pw | tee -a $argv[3] +end +end +end +end +end