Start work on hydra completion

This commit is contained in:
Jonathan Hodgson 2020-05-11 21:33:56 +01:00
parent aea3ba2730
commit 377f710c26
3 changed files with 172 additions and 3 deletions

View file

@ -215,7 +215,7 @@ _msfvenom_payload() {
_message -r "Cannot find metasploit cache file. Run msfconsole to populate it"
compadd "$@"
else
_msfvenom_payloads_list=("${(f)$(sed -n '/"type": "payload"/,/"ref_name"/p' "$cacheFile" | grep -E '(ref_name|description)' | cut -d '"' -f 4 | sed -n 'h;n;p;g;p' | sed 'N;s/\n/:/')}")
_msfvenom_payloads_list=("${(f)$(sed -n '/"type": "payload"/,/"ref_name"/p' "$cacheFile" | grep -E '(ref_name|description)' | cut -d '"' -f 4 | sed -n 'h;n;p;g;p' | sed 'N;s/\n/:/; s/\\n.*$//')}")
_describe -t payloads 'available payloads' _msfvenom_payloads_list || compadd "$@"
fi
}