johnalbertini14-glitch/openclaw-skills / skills/0xclanky/captcha-relay
captcha-relay
FlaggedHuman-in-the-loop CAPTCHA solving with two modes: screenshot (default, zero infrastructure) and token relay (requires network access). Screenshot mode captures the page with a grid overlay, sends it to the human, and injects clicks based on their reply. Token relay mode detects CAPTCHA type + sitekey, serves the real widget on a relay page for native solving, and injects the token via CDP.
| File | Kind | Size |
|---|---|---|
| ARCHITECTURE.md | markdown | 4.2 KB |
| README.md | markdown | 4.0 KB |
| SKILL.md | skill md | 3.6 KB |
| TAILSCALE.md | markdown | 3.0 KB |
| _meta.json | config | 458 B |
| browser-relay-cli.js | script | 981 B |
| fallback/screenshot.js | script | 5.2 KB |
| index.js | script | 5.4 KB |
| lib/browser-relay.js | script | 7.9 KB |
| lib/cdp.js | script | 2.8 KB |
| lib/detect.js | script | 2.8 KB |
| lib/inject.js | script | 4.5 KB |
| lib/server.js | script | 2.6 KB |
| lib/templates/browser-relay.html | other | 7.5 KB |
| lib/templates/hcaptcha.html | other | 1.8 KB |
| lib/templates/recaptcha-v2.html | other | 1.9 KB |
| lib/templates/turnstile.html | other | 1.8 KB |
| lib/tunnel.js | script | 4.2 KB |
| package-lock.json | manifest | 17.2 KB |
| package.json | manifest | 443 B |
lib/detect.js
View on GitHub/**
* CAPTCHA detection and sitekey extraction via CDP
*/
const { cdpSend, getCdpWsUrl, getPageTargets } = require('./cdp');
const DETECTION_SCRIPT = `
(() => {
const result = { type: null, sitekey: null, pageUrl: location.href };
// reCAPTCHA v2
const rc = document.querySelector('.g-recaptcha[data-sitekey]');
if (rc) {
result.type = 'recaptcha-v2';
result.sitekey = rc.dataset.sitekey;
return result;
}
// reCAPTCHA via iframe
const rcIframe = document.querySelector('iframe[src*="recaptcha/api2/anchor"]');
if (rcIframe) {
const m = rcIframe.src.match(/[?&]k=([^&]+)/);
if (m) {
result.type = 'recaptcha-v2';
result.sitekey = m[1];
return result;
}
}
// hCaptcha
const hc = document.querySelector('.h-captcha[data-sitekey]');
if (hc) {
result.type = 'hcaptcha';
result.sitekey = hc.dataset.sitekey;
return result;
}
// hCaptcha via iframe
const hcIframe = document.querySelector('iframe[src*="hcaptcha.com"]');
if (hcIframe) {
const m = hcIframe.src.match(/sitekey=([^&]+)/);
if (m) {
result.type = 'hcaptcha';
result.sitekey = m[1];
return result;
}
}
// Turnstile
const ts = document.querySelector('.cf-turnstile[data-sitekey]');
if (ts) {
result.type = 'turnstile';
result.sitekey = ts.dataset.sitekey;
return result;
}
// Turnstile via iframe
const tsIframe = document.querySelector('iframe[src*="challenges.cloudflare.com"]');
if (tsIframe) {
const m = tsIframe.src.match(/[?&]k=([^&]+)/);
if (m) {
result.type = 'turnstile';
result.sitekey = m[1];
return result;
}
}
// Generic data-sitekey
const generic = document.querySelector('[data-sitekey]');
if (generic) {
result.sitekey = generic.dataset.sitekey;
// Try to guess type from scripts loaded
if (document.querySelector('script[src*="recaptcha"]')) result.type = 'recaptcha-v2';
else if (document.querySelector('script[src*="hcaptcha"]')) result.type = 'hcaptcha';
else if (document.querySelector('script[src*="turnstile"]')) result.type = 'turnstile';
else result.type = 'unknown';
return result;
}
return result;
})()
`;
async function detectCaptcha(cdpPort = 18800, targetId) {
const targets = await getPageTargets(cdpPort);
let target;
if (targetId) {
target = targets.find(t => t.id === targetId);
}
if (!target) {
// Pick the first non-newtab page
target = targets.find(t => !t.url.startsWith('chrome://')) || targets[0];
}
if (!target) throw new Error('No page targets found');
const wsUrl = target.webSocketDebuggerUrl;
const result = await cdpSend(wsUrl, 'Runtime.evaluate', {
expression: DETECTION_SCRIPT,
returnByValue: true,
});
return result.result.value;
}
module.exports = { detectCaptcha };
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |