AnalyticsRelationships : Get Related Domains / Subdomains By Looking At Google Analytics IDs

AnalyticsRelationships is a tool to Get Related Domains / Subdomains By Looking At Google Analytics IDs.

██╗   ██╗ █████╗       ██╗██████╗                        
██║   ██║██╔══██╗      ██║██╔══██╗                       
██║   ██║███████║█████╗██║██║  ██║                       
██║   ██║██╔══██║╚════╝██║██║  ██║                       
╚██████╔╝██║  ██║      ██║██████╔╝                       
 ╚═════╝ ╚═╝  ╚═╝      ╚═╝╚═════╝                        
                                                         
██████╗  ██████╗ ███╗   ███╗ █████╗ ██╗███╗   ██╗███████╗
██╔══██╗██╔═══██╗████╗ ████║██╔══██╗██║████╗  ██║██╔════╝
██║  ██║██║   ██║██╔████╔██║███████║██║██╔██╗ ██║███████╗
██║  ██║██║   ██║██║╚██╔╝██║██╔══██║██║██║╚██╗██║╚════██║
██████╔╝╚██████╔╝██║ ╚═╝ ██║██║  ██║██║██║ ╚████║███████║
╚═════╝  ╚═════╝ ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═══╝╚══════╝

> Get related domains / subdomains by looking at Google Analytics IDs
> Python/GO versions
> By @JosueEncinar

This script try to get related domains / 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: 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+”

Available versions

Installation

Installation according to language.

Python

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships/Python
>sudo pip3 install -r requirements.txt

GO

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships/GO
>go build -ldflags “-s -w”

Docker

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships
>docker build -t analyticsrelationships:latest .

Usage

Usage according to language

Python

>python3 analyticsrelationships.py -u https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>python3 analyticsrelationships.py -u https://www.example.com > /tmp/example.txt

GO

>./analyticsrelationships –url https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>./analyticsrelationships –url https://www.example.com > /tmp/example.txt

Docker

>docker run -it analyticsrelationships:latest https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>docker run -it analyticsrelationships:latest https://www.example.com > /tmp/example.txt

Examples

Python

Output redirection to file /tmp/example.txt:

Without redirection

GO

Without redirection:

Working with file redirection works just like in Python.

R K

Recent Posts

garak, LLM Vulnerability Scanner : The Comprehensive Tool For Assessing Language Model Security

garak checks if an LLM can be made to fail in a way we don't…

8 hours ago

Vermilion : Mastering Linux Post-Exploitation For Red Team Success

Vermilion is a simple and lightweight CLI tool designed for rapid collection, and optional exfiltration…

8 hours ago

AD-CS-Forest-Exploiter : Mastering Security Through PowerShell For AD CS Misconfiguration

ADCFFS is a PowerShell script that can be used to exploit the AD CS container…

8 hours ago

Usage Of Tartufo – A Comprehensive Guide To Securing Your Git Repositories

Tartufo will, by default, scan the entire history of a git repository for any text…

8 hours ago

Loco : A Rails-Inspired Framework For Rust Developers

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at…

1 day ago

Monolith : The Ultimate Tool For Storing Entire Web Pages As Single HTML Files

A data hoarder’s dream come true: bundle any web page into a single HTML file.…

1 day ago