Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Handle re-directions to find more S3 buckets.

Steve734b9ca292eb
diff --git a/modules/sfp_s3bucket.py b/modules/sfp_s3bucket.py
index c101e57a..f7c56b55 100644
--- a/modules/sfp_s3bucket.py
+++ b/modules/sfp_s3bucket.py
@@ -83,7 +83,8 @@ class sfp_s3bucket(SpiderFootPlugin):
url = "https://" + b
res = self.sf.fetchUrl(url, timeout=10, useragent="SpiderFoot")
- if res['content'] is None or "NoSuchBucket" in res['content']:
+ if res['code'] not in [ "301", "302", "200" ] and \
+ (res['content'] is None or "NoSuchBucket" in res['content']):
self.sf.debug("Not a valid bucket: " + url)
continue