S3Scanner icon indicating copy to clipboard operation
S3Scanner copied to clipboard

Cannot instantiate Bucket - legacy URL buckets

Open ShurayukiHime opened this issue 2 years ago • 2 comments

https://github.com/sa7mon/S3Scanner/blob/6a6760338bfc7948ce445f032519ec20eaea34a1/S3Scanner/S3Bucket.py#L95

Hi, I am trying to use this scanner with URLs such as

  • https://s3.amazonaws.com/bucketname, OR
  • https://s3.region.amazonaws.com/bucketname

But in both cases the code says I have an invalid bucket name. I know (see docs) that a bucket name can be as part of the domain, but then how can I inspect the above buckets? (see legacy endpoints)

Thanks.

ShurayukiHime avatar Jun 23 '22 16:06 ShurayukiHime

The scanner will accept bucket names in the following formats:

  • mybucket
  • bucket:region
  • mybucket.s3.amazonaws.com

I should probably add https://mybucket.s3.amazonaws.com as a format too. Basically for now you just need to strip off the https:// prefix.

sa7mon avatar Jun 25 '22 12:06 sa7mon

Alright, that works for now. It would be nice to have this feature as well.

Cheers!

ShurayukiHime avatar Jun 27 '22 07:06 ShurayukiHime