File: wfuzz_bash_completion

package info (click to toggle)
wfuzz 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,244 kB
  • sloc: python: 8,786; makefile: 49; sh: 4
file content (66 lines) | stat: -rw-r--r-- 1,786 bytes parent folder | download
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
64
65
66
# wfuzz bash completion file
# by Xavier Mendez (xavi.mendez@gmail.com) aka Javi

_wfuzz() {
    
    COMPREPLY=()
    local cur prev
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}
    WFUZZ_EX="wfuzz"

    # Change to your wordlists' base directory
    WLDIR=$($WFUZZ_EX --ee files)
    
    common_options="-z[PAYLOAD] --zD[DEFAULT] --zE[ENCODERS] --hc[HIDE_HTTP_CODES] -d[POST_DATA] "

    case "$prev" in
	-u)
	    COMPREPLY=( $( compgen -W "http https" -- $cur ) )
	    ;;
	-w)
            COMPREPLY=( $(compgen -W "$(find $WLDIR -type f -iname "*.txt")" -- $cur) )
	    ;;
	-w)
            COMPREPLY=( $(compgen -W "$(find $WLDIR -type f -iname "*.txt")" -- $cur) )
	    ;;
	-z)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee payloads)" -- $cur))
	    ;;
	-e)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee registrants)" -- $cur))
	    ;;
	-m)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee iterators)" -- $cur))
	    ;;
	-o)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee printers)" -- $cur))
	    ;;
	--script-help)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee scripts)" -- $cur))
	    ;;
	--script)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee scripts)" -- $cur))
	    ;;
	--field)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee fields)" -- $cur))
	    ;;
	--zE)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee encoders)" -- $cur))
	    ;;
	-V)
	    COMPREPLY=( $( compgen -W "allvars allpost allheaders" -- $cur ) )
	    ;;
	-X)
	    COMPREPLY=( $( compgen -W "FUZZ OPTIONS PUT DELETE POST GET TRACE CONNECT HEAD" -- $cur ) )
	    ;;
	--hc)
	    COMPREPLY=( $( compgen -W "400 401 301 302 500 404 200" -- $cur ) )
	    ;;
	*)
	    COMPREPLY=($(compgen -W "$($WFUZZ_EX --ee options)" -- $cur))
	    ;;
    esac
}

complete -F _wfuzz -o default wfuzz