blob: b30e01605d87775964e186a6b60fe323c3623559 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#compdef checksec
_checksec_procname() {
compadd "$expl[@]" ${${${${(f)"$(_call_program processes-names ps ${${EUID/(#s)0(#e)/xa}//[0-9]#/}ho command 2> /dev/null)"//[][\(\)]/}:#(ps|COMMAND|-*)}%%\ *}:t}
}
_arguments : \
'--help[print help]' \
'--version[print version]' \
'--file[FILE (check FILE)]:file to check:_files' \
'--fortify-file[FILE (check FILE for fortify)]:file for fortify:_files' \
'--fortify-proc[ID (check ID'\''s process for fortify)]:process ID for fortify: _pids' \
'--proc[NAME (check process NAME)]:process name:_checksec_procname' \
'--proc-all[check all procname]' \
'--proc-libs[ID (check ID'\''s process libs)]:process ID to check: _pids' \
'--kernel[check kernel]' \
'--dir[DIR \[-v\] (check DIR)]:dir:_files -/'
local stat=$?
unset -f _checksec_procname
return stat
|