Skip to content

Get related domains / subdomains by looking at Google Analytics IDs

License

Notifications You must be signed in to change notification settings

topscoder/analyticsrelationships

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnalyticsRelationships

 

This script tries to get related domains and/or subdomains by looking at Google Analytics IDs from a URL. First search for ID of Google Analytics in the webpage and then request to builtwith and hackertarget with the ID.

Note: This is a fork of the original project at github.com/Josue87/AnalyticsRelationships


Note: It does not work with all websites. It is searched by the following expressions:

  • "www\.googletagmanager\.com/ns\.html\?id=[A-Z0-9\-]+"
  • GTM-[A-Z0-9]+
  • "UA-\d+-\d+"

Installation

Install Golang, then run:

go install -v github.com/topscoder/analyticsrelationships@latest

Usage

This tool can be used in different ways:

  1. Pass a single URL using the -url flag:
analyticsrelationships -url https://www.example.com
  1. You can also pass URL's as input via STDIN
cat urls.txt | analyticsrelationships
  1. Or a single URL via STDIN
echo https://www.example.com | analyticsrelationships
  1. Or for the leet users, add to your chains:
cat domains.txt | httpx -silent | analyticsrelationships -silent | anew related.txt

Options

  • -url: URL of the website to scan the Analytics code from
  • -silent: Don't print shizzle. Only what matters.

Contributing

Contributions are welcome! If you find a bug or want to suggest a new feature, please open an issue or submit a pull request.

License

AnalyticsRelationships is released under the GNU license