Merge pull request #1898 from tbhaxor/bugfix/lint/wpscan

FIxed wpscan completion linting
pull/1901/head
Noah Gorny 2021-06-23 13:22:25 +03:00 committed by GitHub
commit f6e3fc358c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -71,6 +71,7 @@ completion/available/rustup.completion.bash
completion/available/sdkman.completion.bash completion/available/sdkman.completion.bash
completion/available/vault.completion.bash completion/available/vault.completion.bash
completion/available/vuejs.completion.bash completion/available/vuejs.completion.bash
completion/available/wpscan.completion.bash
# plugins # plugins
# #

View File

@ -1,15 +1,15 @@
#!/usr/bin/bash # shellcheck shell=bash
if command -v wpscan > /dev/null; then if command -v wpscan > /dev/null; then
__wpscan_completion() { __wpscan_completion() {
local OPTS=("--help --hh --version --url --ignore-main-redirect --verbose --output --format --detection-mode --scope --headers --user-agent --vhost --random-user-agent --user-agents-list --http-auth --max-threads --throttle --request-timeout --connect-timeout --disable-tlc-checks --proxy --proxy-auth --cookie-string --cookie-jar --cache-ttl --clear-cache --server --cache-dir --update --no-update --wp-content-dir --wp-plugins-dir --wp-version-detection --main-theme-detection --enumerate --exclude-content-based --plugins-list --plugins-detection --plugins-version-all --plugins-version-detection --themes-list --themes-detection --themes-version-all --themes-version-detection --timthumbs-list --timthumbs-detection --config-backups-list --config-backups-detection --db-exports-list --db-exports-detection --medias-detection --users-list --users-detection --passwords --usernames --multicall-max-passwords --password-attack --stealthy") local OPTS=("--help --hh --version --url --ignore-main-redirect --verbose --output --format --detection-mode --scope --headers --user-agent --vhost --random-user-agent --user-agents-list --http-auth --max-threads --throttle --request-timeout --connect-timeout --disable-tlc-checks --proxy --proxy-auth --cookie-string --cookie-jar --cache-ttl --clear-cache --server --cache-dir --update --no-update --wp-content-dir --wp-plugins-dir --wp-version-detection --main-theme-detection --enumerate --exclude-content-based --plugins-list --plugins-detection --plugins-version-all --plugins-version-detection --themes-list --themes-detection --themes-version-all --themes-version-detection --timthumbs-list --timthumbs-detection --config-backups-list --config-backups-detection --db-exports-list --db-exports-detection --medias-detection --users-list --users-detection --passwords --usernames --multicall-max-passwords --password-attack --stealthy")
COMPREPLY=() COMPREPLY=()
for _opt_ in ${OPTS[@]}; do for _opt_ in "${OPTS[@]}"; do
if [[ "$_opt_" == "$2"* ]]; then if [[ "$_opt_" == "$2"* ]]; then
COMPREPLY+=("$_opt_") COMPREPLY+=("$_opt_")
fi fi
done done
} }
complete -F __wpscan_completion wpscan complete -F __wpscan_completion wpscan
fi fi