Updated Jul 15, 2026

Cloud Storage

Rewrite mixed S3 bucket refs to one address style

Normalize mixed S3 bucket references into one address format.

Go · MIT license

Agent

overview

What s3reverse does

s3reverse rewrites a messy list of S3 bucket references into one shape. Recon dumps mix bare names, path-style URLs, and virtual-hosted hostnames; that mix breaks dedupe and scanners. Feed the list with -iL and pick a single target format.

Choose -tN for bare names, -tS for s3 URLs, -tP for path style (s3.amazonaws.com/bucket), or -tV for virtual-hosted (bucket.s3.amazonaws.com). Write lines with -oN or an array with -oA. Optional -verify checks whether each reference is reachable while converting.

In a Trickest Cloud Storage workflow, place it between bucket discovery and a scanner such as s3scanner so every candidate arrives in the format the next node expects. It converts and optionally verifies; it does not dump objects.

source github.com/hahwul/s3reverse

use cases

Where s3reverse fits

Normalize mixed bucket references

Convert a list that mixes names, path-style URLs, and virtual-hosted hostnames into one format so duplicates collapse and downstream tools parse cleanly.

Prepare input for a bucket scanner

Emit bucket names or s3 URLs in the exact shape a scanner like s3scanner expects, so the discovery-to-scan handoff is clean.

Verify access during conversion

Enable -verify to check bucket access as the list is normalized, flagging which references resolve.

Pick path or virtual-hosted style

Choose -tP or -tV output to match the addressing convention the rest of the pipeline relies on.

reference

s3reverse inputs and flags

8 inputs
NameTypeFlagDescription
input-listFILE-iLInput list of bucket references.
to-name-formatBOOLEAN-tNConvert to name format (example: github-cloud).
convert-to-s3-urlBOOLEAN-tSConvert to s3 URL.
convert-to-path-styleBOOLEAN-tPConvert to path style (example: https://s3.amazonaws.com/github-cloud).
convert-to-virtual-hosted-styleBOOLEAN-tVConvert to virtual-hosted style (example: github-cloud.s3.amazonaws.com).
verify-bucket-accessBOOLEAN-verifyVerify bucket access.
output-format-normalBOOLEAN-oNWrite output in normal format.
output-format-arrayBOOLEAN-oAWrite output in array format.

Showing key inputs. s3reverse exposes 8 inputs in total.

example

Run s3reverse

s3reverse · command
# normalize mixed bucket refs to bare names
s3reverse -iL buckets.txt -tN -oN
sample output
example-assets
example-logs
example-backups
example-static
example-uploads
example-cdn
example-terraform-state
example-ci-artifacts

guidance

Choosing s3reverse

Use s3reverse when S3 bucket references arrive in mixed formats and you need one consistent shape before scanning. It does not scan or dump buckets; pair it with s3scanner. For discovering candidates, use cloud_enum or lazys3.

s3scanner

Finds open S3 buckets and dumps contents; the scanner s3reverse prepares input for.

cloud_enum

Enumerates cloud storage across AWS, Azure, and GCP to discover candidate buckets.

lazys3

Brute-forces S3 bucket names from permutations to surface new candidates.

faq

s3reverse questions

Use -tN for plain names, -tS for s3 URLs, -tP for path style, or -tV for virtual-hosted style. Write with -oN for lines or -oA for an array.

Its job is format conversion. -verify can check reachability during the run. For scanning and dumping, pair it with s3scanner.

Pass the list with -iL and enable -tP, for example `s3reverse -iL buckets.txt -tP -oN`. That emits URLs like https://s3.amazonaws.com/bucket-name.

-verify checks whether each bucket reference is reachable while converting, so you can drop dead names before a deeper scan.

cloud_enum and lazys3 find candidate buckets. s3reverse normalizes the mixed formats those tools (and other recon) produce so s3scanner gets a clean list.

Run s3reverse yourself

A mixed bucket list feeds s3reverse, which normalizes every reference into one format and hands it to s3scanner before results land as a queryable output.

Facts on this page come from the live Trickest tool library.