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+"
Installation according to language.
> git clone https://github.com/Josue87/AnalyticsRelationships.git
> cd AnalyticsRelationships/Python
> sudo pip3 install -r requirements.txt
> git clone https://github.com/Josue87/AnalyticsRelationships.git
> cd AnalyticsRelationships/
> go build -ldflags "-s -w"
> git clone https://github.com/Josue87/AnalyticsRelationships.git
> cd AnalyticsRelationships
> docker build -t analyticsrelationships:latest .
Usage according to language
> 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
> ./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
You can also pass a file as input
> cat file.txt | ./analyticsrelationships
Or a single URL
> echo https://www.example.com | ./analyticsrelationships
Only Python Version.
> 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
Output redirection to file /tmp/example.txt:
Without redirection:
Without redirection:
Working with file redirection works just like in Python.
An example with a file:
This is a PoC. The author is not responsible for any illegitimate use.