Create filter_password_list.fish
This commit is contained in:
22
fish_functions/filter_password_list.fish
Normal file
22
fish_functions/filter_password_list.fish
Normal 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
|
||||||
Reference in New Issue
Block a user