autoreg-skills-max: initial public release (restored, redacted, hardened)
This commit is contained in:
93
skills/firecrawl-account-farming/scripts/firecrawl_farmer.py
Normal file
93
skills/firecrawl-account-farming/scripts/firecrawl_farmer.py
Normal file
@@ -0,0 +1,93 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Firecrawl 100-Account Farmer
|
||||
Run locally: python firecrawl_farmer.py 15 100
|
||||
Uses your existing Chrome profile (no Cloudflare issues)
|
||||
"""
|
||||
import asyncio, imaplib, email, re, time, sys
|
||||
from playwright.async_api import async_playwright
|
||||
|
||||
IMAP_EMAIL = "[REDACTED-NAME]@gmail.com"
|
||||
IMAP_PASS = "IMAP_APP_PASSWORD"
|
||||
PASSWORD = "[REDACTED]"
|
||||
PROMO = "THESKIP"
|
||||
BASE = "[REDACTED-NAME]"
|
||||
SIGNUP = "https://www.firecrawl.dev/signin?view=signup"
|
||||
|
||||
def get_link(email_addr, timeout=15):
|
||||
deadline = time.time() + timeout
|
||||
while time.time() < deadline:
|
||||
try:
|
||||
mail = imaplib.IMAP4_SSL("imap.gmail.com")
|
||||
mail.login(IMAP_EMAIL, IMAP_PASS)
|
||||
mail.select("INBOX")
|
||||
s, msgs = mail.search(None, f'TO "{email_addr}"')
|
||||
if s == "OK" and msgs[0]:
|
||||
mid = msgs[0].split()[-1]
|
||||
_, d = mail.fetch(mid, "(RFC822)")
|
||||
msg = email.message_from_bytes(d[0][1])
|
||||
body = ""
|
||||
if msg.is_multipart():
|
||||
for p in msg.walk():
|
||||
if p.get_content_type() == "text/html":
|
||||
body = p.get_payload(decode=True).decode(errors='ignore')
|
||||
break
|
||||
for l in re.findall(r'https?://[^\s"<>]+', body):
|
||||
if 'verify' in l or 'confirm' in l:
|
||||
mail.logout(); return l.replace('&','&')
|
||||
mail.logout()
|
||||
except: pass
|
||||
time.sleep(2)
|
||||
return None
|
||||
|
||||
async def farm(page, n):
|
||||
email = f"{BASE}+firecrawl{n}@gmail.com"
|
||||
print(f"[{n}] {email}")
|
||||
try:
|
||||
await page.goto(SIGNUP, timeout=30000)
|
||||
await page.wait_for_timeout(2000)
|
||||
await page.fill('input[type="email"]', email)
|
||||
await page.fill('input[type="password"]', PASSWORD)
|
||||
await page.click('button[type="submit"]')
|
||||
await page.wait_for_url("**/confirm-email**", timeout=15000)
|
||||
except: return None
|
||||
link = get_link(email, timeout=20)
|
||||
if not link: return None
|
||||
try:
|
||||
await page.goto(link, timeout=15000)
|
||||
await page.wait_for_timeout(2000)
|
||||
await page.goto("https://www.firecrawl.dev/app", timeout=30000)
|
||||
await page.wait_for_selector('text=Show key', timeout=10000)
|
||||
await page.click('text=Show key')
|
||||
await page.wait_for_timeout(500)
|
||||
key = await page.evaluate("() => document.body.innerText.match(/fc-[a-zA-Z0-9]{30,50}/)?.[0]")
|
||||
if not key: return None
|
||||
team_url = page.url
|
||||
await page.goto(team_url + "/settings?tab=billing", timeout=15000)
|
||||
await page.wait_for_timeout(1000)
|
||||
await page.fill('input', PROMO)
|
||||
await page.wait_for_timeout(300)
|
||||
await page.click('text=Apply')
|
||||
await page.wait_for_timeout(2000)
|
||||
print(f"[{n}] DONE {key}")
|
||||
return key
|
||||
except: return None
|
||||
|
||||
async def main():
|
||||
start = int(sys.argv[1]) if len(sys.argv) > 1 else 15
|
||||
count = int(sys.argv[2]) if len(sys.argv) > 2 else 100
|
||||
results = {}
|
||||
async with async_playwright() as p:
|
||||
browser = await p.chromium.launch_persistent_context("", headless=False, channel="chrome")
|
||||
page = await browser.new_page()
|
||||
for n in range(start, start + count):
|
||||
key = await farm(page, n)
|
||||
if key: results[n] = key
|
||||
await browser.close()
|
||||
with open("firecrawl_100_keys.txt", "w") as f:
|
||||
for n, key in sorted(results.items()):
|
||||
f.write(f"{BASE}+firecrawl{n}@gmail.com|{key}|THESKIP\n")
|
||||
print(f"\nDONE: {len(results)}/{count}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
62
skills/firecrawl-account-farming/scripts/imap_verify.py
Normal file
62
skills/firecrawl-account-farming/scripts/imap_verify.py
Normal file
@@ -0,0 +1,62 @@
|
||||
# Firecrawl IMAP Verification Helper
|
||||
|
||||
import imaplib
|
||||
import email
|
||||
import re
|
||||
import time
|
||||
import sys
|
||||
|
||||
def get_verification_link(email_addr, imap_user, imap_pass, timeout=15):
|
||||
"""Poll IMAP for Firecrawl verification link."""
|
||||
deadline = time.time() + timeout
|
||||
while time.time() < deadline:
|
||||
try:
|
||||
mail = imaplib.IMAP4_SSL("imap.gmail.com")
|
||||
mail.login(imap_user, imap_pass)
|
||||
mail.select("INBOX")
|
||||
status, msgs = mail.search(None, f'TO "{email_addr}"')
|
||||
if status == "OK" and msgs[0]:
|
||||
ids = msgs[0].split()
|
||||
latest = ids[-1]
|
||||
status, data = mail.fetch(latest, "(RFC822)")
|
||||
raw = data[0][1]
|
||||
msg = email.message_from_bytes(raw)
|
||||
body = ""
|
||||
if msg.is_multipart():
|
||||
for part in msg.walk():
|
||||
if part.get_content_type() == "text/html":
|
||||
body = part.get_payload(decode=True).decode(errors='ignore')
|
||||
break
|
||||
else:
|
||||
body = msg.get_payload(decode=True).decode(errors='ignore')
|
||||
links = re.findall(r'https?://[^\s"<>]+', body)
|
||||
for link in links:
|
||||
if 'verify' in link or 'confirm' in link:
|
||||
mail.logout()
|
||||
return link.replace('&', '&')
|
||||
mail.logout()
|
||||
except Exception as e:
|
||||
print(f" IMAP error: {e}", file=sys.stderr)
|
||||
time.sleep(2)
|
||||
return None
|
||||
|
||||
def validate_key(key):
|
||||
"""Test a Firecrawl API key."""
|
||||
import requests
|
||||
try:
|
||||
r = requests.post(
|
||||
"https://api.firecrawl.dev/v1/scrape",
|
||||
headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"},
|
||||
json={"url": "https://httpbin.org/ip", "formats": ["markdown"]},
|
||||
timeout=15
|
||||
)
|
||||
return r.status_code == 200 and r.json().get("success", False)
|
||||
except:
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: python imap_verify.py <email_addr>")
|
||||
sys.exit(1)
|
||||
link = get_verification_link(sys.argv[1], "[REDACTED-NAME]@gmail.com", "IMAP_APP_PASSWORD")
|
||||
print(link or "NOT FOUND")
|
||||
Reference in New Issue
Block a user