From 6ed6a47f8f78d6ffe50f880ec0de4105d72df9d5 Mon Sep 17 00:00:00 2001 From: Toni de la Fuente Date: Thu, 17 Dec 2020 15:27:00 +0100 Subject: [PATCH] Add sleep to extra7102 to avoid Shodan API limits --- checks/check_extra7102 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/checks/check_extra7102 b/checks/check_extra7102 index 80a2b9b1..d8bdd33d 100644 --- a/checks/check_extra7102 +++ b/checks/check_extra7102 @@ -24,6 +24,7 @@ CHECK_ALTERNATE_check7102="extra7102" # This is the right way to do so # 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. extra7102(){ @@ -35,6 +36,8 @@ extra7102(){ if [[ $LIST_OF_EIP ]]; then for ip in $LIST_OF_EIP;do SHODAN_QUERY=$(curl -ks https://api.shodan.io/shodan/host/$ip?key=$SHODAN_API_KEY) + # Shodan has a request rate limit of 1 request/second. + sleep 1 if [[ $SHODAN_QUERY == *"No information available for that IP"* ]]; then textPass "$regx: IP $ip is not listed in Shodan" "$regx" else