# ronin-db completion -*- shell-script -*- # This bash completions script was generated by # completely (https://github.com/dannyben/completely) # Modifying it manually is not recommended _ronin-db_completions_filter() { local words="$1" local cur=${COMP_WORDS[COMP_CWORD]} local result=() if [[ "${cur:0:1}" == "-" ]]; then echo "$words" else for word in $words; do [[ "${word:0:1}" != "-" ]] && result+=("$word") done echo "${result[*]}" fi } _ronin-db_completions() { local cur=${COMP_WORDS[COMP_CWORD]} local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") local compline="${compwords[*]}" case "$compline" in 'certs'*'--subject-alt-name') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'phone-numbers'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'passwords'*'--for-user') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'web-vulns'*'--for-host') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'certs'*'--common-name') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'emails'*'--with-host') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'emails'*'--with-user') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'passwords'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'services'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'creds'*'--for-user') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'street-addresses'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --for-person -P --for-organization -O --with-address -a --with-city -c --with-state -s --with-country -C --with-zipcode -z")" -- "$cur" ) ;; 'urls'*'--directory') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'emails'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'ips'*'--with-host') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'people'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'add'*'--username') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'certs'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'creds'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'hosts'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'ports'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'add'*'--sqlite3') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'phone-numbers'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --for-person -P --for-organization -O --with-country-code -c --with-area-code -a --with-prefix -p --with-line-number -l --similar-to -S")" -- "$cur" ) ;; 'urls'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'ips'*'--import') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'passwords'*'-u') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'web-vulns'*'-H') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'urls'*'--host') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'add'*'--host') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'asn'*'--file') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'completion'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--print --install --uninstall")" -- "$cur" ) ;; 'open-ports'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --with-port -p --with-protocol -P --with-service -S --with-ip -I")" -- "$cur" ) ;; 'emails'*'-H') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'emails'*'-u') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'passwords'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --for-user -u --with-email -e")" -- "$cur" ) ;; 'web-vulns'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --with-type -t --for-host -H --for-domain -d --for-path -p --with-query-param -q --with-header-name --with-cookie-param -c --with-form-param -f --with-request-method -M")" -- "$cur" ) ;; 'creds'*'-u') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'services'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --named --with-port -p --with-protocol -P --with-ip -I")" -- "$cur" ) ;; 'software'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --name -N --named --version -V --vendor")" -- "$cur" ) ;; 'migrate'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file")" -- "$cur" ) ;; 'urls'*'-H') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'urls'*'-d') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -- "$cur" ) ;; 'add'*'-H') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'add'*'-u') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A user -- "$cur" ) ;; 'asn'*'-f') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A file -- "$cur" ) ;; 'emails'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --with-host -H --with-ip -I --with-user -u --for-person -P --for-organization -O")" -- "$cur" ) ;; 'ips'*'-H') while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A hostname -- "$cur" ) ;; 'people'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --for-address -a --for-city -c --for-state -s --for-province -p --for-zipcode -z --for-country -C --with-prefix -P --with-first-name -f --with-middle-name -m --with-middle-initial -M --with-last-name -l --with-suffix -S")" -- "$cur" ) ;; 'certs'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --active -A --expired -E --issuer-common-name --issuer-organization --issuer-organizational-unit --issuer-locality --issuer-state --issuer-country --common-name --subject-alt-name --organization --organizational-unit --locality --state --country --import")" -- "$cur" ) ;; 'creds'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --for-user -u --with-password -P")" -- "$cur" ) ;; 'hosts'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --with-ip -I --with-port -p --domain -D --tld -T")" -- "$cur" ) ;; 'ports'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --number -N --with-protocol -P --with-service -S --with-ip -I")" -- "$cur" ) ;; 'list'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--verbose -v")" -- "$cur" ) ;; 'oses'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --name -N --named --flavor -F --version -V")" -- "$cur" ) ;; 'urls'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --http --https --host -H --port -p --path --fragment --directory -d --with-ext -E --query-string -q --with-query-param -P --with-query-param-name --with-query-param-value")" -- "$cur" ) ;; 'add'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--adapter -A --sqlite3 --mysql2 --postgresql --host -H --port -p --username -u --password -P --read-password --database -D")" -- "$cur" ) ;; 'asn'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --number -n --country-code -C --name -N --named --ip -I --ipv4 -4 --ipv6 -6 --update -u --url -U --file -f")" -- "$cur" ) ;; 'ips'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --verbose -v --delete --delete-all --add --import --v4 -4 --v6 -6 --with-port -p --with-mac-addr -M --with-host -H")" -- "$cur" ) ;; 'irb'*) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--db --db-uri --db-file --no-connect")" -- "$cur" ) ;; *) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_ronin-db_completions_filter "--version -V help add asn certs completion creds edit emails hosts ips irb list migrate open-ports oses passwords people phone-numbers ports remove services software street-addresses urls web-vulns console")" -- "$cur" ) ;; esac } && complete -F _ronin-db_completions ronin-db # ex: filetype=sh