Created
May 13, 2024 20:52
-
-
Save anilshanbhag/914295cff553a7133886cf24e6aa3d80 to your computer and use it in GitHub Desktop.
Find WPEngine Domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
# List of domains | |
domains = [ | |
"twitter.com", "api.twitter.com", "bloomberg.com", "economictimes.indiatimes.com", | |
"finance.yahoo.com", "moneycontrol.com", "cnbc.com", "www.cnbctv18.com", | |
"bqprime.com", "wsj.com", "archive.is", "retaildive.com", "oilprice.com", | |
"hindustantimes.com", "electrek.co", "trendlyne.com", "zerohedge.com", | |
"cleantechnica.com", "lightreading.com", "reuters.com", "www.nseindia.com", | |
"windy.com", "pvtechnology.com", "www.pv-tech.org", "removepaywall.com", | |
"wolfstreet.com", "timesofindia.indiatimes.com", "asia.nikkei.com", | |
"therealdeal.com", "www.pv-magazine.com", "seekingalpha.com", "rt.com", | |
"bbc.com", "www.business-standard.com", "www.yahoo.com", "fool.com", | |
"nytimes.com", "thehill.com", "cnn.com", "www.fiercewireless.com", | |
"ycharts.com", "www.eia.gov", "www.iea.org", "zapnews.com", "truflation.com", | |
"fred.stlouisfed.org", "www.foxnews.com", "cnevpost.com", "www.reuters.com", | |
"www.wsj.com", "www.sfchronicle.com", "www.huffpost.com", "nbcnews.com", | |
"washingtonpost.com", "usatoday.com", "npr.org", "politico.com", | |
"latimes.com", "time.com", "cbsnews.com", "www.cbsnews.com", | |
"www.removepaywall.com", "www.ft.com", "12ft.io", "paywallhub.com", | |
"www.indiatoday.in", "tradingeconomics.com", "www.vesselfinder.com", | |
"www.aljazeera.com", "robinhood.com", "news.google.com", "trends.google.com", | |
"scmp.com", "digitimes.com", "companiesmarketcap.com", "news.ycombinator.com", | |
"www.ndtv.com", "www.reddit.com", "www.prnewswire.com", "kite.zerodha.com", | |
"www.similarweb.com", "www.data.ai", "indianexpress.com", "www.tomshardware.com" | |
] | |
# IPs to check for WP Engine hosting | |
wpengine_ips = {"141.193.213.10", "141.193.213.11"} | |
def get_ip(domain): | |
try: | |
# Perform dig command to get the IP address | |
result = subprocess.run(['dig', '+short', domain], capture_output=True, text=True) | |
# Extract the IP address from the result | |
ip_address = result.stdout.strip() | |
return ip_address | |
except Exception as e: | |
print(f"Error getting IP for {domain}: {e}") | |
return None | |
# List to store domains hosted on WP Engine | |
wpengine_hosted = [] | |
# Check each domain | |
for domain in domains: | |
ip_address = get_ip(domain) | |
for ip in wpengine_ips: | |
if ip in ip_address: | |
wpengine_hosted.append(domain) | |
print("Domains hosted on WP Engine:") | |
print(wpengine_hosted) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment