PolHunter mission prep (every rebuilt network site gets one, Marty 2026-11-14): the front page's How it works steps carry the PolHunter embed (data-selector ".steps .step", 3 slots); CSP admits https://polhunter.com in script-src and connect-src only. Hunters never count: a page with a ?ph= / #ph= token (or PolHunter's tab token in sessionStorage) asks /api/wire with hunt=1, and a visit from polhunter.com is treated the same, so no visit ticket is issued (no ad views, no Boost delivery, no verified-click token); daily counter huntVisits. Smoke 186/186.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@
|
||||
<div class="card"><h3>Old site links</h3><p class="small">JSON file {"oldrefs": {"old username": "network username"}} replaces the whole map.</p><input type="file" id="oldFile" accept="application/json"><pre class="kit-pre" id="oldOut"></pre></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/admin.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -49,7 +49,9 @@ window.VAB = (function () {
|
||||
// visit is sent once, and from then on clicks carry the verified token
|
||||
async function wire(page, u) {
|
||||
const src = document.referrer || '';
|
||||
const d = await getJSON('/api/wire?page=' + encodeURIComponent(page) + (u ? '&u=' + encodeURIComponent(u) : '') + (src ? '&src=' + encodeURIComponent(src) : ''));
|
||||
// a PolHunter hunter (?ph= / #ph= token, or the token PolHunter's embed keeps for this tab) is paid to visit: never a verified view
|
||||
let hunt = /[?&#]ph=/.test(location.search + location.hash); try { hunt = hunt || !!sessionStorage.getItem('ph.token'); } catch (e) {}
|
||||
const d = await getJSON('/api/wire?page=' + encodeURIComponent(page) + (u ? '&u=' + encodeURIComponent(u) : '') + (src ? '&src=' + encodeURIComponent(src) : '') + (hunt ? '&hunt=1' : ''));
|
||||
renderTicker(d.ticker || []);
|
||||
if (d.ticket) {
|
||||
const need = (d.seconds || 6) * 1000; let seen = 0, last = Date.now(), sent = false;
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
</section>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/wallet.js?v=5"></script>
|
||||
<script src="/assets/buy.js?v=5"></script>
|
||||
<script src="/assets/boost.js?v=5"></script>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</ol></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/contract.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="card"><h2>Prices and taxes</h2><p>Boosts are priced in US dollars and paid in POL, whose price moves. Anything you receive is in POL and its dollar value can change. You are responsible for any taxes on what you receive where you live.</p></div>
|
||||
<div class="card"><h2>Who to ask</h2><p>TrustClickz, 615 Green Valley Drive, Moody, AL 35004. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/static.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-1
@@ -74,6 +74,7 @@
|
||||
<div class="step"><span class="n">03</span><b>Your ad spreads down</b><span>Everyone you bring in shows your ad on their page, five levels deep.</span></div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".steps .step" async></script>
|
||||
|
||||
<section class="band" aria-label="Boost">
|
||||
<div class="txt"><span class="lab">BOOST · ONE-TIME, NEVER A SUBSCRIPTION</span><h2>$5 = 500 guaranteed network views</h2><p>Plus a starred spot on the ticker. Each Boost pays 10% to five levels of your sponsor line in the same transaction, and 50% to the company.</p></div>
|
||||
@@ -94,7 +95,7 @@
|
||||
<p class="muted small">A Boost buys advertising, not income. Nothing is promised.</p>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/front.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
<p class="muted small">Levels follow the buyer's sponsor line. Someone who has not bought a Boost is passed over and their share goes up to the next person who has. Advertising, not income. Nothing is promised.</p>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/ledger.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
<p class="muted small">Advertising, not income. Nothing is promised.</p>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/member.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@
|
||||
</section>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/wallet.js?v=5"></script>
|
||||
<script src="/assets/my.js?v=5"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
<div class="card"><h2>Your choices</h2><p>You can edit your ad at any time, or ask us to remove it and your account here. Records on the blockchain cannot be removed by anyone.</p></div>
|
||||
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/static.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
<div id="status" class="note" hidden></div>
|
||||
<div id="kit" style="display:flex;flex-direction:column;gap:16px"><p class="muted">Loading the kit...</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/kitpage.js?v=5"></script>
|
||||
<script src="/assets/promote.js?v=5"></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
<div class="card"><h2>Limits</h2><p>As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites in ads, or events outside our control, and our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></div>
|
||||
<div class="card"><h2>Contact</h2><p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to TrustClickz, 615 Green Valley Drive, Moody, AL 35004.</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=5"></script>
|
||||
<script src="/assets/common.js?v=6"></script>
|
||||
<script src="/assets/static.js?v=5"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -434,6 +434,16 @@ const mtop = await anon.json('/api/wire?page=member&u=topdog');
|
||||
ok(q2.ok && q2.linkspin === 'no-account' && m2.linkspin.state === 'no-account', 'no LinkSpin account for the username: the ad works with its own link', m2.linkspin); }
|
||||
{ const s2 = await anon.json('/api/admin/status', undefined, { 'x-admin-token': ADMIN }); ok(s2.linkspin && s2.linkspin.on === true && s2.linkspin.ensured >= 3 && s2.linkspin.failed >= 1 && !JSON.stringify(s2.linkspin).includes(SSO_SECRET), 'admin status: LinkSpin tracking counters, no secret', s2.linkspin); }
|
||||
|
||||
console.log('14c. PolHunter mission (front page, How it works)');
|
||||
{ const hr = await anon.req('/'); const hh = await hr.text(); const csp = hr.headers.get('content-security-policy') || '';
|
||||
ok(/<script src="https:\/\/polhunter\.com\/embed\.js" data-slots="3" data-selector="\.steps \.step" async><\/script>/.test(hh) && (hh.match(/class="step"/g) || []).length === 3, 'front page carries the PolHunter embed on the 3 How it works steps');
|
||||
ok(/script-src[^;]*https:\/\/polhunter\.com/.test(csp) && /connect-src[^;]*https:\/\/polhunter\.com/.test(csp), 'CSP admits polhunter.com in script-src and connect-src'); }
|
||||
{ const H = client(); const before = (await M1.json('/api/my')).ad.views;
|
||||
let w = await H.json('/api/wire?page=front&hunt=1'); ok(w._status === 200 && !w.ticket && w.hunt === true && w.ticker.length > 0, 'a hunter (hunt=1) gets the page but no visit ticket: never a verified view', { t: w.ticket, h: w.hunt });
|
||||
w = await H.json('/api/wire?page=front&src=' + encodeURIComponent('https://polhunter.com/app')); ok(!w.ticket && w.hunt === true, 'a visit from polhunter.com gets no ticket either');
|
||||
w = await H.json('/api/wire?page=member&u=owner&hunt=1'); ok(!w.ticket, 'hunt=1 on a member page: no ticket');
|
||||
const r9 = await H.json('/api/visit/seen', { ticket: 'f'.repeat(24), visibleMs: 9000 }); ok(r9.verified === false, 'no ticket, no verified visit');
|
||||
ok((await M1.json('/api/my')).ad.views === before, 'hunter visits add no views to any ad'); }
|
||||
await sleep(1000); // the store writes 800 ms after a change; a Windows kill has no SIGINT flush
|
||||
console.log('15. restart');
|
||||
await stop(); await boot(); await sleep(500);
|
||||
|
||||
@@ -49,8 +49,8 @@ wire.setSecret(SECRET);
|
||||
// ---- http helpers ----
|
||||
const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'text/javascript', '.png': 'image/png', '.jpg': 'image/jpeg',
|
||||
'.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml' };
|
||||
const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://linkspin.app; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; "
|
||||
+ "img-src 'self' data: blob: https:; connect-src 'self' https://linkspin.app https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org "
|
||||
const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://linkspin.app https://polhunter.com; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; "
|
||||
+ "img-src 'self' data: blob: https:; connect-src 'self' https://linkspin.app https://polhunter.com https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org "
|
||||
+ "https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; "
|
||||
+ "font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: 'self'";
|
||||
function headers(extra) { return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {}); }
|
||||
@@ -276,7 +276,12 @@ const server = http.createServer(async (req, res) => {
|
||||
if (mp.ownAd) shown.push(mp.ownAd.id); mp.line.forEach(x => shown.push(x.ad.id)); mp.boosted.forEach(a => shown.push(a.id));
|
||||
ref = mp.ownerAddr;
|
||||
}
|
||||
out.ticket = issueTicket(req, kind === 'member' ? 'member:' + String(u.searchParams.get('u')).toLowerCase() : kind, shown, ref, u.searchParams.get('src'));
|
||||
// PolHunter hunters (mission on the front page's How it works, 2026-11-15) are paid to be here: their visit is never a verified
|
||||
// view or click (no ticket: no ad views, no Boost delivery, no verified-click token). The page says so with hunt=1 (a ?ph= / #ph=
|
||||
// token or PolHunter's tab token), or the visit comes from polhunter.com.
|
||||
const hunt = u.searchParams.get('hunt') === '1' || srcHost(u.searchParams.get('src')) === 'polhunter.com';
|
||||
out.ticket = hunt ? null : issueTicket(req, kind === 'member' ? 'member:' + String(u.searchParams.get('u')).toLowerCase() : kind, shown, ref, u.searchParams.get('src'));
|
||||
if (hunt) { out.hunt = true; store.bump('huntVisits'); }
|
||||
out.seconds = C.visitSeconds;
|
||||
return json(res, 200, out);
|
||||
}
|
||||
|
||||
+2
-1
@@ -7,7 +7,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
const PUB = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'public');
|
||||
const SITE = 'https://viraladblitz.com';
|
||||
const V = { css: 5, common: 5, page: 5 };
|
||||
const V = { css: 5, common: 6, page: 5 };
|
||||
const F = { co: 'TrustClickz', addr: '615 Green Valley Drive, Moody, AL 35004', updated: 'November 14, 2026', boostUsd: 5, views: '500', days: 30 };
|
||||
const FONTS = 'https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@1,700;1,800&family=Chakra+Petch:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap';
|
||||
// the daylight look's shared SVG bits (same as common.js)
|
||||
@@ -106,6 +106,7 @@ page('index.html', { path: '/', title: 'ViralAdBlitz | Your text ad on your whol
|
||||
<div class="step"><span class="n">03</span><b>Your ad spreads down</b><span>Everyone you bring in shows your ad on their page, five levels deep.</span></div>
|
||||
</div>
|
||||
</section>
|
||||
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".steps .step" async></script>
|
||||
|
||||
<section class="band" aria-label="Boost">
|
||||
<div class="txt"><span class="lab">BOOST · ONE-TIME, NEVER A SUBSCRIPTION</span><h2>$${F.boostUsd} = ${F.views} guaranteed network views</h2><p>Plus a starred spot on the ticker. Each Boost pays 10% to five levels of your sponsor line in the same transaction, and 50% to the company.</p></div>
|
||||
|
||||
Reference in New Issue
Block a user