Last active
November 19, 2022 22:08
-
-
Save iam-py-test/8b5442bfd91e1d82fcfcb14509d35ef0 to your computer and use it in GitHub Desktop.
Check for redirects with different referers
This file contains 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 os,sys | |
import requests | |
import hashlib | |
url = input("URL: ") | |
refs = open("refs.txt",encoding="UTF-8").read().split("\n") # safe to refs.txt | |
for ref in refs: | |
try: | |
r = requests.get(url,headers={"Referer":ref}) | |
print("Referer {}: {} --> {} ({})".format(ref,url,r.url,hashlib.md5(r.content).hexdigest())) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment