266 lines
4.2 KiB
Plaintext
Raw Normal View History

# dsniff util completion
2009-06-08 21:22:43 +03:00
have arpspoof &&
_arpspoof()
{
2009-10-04 19:42:50 +02:00
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
-t)
_known_hosts_real "$cur"
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -t' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _arpspoof arpspoof
2009-06-08 21:22:43 +03:00
have dnsspoof &&
_dnsspoof()
{
2009-10-04 19:42:50 +02:00
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
-f)
_filedir
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -f' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _dnsspoof dnsspoof
2009-06-08 21:22:43 +03:00
have dsniff &&
_dsniff()
{
2009-10-04 19:42:50 +02:00
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
-r|-w|-f)
2009-10-04 19:42:50 +02:00
_filedir
return 0
;;
-i)
_interfaces
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-c -d -m -n -i -s -f -t -r -w' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _dsniff dsniff
2009-06-08 21:22:43 +03:00
have filesnarf || have mailsnarf || have msgsnarf &&
_snarf()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -v' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _snarf filesnarf mailsnarf msgsnarf
2009-06-08 21:22:43 +03:00
have macof &&
_macof()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _macof macof
2009-06-08 21:22:43 +03:00
have sshmitm &&
_sshmitm()
{
2009-10-04 19:42:50 +02:00
local cur
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -I -p' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _sshmitm sshmitm
2009-06-08 21:22:43 +03:00
have sshow &&
_sshow()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d -i' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _sshow sshow
2009-06-08 21:22:43 +03:00
have tcpkill &&
_tcpkill()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _tcpkill tcpkill
2009-06-08 21:22:43 +03:00
have tcpnice &&
_tcpnice()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-A -I -M -i' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _tcpnice tcpnice
2009-06-08 21:22:43 +03:00
have urlsnarf &&
_urlsnarf()
{
2009-10-04 19:42:50 +02:00
local cur prev
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
2009-10-04 19:42:50 +02:00
-i)
_interfaces
return 0
;;
esac
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-n -i -v' -- "$cur" ) )
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _urlsnarf urlsnarf
2009-06-08 21:22:43 +03:00
have webmitm &&
_webmitm()
{
2009-10-04 19:42:50 +02:00
local cur
2009-10-04 19:42:50 +02:00
COMPREPLY=()
cur=`_get_cword`
2009-10-04 19:42:50 +02:00
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-d' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
2009-06-08 21:22:43 +03:00
} &&
complete -F _webmitm webmitm
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh