23 lines
764 B
Python
Executable File
23 lines
764 B
Python
Executable File
#!/usr/bin/env python3
|
|
"""Merge harvested PATs into gh_tokens.txt — no live verification (TokenPool retires dead ones)."""
|
|
import json
|
|
|
|
POOL = r'C:\Users\User\tmp\gh_pats_pool.json'
|
|
TOKENS = r'C:\Users\User\Desktop\keyhunter\gh_tokens.txt'
|
|
|
|
pool = json.load(open(POOL, encoding='utf-8'))
|
|
existing = []
|
|
try:
|
|
for l in open(TOKENS, encoding='utf-8'):
|
|
l = l.strip()
|
|
if l and not l.startswith('#'):
|
|
existing.append(l)
|
|
except FileNotFoundError:
|
|
pass
|
|
alltok = list(dict.fromkeys(existing + [a['pat'] for a in pool]))
|
|
with open(TOKENS, 'w', encoding='utf-8') as f:
|
|
f.write('# GitHub PAT pool — harvested from account farm\n')
|
|
for t in alltok:
|
|
f.write(t + '\n')
|
|
print(f'pool={len(pool)} total_written={len(alltok)}')
|