2017-07-16 08:08:48 +00:00
|
|
|
#compdef rafind2
|
|
|
|
local context state state_descr line
|
|
|
|
|
|
|
|
_rafind2() {
|
|
|
|
local -a options=(
|
|
|
|
'-a+[only accept aligned hits]:align'
|
2017-07-17 06:50:24 +00:00
|
|
|
'-b+[set block size]:size'
|
2017-07-16 08:08:48 +00:00
|
|
|
'*-e+[search for regular expression string matches]:regex'
|
2017-07-17 06:50:24 +00:00
|
|
|
"-f+[start searching from address 'from']:from"
|
2017-07-16 08:08:48 +00:00
|
|
|
'-h[show this help]'
|
2017-08-07 10:19:15 +00:00
|
|
|
'-i[identify filetype (r2 -nqcpm file)]'
|
2017-07-16 08:08:48 +00:00
|
|
|
'-m[magic search, file-type carver]'
|
2017-07-17 06:50:24 +00:00
|
|
|
'-M+[set a binary mask to be applied on keywords]:str'
|
2017-07-16 08:08:48 +00:00
|
|
|
'-n[do not stop on read errors]'
|
2018-08-07 08:45:33 +00:00
|
|
|
'-q[quiet]'
|
2017-07-16 08:08:48 +00:00
|
|
|
'-r[print using radare commands]'
|
|
|
|
'*-s+[search for a specific string (can be used multiple times)]:str'
|
|
|
|
'*-S+[search for a specific wide string (can be used multiple times)]:str'
|
2017-07-17 06:50:24 +00:00
|
|
|
"-t+[stop search at address 'to']:to"
|
2017-07-16 08:08:48 +00:00
|
|
|
'-v[print version and exit]'
|
|
|
|
'*-x+[search for hexpair string (909090) (can be used multiple times)]:hex'
|
|
|
|
'-X[show hexdump of search results]'
|
|
|
|
'-z[search for zero-terminated strings]'
|
|
|
|
'-Z[show string found on each search hit]'
|
|
|
|
)
|
|
|
|
|
|
|
|
_arguments -S -s : $options '*:file:_files'
|
|
|
|
}
|
|
|
|
|
|
|
|
_rafind2 "$@"
|
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# mode: shell-script
|
|
|
|
# coding: utf-8-unix
|
|
|
|
# indent-tabs-mode: nil
|
|
|
|
# sh-indentation: 2
|
|
|
|
# sh-basic-offset: 2
|
|
|
|
# End:
|
|
|
|
# vim: ft=zsh sw=2 sts=2 et
|