Skip to content

Commit

Permalink
Use only one request to prize domains
Browse files Browse the repository at this point in the history
  • Loading branch information
T145 committed Feb 18, 2024
1 parent 626da02 commit 6f6bb91
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tools/update-prizes-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,11 @@ def _limited_is_prize_domain(domain):
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0'
}

# All these domains have a "Under construction" text on the main page, let's use that for fingerprinting
text_page = requests.get('http://%s/' % domain, headers=headers).text
# Prize domains have "Under construction" text on the main page, so let's use that for fingerprinting
# They can emit a redirect in JS if passed the given arguments
resp = requests.get('http://%s/?u=tqck80z&o=zdqr96x&t=DESKuniqANDsearch' % domain, headers=headers).text

if 'Under construction' not in text_page:
return False

# They emit a redirect in JS if passed these arguments
text_page = requests.get('http://%s/?u=tqck80z&o=zdqr96x&t=DESKuniqANDsearch' % domain, headers=headers, timeout=3).text

if 'redirDomain' not in text_page:
return False

return True
return 'under construction' in resp.lower() or 'redirDomain' in resp

def is_prize_domain(domain):
try:
Expand Down

0 comments on commit 6f6bb91

Please sign in to comment.