-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathreverseme_completion.bash
More file actions
63 lines (54 loc) · 1.04 KB
/
reverseme_completion.bash
File metadata and controls
63 lines (54 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
_reverseme() {
COMREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
next="${COMP_WORDS[COMP_CWORD+1]}"
info_commands="--help \
--version \
--langs \
--lhost \
--lport \
--listener \
--list \
--save"
shells="bash \
awk \
perl \
python \
php \
ruby \
netcat \
telnet \
socat \
java"
perl_options="linux windows"
python_options="tcp udp stcp"
ruby_options="linux windows"
list_options="gnome xfce"
case "${prev}" in
--langs)
COMPREPLY=( $(compgen -W "${shells}" ${cur}) )
return 0
;;
perl)
COMPREPLY=( $(compgen -W "${perl_options}" ${cur}) )
return 0
;;
python)
COMPREPLY=( $(compgen -W "${python_options}" ${cur}) )
return 0
;;
ruby)
COMPREPLY=( $(compgen -W "${ruby_options}" ${cur}) )
return 0
;;
--listener)
COMPREPLY=( $(compgen -W "${list_options}" ${cur}) )
return 0
;;
esac
COMPREPLY=($(compgen -W "${info_commands}" -- ${cur}))
return 0
}
complete -F _reverseme reverseme