File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Script to build a list of of environment identifiers based on sub domain names.
3+ # # References:
4+ # See https://blog.majestic.com/development/alexa-top-1-million-sites-retired-heres-majestic-million/
5+ # See https://github.com/danielmiessler/SecLists/issues/654
6+ # See https://github.com/danielmiessler/SecLists/pull/671
7+ # # Requires jq
8+ #
9+ # Add more top level domain in the expression below
10+ TLD_WANTED_EXPR=" \.(lu|be)$"
11+ #
12+ echo " [+] Download Majestic CSV file..."
13+ wget -O majestic.csv https://downloads.majestic.com/majestic_million.csv
14+ echo " [+] Extract wanted domains..."
15+ cat majestic.csv | cut -d' ,' -f3 | grep -E $TLD_WANTED_EXPR > domains.txt
16+ wc -l domains.txt
17+ echo " [+] Extract sub domains via Certificate Transparency logs (https://crt.sh)..."
18+ while IFS= read -r line
19+ do
20+ printf " \rDomain: %-40s" " $line "
21+ curl -sk " https://crt.sh/?q=$line &output=json" | jq -r " .[].name_value" | cut -d' .' -f1 1>> subdomains.txt 2> /dev/null
22+ done < domains.txt
23+ cat subdomains.txt | sort -u > subdomains.tmp
24+ mv subdomains.tmp subdomains.txt
25+ wc -l subdomains.txt
26+ echo " [+] Extract environment like sub domains..."
27+ grep -Ei " ^(de|dv|ts|te|in|st|ho|pr|pp)" subdomains.txt > env-like-subdomains.txt
28+ echo " [i] Manually review the generated file 'env-like-subdomains.txt' for accurate content."
29+ wc -l env-like-subdomains.txt
Original file line number Diff line number Diff line change 1+ acceptance
2+ alpha
3+ beta
4+ dev
5+ develop
6+ development
7+ developpement
8+ developpeurs
9+ devl
10+ devlp
11+ devlpt
12+ homl
13+ homo
14+ homol
15+ homologation
16+ hotfix
17+ int
18+ inte
19+ integ
20+ integration
21+ intl
22+ pp
23+ pprod
24+ prd
25+ preprd
26+ preprod
27+ prod
28+ production
29+ qual
30+ qualif
31+ qualification
32+ recette
33+ stag
34+ staging
35+ stg
36+ ta
37+ temp
38+ test
39+ testing
40+ tmp
41+ tst
42+ tuat
43+ uag
44+ uap
45+ uat
46+ val
47+ validation
You can’t perform that action at this time.
0 commit comments