Skip to main content

Subdomain takeover finder

Project description

Code style: black Downloads

#sdto - subdomain takeover finder

Subdomain takeover scanner.

What is subdomain takeover?

Supported Services

acquia
activecampaign
aftership
aha
aws/s3
bigcartelbitbucket
brightcove
campaignmonitor
cargo
cloudfront
desk
fastly
feedpress
getresponse
ghost
github
helpjuice
helpscout
heroku
intercom
jetbrains
kajabi
mashery
pantheon
pingdom
proposify
readme
s3bucket
shopify
simplebooklet
smartling
smugmug
statuspage
surge
surveygizmo
tave
teamwork
thinkific
tictail
tilda
tumbler
unbounce
uservoice
vend
webflow
wishpond
wordpress
worksites.net
zendesk

Installation:

to use as python library

pip install sdto

to use as a CLI tool

pip install sdto[cli]

or:

git clone https://github.com/scanfactory/sdto.git
cd sdto
poetry install

Usage as a CLI tool

Examples:

python3 -m sdto -t www.domain.com
python3 -m sdto -t www.domain.com -f path/to/custom-fingerprints-file.json
python3 -m sdto -t https://www.domain.com/
python3 -m sdto -t http://www.domain.com/
python3 -m sdto -t www.domain.com --no-ssl
python3 -m sdto -t www.domain.com -v --timeout 30
python3 -m sdto -t www.domain.com -H "user-agent" "your-custom-user-agent" -H "another-header" "header-value"
python3 -m sdto -t www.domain.com -F json
python3 -m sdto -t www.domain.com -o output.txt
python3 -m sdto -t www.domain.com -F json -o output.json
python3 -m sdto -t www.domain.com -F txt -o output.txt
python3 -m sdto -t www.domain.com -p http://127.0.0.1:8080 
python3 -m sdto -l subdomains-list.txt

Docker support

Build the image:

docker build -t sdto .

Run the container:

docker run -it --rm sdto -t www.domain.com -v

Using custom fingerprints

You can specify custom fingerprints file via '-F path/to/file.json' parameter. The expected json file format:

{
  "AWS/S3": {"pattern": "The specified bucket does not exist"},
  "BitBucket": {"pattern": "Repository not found"},
  "Fastly": {"pattern": "Fastly pattern\\: unknown domain\\:", "process_200": true}
}

Usage as a python library

Example:

import re

from aiohttp import ClientSession
from sdto import check_target, RegexFingerprint


async def main():
    async with ClientSession() as cs:
        fingerprint = await check_target(
            cs=cs,
            target="sub.domain.com",
            ssl=True,
            proxy=None,
            fingerprints=[
                RegexFingerprint(
                    "Github", 
                    re.compile(r"There isn\'t a Github Pages site here\."),
                    process_200=False,
                )
            ]
        )
        if not fingerprint:
            print("No match")
        else:
            print(fingerprint.name)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdto-0.1.1.tar.gz (7.7 kB view hashes)

Uploaded Source

Built Distribution

sdto-0.1.1-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page