Spooky Doors door check uses Halloween icons (pumpkin, ghost, bat, candy...) instead of the generic set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -18,7 +18,8 @@ const B = 'http://127.0.0.1:' + PORT, SD = 'http://127.0.0.1:' + MOCK;
|
||||
const SECRET = crypto.randomBytes(24).toString('hex'), DRSECRET = crypto.randomBytes(24).toString('hex'); // throwaway, never printed
|
||||
const ADMIN = 'localtest', ADMIN_EMAIL = 'qa-admin@example.com';
|
||||
const DATA = fs.mkdtempSync(path.join(os.tmpdir(), 'iap-door-')); fs.mkdirSync(path.join(DATA, 'uploads'));
|
||||
const CAP = { rocket: '🚀', 'lightning bolt': '⚡', key: '🔑', target: '🎯', wave: '🌊', flame: '🔥', diamond: '💎', magnet: '🧲', bell: '🔔', moon: '🌙' };
|
||||
const CAP = { rocket: '🚀', 'lightning bolt': '⚡', key: '🔑', target: '🎯', wave: '🌊', flame: '🔥', diamond: '💎', magnet: '🧲', bell: '🔔', moon: '🌙',
|
||||
pumpkin: '🎃', ghost: '👻', bat: '🦇', candy: '🍬', spider: '🕷️', skull: '💀', lollipop: '🍭', witch: '🧙', 'spider web': '🕸️', 'full moon': '🌕', chocolate: '🍫' }; // door check = Halloween set
|
||||
let fails = 0; const ok = (cond, label, extra) => { console.log((cond ? 'PASS ' : 'FAIL ') + label + (extra ? ' ' + extra : '')); if (!cond) fails++; };
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
|
||||
|
||||
@@ -269,6 +269,8 @@ const earnTokens = persistedMap('earn');
|
||||
// human-check pairs for the view verifier: [emoji shown, word named in the prompt]
|
||||
const CAPTCHA = [['🚀', 'rocket'], ['⚡', 'lightning bolt'], ['🔑', 'key'], ['🎯', 'target'],
|
||||
['🌊', 'wave'], ['🔥', 'flame'], ['💎', 'diamond'], ['🧲', 'magnet'], ['🔔', 'bell'], ['🌙', 'moon']];
|
||||
// Spooky Doors' door check uses Halloween icons (Marty, 2026-10-02)
|
||||
const DOOR_CAPTCHA = [['🎃', 'pumpkin'], ['👻', 'ghost'], ['🦇', 'bat'], ['🍬', 'candy'], ['🕷️', 'spider'], ['💀', 'skull'], ['🍭', 'lollipop'], ['🧙', 'witch'], ['🕸️', 'spider web'], ['🌕', 'full moon'], ['🍫', 'chocolate']];
|
||||
|
||||
// ── frame-breaking check ─────────────────────────────────
|
||||
// Surf views frame the advertiser's URL full screen, so a target that refuses
|
||||
@@ -2819,7 +2821,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (!t || t.done) return json(res, 400, { error: 'That door is no longer open.' });
|
||||
const dwellMs = (t.kind === 'video' ? t.secs : (ads.rates().visitDwellSeconds || 8)) * 1000; const age = Date.now() - t.ts;
|
||||
if (age < dwellMs - 400) return json(res, 200, { early: true, wait: Math.ceil((dwellMs - age) / 1000) });
|
||||
const pick = CAPTCHA.slice().sort(() => Math.random() - 0.5).slice(0, 5); const answer = Math.floor(Math.random() * pick.length);
|
||||
const pick = DOOR_CAPTCHA.slice().sort(() => Math.random() - 0.5).slice(0, 5); const answer = Math.floor(Math.random() * pick.length);
|
||||
t.challenge = { answer }; doorTokens.set(n, t);
|
||||
return json(res, 200, { prompt: pick[answer][1], options: pick.map(x => x[0]) });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user