Create filter_password_list.fish

This commit is contained in:
Pyro57000
2024-05-23 17:36:55 +00:00
committed by GitHub
parent 26827a8382
commit 885767a2cb

View File

@@ -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