diff --git a/checks/check_extra7102 b/checks/check_extra7102 index 9e4cf48a..80a2b9b1 100644 --- a/checks/check_extra7102 +++ b/checks/check_extra7102 @@ -22,15 +22,13 @@ CHECK_ALTERNATE_check7102="extra7102" # your IP will be banned by Shodan # This is the right way to do so -# curl -ks https://api.shodan.io/shodan/host/{ip}?key={YOUR_API_KEY} +# curl -ks https://api.shodan.io/shodan/host/{ip}?key={YOUR_API_KEY} # Each finding will be saved in prowler/output folder for further review. -SHODAN_API_KEY="" - extra7102(){ if [[ ! $SHODAN_API_KEY ]]; then - textInfo "[extra7102] Requires a Shodan API key to work. Edit checks/check_extra7102 first" + textInfo "[extra7102] Requires a Shodan API key to work. Use -N " else for regx in $REGIONS; do LIST_OF_EIP=$($AWSCLI $PROFILE_OPT --region $regx ec2 describe-addresses --query 'Addresses[*].PublicIp' --output text) diff --git a/prowler b/prowler index d7e8a623..a2478f3f 100755 --- a/prowler +++ b/prowler @@ -90,13 +90,14 @@ USAGE: -I External ID to be used when assuming roles (not mandatory), requires -A and -R -w whitelist file. See whitelist_sample.txt for reference and format (i.e.: whitelist_sample.txt) + -N Shoadan API key used by check extra7102. -V show version number & exit -h this help " exit } -while getopts ":hlLkqp:r:c:g:f:m:M:E:x:enbVsSI:A:R:T:w:" OPTION; do +while getopts ":hlLkqp:r:c:g:f:m:M:E:x:enbVsSI:A:R:T:w:N:" OPTION; do case $OPTION in h ) usage @@ -177,6 +178,9 @@ while getopts ":hlLkqp:r:c:g:f:m:M:E:x:enbVsSI:A:R:T:w:" OPTION; do w ) WHITELIST_FILE=$OPTARG ;; + N ) + SHODAN_API_KEY=$OPTARG + ;; : ) echo "" echo "$OPTRED ERROR!$OPTNORMAL -$OPTARG requires an argument"