2011-05-15 15:50:28 +03:00

235 lines
4.0 KiB
Bash

# dsniff util completion
have arpspoof &&
_arpspoof()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_available_interfaces
return 0
;;
-t)
_known_hosts_real "$cur"
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
} &&
complete -F _arpspoof arpspoof
have dnsspoof &&
_dnsspoof()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
-f)
_filedir
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _dnsspoof dnsspoof
have dsniff &&
_dsniff()
{
local cur prev words cword
_init_completion || return
case $prev in
-r|-w|-f)
_filedir
return 0
;;
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" ) -r -w' -- "$cur" ) )
fi
} &&
complete -F _dsniff dsniff
have filesnarf || have mailsnarf || have msgsnarf &&
_snarf()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _snarf filesnarf mailsnarf msgsnarf
have macof &&
_macof()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _macof macof
have sshmitm &&
_sshmitm()
{
local cur prev words cword
_init_completion || return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
} &&
complete -F _sshmitm sshmitm
have sshow &&
_sshow()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _sshow sshow
have tcpkill &&
_tcpkill()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- "$cur" ) )
fi
} &&
complete -F _tcpkill tcpkill
have tcpnice &&
_tcpnice()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _tcpnice tcpnice
have urlsnarf &&
_urlsnarf()
{
local cur prev words cword
_init_completion || return
case $prev in
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
fi
} &&
complete -F _urlsnarf urlsnarf
have webmitm &&
_webmitm()
{
local cur prev words cword
_init_completion || return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
} &&
complete -F _webmitm webmitm
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh