From b08653229783cb53b1d5d69f275b4971639dcd84 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 24 Aug 2021 15:58:23 +0100 Subject: [PATCH] ZSH: Completion: Hashcat: fix broken mode selection Hashcat has changed the way it displays modes. Update the completion script to reflect this. --- shells/zsh/completion/_hashcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shells/zsh/completion/_hashcat b/shells/zsh/completion/_hashcat index 0a57204a..8fc86b93 100644 --- a/shells/zsh/completion/_hashcat +++ b/shells/zsh/completion/_hashcat @@ -27,7 +27,7 @@ _hashes(){ if $(type fzf > /dev/null); then # If fzf if available, use it for hash completion - hashcat --example-hashes | awk -v RS="\n\n" -F "\t" '{gsub("\n","\t",$0); print $1 "\t" $2 "\t" $3}' | sed 's/MODE: //; s/TYPE: //' | fzf -d "\t" --header="Mode Type" --with-nth='1,2' --preview='echo {3}' --preview-window=up:1 | cut -d' ' -f1 + hashcat --example-hashes | grep -E '(mode|Example\.Hash\.\.|Name|^$)' | awk -F ': ' '{print $NF}' | sed 's/Hash mode #//' | awk -v RS="\n\n" -F="\t" '{gsub("\n","\t",$0);print $0}' | fzf -d "\t" --header="Mode Type" --with-nth='1,2' --preview='echo {3}' --preview-window=up:1 --height=40% | cut -d' ' -f1 else hashcat --example-hashes | awk -v RS="\n\n" -F "\t" '{gsub("\n","\t",$0); print $1 ":" $2 }' | sed 's/MODE: //; s/TYPE: //' fi