modeloc: 26 verified live models, guard + full-catalog probe

This commit is contained in:
ENI
2026-11-03 03:10:38 +03:00
parent 966f2672d3
commit ced7385d67
8 changed files with 240 additions and 14 deletions
+14 -5
View File
@@ -50,12 +50,14 @@ def done_set():
return s
def worker(batch, wid, delay, retries):
for acc in batch:
def worker(batch, wid, delay, retries, proxies=None):
proxies = proxies or []
for pos, acc in enumerate(batch):
tries = 0
while True:
try:
res = reg.reg(acc)
px = proxies[(wid + pos) % len(proxies)] if proxies else None
res = reg.reg(acc, proxy=px)
except Exception as e:
res = {'login': acc['login'], 'ok': False, 'error': 'exc ' + str(e)[:100]}
err = res.get('error') or ''
@@ -96,6 +98,9 @@ def main():
ap.add_argument('--workers', type=int, default=3)
ap.add_argument('--delay', type=float, default=4)
ap.add_argument('--retries', type=int, default=2)
ap.add_argument('--proxy', default='', help='список прокси через ; (ротация по кругу)')
ap.add_argument('--skip-prefix', default='baradok609', help='логины с этим префиксом не берём')
ap.add_argument('--allow-no-totp', action='store_true', help='брать и аккаунты без TOTP (2FA может быть выключен)')
a = ap.parse_args()
# argv важнее env: в фоне на Windows env-префиксы теряются
KEYS = a.bank
@@ -106,7 +111,9 @@ def main():
picked = []
for i in range(a.start, len(pool)):
acc = pool[i]
if acc['login'] in seen or not acc.get('totp'):
if acc['login'] in seen or (not acc.get('totp') and not a.allow_no_totp):
continue
if a.skip_prefix and acc['login'].startswith(a.skip_prefix):
continue
acc = dict(acc)
acc['_idx'] = i
@@ -115,8 +122,10 @@ def main():
break
print(json.dumps({'picked': len(picked), 'start': a.start,
'workers': a.workers, 'delay': a.delay}), flush=True)
proxies = [x.strip() for x in a.proxy.split(';') if x.strip()]
print(json.dumps({'proxies': len(proxies)}), flush=True)
chunks = [picked[i::a.workers] for i in range(a.workers)]
th = [threading.Thread(target=worker, args=(c, i, a.delay, a.retries)) for i, c in enumerate(chunks)]
th = [threading.Thread(target=worker, args=(c, i, a.delay, a.retries, proxies)) for i, c in enumerate(chunks)]
t0 = time.time()
for t in th:
t.start()