oculon 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +73 -13
  2. package/dist/cli/main.js +316 -1
  3. package/dist/core/der.d.ts +2 -0
  4. package/dist/core/der.js +17 -0
  5. package/dist/core/http.d.ts +19 -1
  6. package/dist/core/http.js +24 -0
  7. package/dist/core/qr.d.ts +23 -0
  8. package/dist/core/qr.js +577 -0
  9. package/dist/core/quota.js +5 -0
  10. package/dist/core/raster.d.ts +6 -0
  11. package/dist/core/raster.js +298 -0
  12. package/dist/core/safeurl.d.ts +5 -0
  13. package/dist/core/safeurl.js +26 -0
  14. package/dist/core/verdict.js +1 -1
  15. package/dist/core/zip.d.ts +9 -0
  16. package/dist/core/zip.js +46 -0
  17. package/dist/index.d.ts +61 -0
  18. package/dist/index.js +99 -0
  19. package/dist/mcp.js +131 -5
  20. package/dist/modules/address.d.ts +6 -2
  21. package/dist/modules/address.js +32 -5
  22. package/dist/modules/apk.d.ts +37 -0
  23. package/dist/modules/apk.js +191 -0
  24. package/dist/modules/approvals.d.ts +40 -0
  25. package/dist/modules/approvals.js +155 -0
  26. package/dist/modules/archive.d.ts +21 -0
  27. package/dist/modules/archive.js +94 -0
  28. package/dist/modules/checks.js +33 -0
  29. package/dist/modules/contract.d.ts +56 -0
  30. package/dist/modules/contract.js +167 -0
  31. package/dist/modules/deployer.d.ts +42 -0
  32. package/dist/modules/deployer.js +90 -0
  33. package/dist/modules/doc.d.ts +24 -2
  34. package/dist/modules/doc.js +133 -7
  35. package/dist/modules/eml.d.ts +46 -0
  36. package/dist/modules/eml.js +175 -0
  37. package/dist/modules/hashcheck.d.ts +19 -3
  38. package/dist/modules/hashcheck.js +28 -4
  39. package/dist/modules/image.d.ts +32 -0
  40. package/dist/modules/image.js +276 -0
  41. package/dist/modules/invite.d.ts +27 -0
  42. package/dist/modules/invite.js +69 -0
  43. package/dist/modules/job.d.ts +33 -0
  44. package/dist/modules/job.js +64 -0
  45. package/dist/modules/meerkat.d.ts +1 -1
  46. package/dist/modules/meerkat.js +35 -2
  47. package/dist/modules/monitor.js +14 -0
  48. package/dist/modules/poisoning.d.ts +43 -0
  49. package/dist/modules/poisoning.js +114 -0
  50. package/dist/modules/qrcheck.d.ts +24 -0
  51. package/dist/modules/qrcheck.js +136 -0
  52. package/dist/modules/repo.d.ts +61 -0
  53. package/dist/modules/repo.js +162 -0
  54. package/dist/modules/report.d.ts +32 -0
  55. package/dist/modules/report.js +108 -0
  56. package/dist/modules/signature.d.ts +35 -0
  57. package/dist/modules/signature.js +283 -0
  58. package/dist/modules/site.d.ts +62 -0
  59. package/dist/modules/site.js +191 -0
  60. package/dist/modules/stocktoken.d.ts +48 -0
  61. package/dist/modules/stocktoken.js +99 -0
  62. package/dist/modules/trace.d.ts +37 -0
  63. package/dist/modules/trace.js +150 -0
  64. package/dist/modules/txexplain.d.ts +40 -0
  65. package/dist/modules/txexplain.js +135 -0
  66. package/dist/modules/urlcheck.js +15 -1
  67. package/dist/modules/where.d.ts +63 -0
  68. package/dist/modules/where.js +165 -0
  69. package/dist/report-pdf.js +3 -0
  70. package/dist/sources/cfurlscan.d.ts +24 -0
  71. package/dist/sources/cfurlscan.js +46 -0
  72. package/dist/sources/chainabuse.d.ts +17 -0
  73. package/dist/sources/chainabuse.js +19 -0
  74. package/dist/sources/evm.d.ts +135 -0
  75. package/dist/sources/evm.js +260 -0
  76. package/dist/sources/phishlists.d.ts +20 -0
  77. package/dist/sources/phishlists.js +90 -0
  78. package/dist/telegram.d.ts +17 -0
  79. package/dist/telegram.js +151 -4
  80. package/dist/web/docs.html +1 -1
  81. package/dist/web/index.html +147 -11
  82. package/dist/web/landing.html +1 -1
  83. package/dist/web/legal.html +3 -1
  84. package/dist/web/mcp.html +1 -1
  85. package/dist/web/openapi.js +13 -0
  86. package/dist/web/pages.js +2 -2
  87. package/dist/web/public.js +14 -1
  88. package/dist/web/server.d.ts +13 -0
  89. package/dist/web/server.js +77 -12
  90. package/dist/web/token.html +24 -4
  91. package/dist/web/token.json +12 -1
  92. package/package.json +2 -2
package/dist/telegram.js CHANGED
@@ -21,9 +21,9 @@ export function formatSignal(s) {
21
21
  return `<b>[${Math.round(s.score)}] ${esc(s.title)}</b> <code>${esc(s.module)}</code>${ev ? `\n${ev}` : ''}`;
22
22
  }
23
23
  /** Commands anyone may use when the bot is public. Everything else stays with the allowlisted chats. */
24
- export const PUBLIC_COMMANDS = new Set(['/start', '/help', '/scam', '/url', '/factcheck', '/recall', '/email', '/travel', '/airport', '/country', '/papers', '/audit', '/monitor', '/monitors', '/unmonitor', '/cve', '/vulns', '/hazards', '/blackout', '/cloud', '/space', '/air', '/radar', '/signals', '/alerts', '/ask', '/ip', '/hash', '/ransomware', '/company', '/breaches', '/phone', '/satellite', '/iban', '/lookalike', '/honeypot', '/address', '/headers']);
24
+ export const PUBLIC_COMMANDS = new Set(['/start', '/help', '/scam', '/url', '/factcheck', '/recall', '/email', '/travel', '/airport', '/country', '/papers', '/audit', '/monitor', '/monitors', '/unmonitor', '/cve', '/vulns', '/hazards', '/blackout', '/cloud', '/space', '/air', '/radar', '/signals', '/alerts', '/ask', '/ip', '/hash', '/ransomware', '/company', '/breaches', '/phone', '/satellite', '/iban', '/lookalike', '/honeypot', '/address', '/headers', '/approvals', '/contract', '/poison', '/trace', '/repo', '/check', '/sig', '/qr', '/photo', '/doc', '/where', '/site', '/tx', '/creator', '/archive', '/invite', '/job', '/stock']);
25
25
  /** Commands that start many upstream calls or an LLM get a tighter budget. */
26
- const HEAVY = new Set(['/factcheck', '/papers', '/travel', '/country', '/ask', '/scam', '/audit', '/radar', '/ip', '/hash', '/company', '/lookalike', '/honeypot', '/address']);
26
+ const HEAVY = new Set(['/factcheck', '/papers', '/travel', '/country', '/ask', '/scam', '/audit', '/radar', '/ip', '/hash', '/company', '/lookalike', '/honeypot', '/address', '/approvals', '/contract', '/poison', '/trace', '/repo', '/check', '/sig', '/site', '/tx', '/creator', '/archive', '/invite', '/job']);
27
27
  export const PUBLIC_HELP = [
28
28
  '<b>Oculon</b>: check anything, every answer sourced.',
29
29
  '',
@@ -45,6 +45,22 @@ export const PUBLIC_HELP = [
45
45
  '/lookalike &lt;domain&gt; — lookalike domains and new certificates for a brand',
46
46
  '/honeypot &lt;token&gt; [eth|bsc|base] — can this token be sold?',
47
47
  '/address &lt;crypto address&gt; — sanctions, balance and activity',
48
+ '/approvals &lt;wallet&gt; — who can take your tokens? risky approvals flagged',
49
+ '/contract &lt;token&gt; [chain] — what the owner can still do: mint, blacklist, taxes, upgrades',
50
+ '/sig &lt;request&gt; — what does this signature request really allow?',
51
+ '/poison &lt;wallet&gt; — lookalike addresses planted in your history',
52
+ '/trace &lt;address&gt; — follow the money to exchanges and mixers',
53
+ '/repo &lt;owner/name&gt; — is this GitHub repo safe to run?',
54
+ '/check &lt;domain or 0x address&gt; — full report, every check on one page',
55
+ '/site &lt;link&gt; — wallet drainer or phishing page?',
56
+ '/tx &lt;hash&gt; — what happened in this transaction?',
57
+ '/creator &lt;token&gt; — who made this token, and how many of their tokens are dead?',
58
+ '/job &lt;message&gt; — is this job offer a scam?',
59
+ '/invite &lt;t.me or discord.gg link&gt; — what is behind this invite?',
60
+ '/archive &lt;link&gt; — save a page as evidence',
61
+ '/stock [TSLA or 0x...] — Robinhood Stock Token price, dividends, or is this one fake?',
62
+ 'Send an .eml email or an .apk app as a file to check it; a photo as a file with /where for its place, time and weather',
63
+ 'Send a photo or file: QR codes are read and checked, images checked for AI or edits, PDF and Office files for editing and macros',
48
64
  '/company &lt;name, LEI or EU VAT&gt; — is this supplier real?',
49
65
  '/breaches [domain] — newest data breaches, or one domain',
50
66
  '/ip &lt;address or domain&gt; — abuse reports, scanners, Tor, threat reports',
@@ -74,6 +90,7 @@ export const HELP = [
74
90
  '/recall &lt;VIN, "2018 Honda Accord" or product&gt; — vehicle and product recalls',
75
91
  '/email &lt;domain&gt; — can someone spoof email from this domain?',
76
92
  '/phone · /company · /iban · /headers · /breaches · /ip · /hash · /lookalike · /honeypot · /address · /ransomware · /satellite — caller, supplier, email, breach, crypto and threat checks',
93
+ '/approvals · /contract · /sig · /poison · /trace · /repo · /check · /site · /tx · /creator · /job · /invite · /archive — wallet safety, pages, repos and full reports; send a photo or file for QR, image and document checks',
77
94
  '/airport &lt;JFK|EGLL&gt; — airport weather, delays and ground stops',
78
95
  '/country &lt;name&gt; — economy, leaders, currency, travel advice, headlines',
79
96
  '/papers &lt;topic&gt; — research brief: most cited and newest papers',
@@ -480,6 +497,57 @@ export class TelegramBot {
480
497
  const d = (await o.lookalikes(arg)).result;
481
498
  return { html: `<b>${esc(d.domain)}</b>: <b>${d.risk.toUpperCase()} RISK</b>, ${d.live.length} of ${d.checked} lookalikes exist${d.live.slice(0, 10).map((l) => `\n${esc(l.domain)} · ${esc(l.kind)}${l.mx ? ' · mail' : ''}`).join('')}${d.certs.length ? `\n\nNew certificates: ${d.certs.slice(0, 5).map((c) => esc(c.name)).join(', ')}` : ''}` };
482
499
  }
500
+ case '/qr':
501
+ case '/photo':
502
+ case '/where':
503
+ case '/doc':
504
+ return { html: `Send the ${cmd === '/doc' ? 'PDF, Word or Excel file' : 'image'} to this chat${cmd === '/photo' ? ' as a file (paperclip, File), so its metadata is kept' : ''}, with ${cmd} as the caption.` };
505
+ case '/stock': {
506
+ const d = (await o.stockToken(arg)).result;
507
+ return { html: `<b>${esc(d.symbol ?? 'Robinhood Stock Tokens')}</b>: <b>${esc(d.verdict.toUpperCase())}</b>${d.reasons.slice(0, 6).map((x) => `\n• ${esc(x)}`).join('')}${d.advice[0] ? `\n${esc(d.advice[0])}` : ''}` };
508
+ }
509
+ case '/site':
510
+ case '/tx':
511
+ case '/creator':
512
+ case '/archive':
513
+ case '/invite':
514
+ case '/job':
515
+ case '/approvals':
516
+ case '/contract':
517
+ case '/poison':
518
+ case '/trace':
519
+ case '/repo':
520
+ case '/check':
521
+ case '/sig': {
522
+ if (!arg)
523
+ return needArg(cmd === '/site' || cmd === '/archive' ? 'https://example.com' : cmd === '/tx' ? '0x... (transaction hash)' : cmd === '/invite' ? 't.me/name or discord.gg/code' : cmd === '/job' ? 'the job message' : cmd === '/repo' ? 'owner/name' : cmd === '/check' ? 'example.com or 0x...' : cmd === '/sig' ? '0x095ea7b3... (calldata) or typed data JSON' : '0x... [eth|arbitrum|polygon]');
524
+ const [first, chain] = arg.split(/\s+/);
525
+ const opt = chain && /^(eth|base|bsc|bnb|arbitrum|polygon)$/i.test(chain) ? { chain } : {};
526
+ const kind = { '/approvals': 'approvals', '/contract': 'contract', '/poison': 'poisoning', '/trace': 'trace', '/site': 'site', '/tx': 'tx', '/creator': 'creator', '/archive': 'archive', '/invite': 'invite', '/job': 'job', '/repo': 'repo', '/check': /^0x[0-9a-f]{40}$/i.test(first) ? 'walletreport' : 'domainreport', '/sig': 'signature' }[cmd];
527
+ const target = cmd === '/sig' || cmd === '/job' ? arg : first;
528
+ const run = () => {
529
+ switch (kind) {
530
+ case 'approvals': return o.approvalsCheck(first, opt);
531
+ case 'contract': return o.contractRisk(first, opt);
532
+ case 'poisoning': return o.poisoningCheck(first, opt);
533
+ case 'trace': return o.traceFunds(first, opt);
534
+ case 'repo': return o.repoCheck(first);
535
+ case 'site': return o.siteCheck(first);
536
+ case 'tx': return o.explainTx(first, opt);
537
+ case 'creator': return o.creatorCheck(first, opt);
538
+ case 'archive': return o.archivePage(first);
539
+ case 'invite': return o.inviteCheck(first);
540
+ case 'job': return o.jobCheck(arg);
541
+ case 'walletreport': return o.walletReport(first, opt);
542
+ case 'domainreport': return o.domainReport(first);
543
+ default: return o.signatureCheck(arg);
544
+ }
545
+ };
546
+ const r = await o.recordCheck(kind, target, run, cmd === '/sig' ? { label: `signature request: ${arg.slice(0, 60)}` } : cmd === '/job' ? { label: `job offer: ${arg.slice(0, 60)}` } : {});
547
+ const d = r.value.result;
548
+ const extra = d.allows?.length ? d.allows.slice(0, 4).map((x) => `\n• ${esc(x)}`).join('') : d.parts?.length ? d.parts.map((p) => `\n• ${esc(p.part)}: ${esc(p.error ? 'not checked' : p.verdict ?? 'done')}`).join('') : '';
549
+ return { html: `<b>${esc(cmd === '/sig' ? 'Signature request' : cmd === '/job' ? 'Job offer' : first)}</b>: <b>${esc(d.verdict.toUpperCase())}</b> · risk ${d.risk}/100${extra}${d.reasons.slice(0, 6).map((x) => `\n! ${esc(x)}`).join('')}\n${esc(d.advice[0] ?? '')}\nReplay and PDF: https://app.oculon.live/replay/${r.check.id}` };
550
+ }
483
551
  case '/honeypot': {
484
552
  if (!arg)
485
553
  return needArg('0x6982508145454Ce325dDbE47a25d4ec3d2311933 eth');
@@ -868,6 +936,8 @@ export class TelegramBot {
868
936
  return this.handleCallback(u.callback_query);
869
937
  const m = u.message;
870
938
  const body = (m?.text ?? m?.caption ?? '').trim();
939
+ if (m && (m.photo?.length || m.document) && (m.chat.type === 'private' || /^\/(qr|photo|doc|where)\b/i.test(body)))
940
+ return this.handleFile(m);
871
941
  if (!m || !body)
872
942
  return;
873
943
  const chatId = String(m.chat.id);
@@ -907,6 +977,83 @@ export class TelegramBot {
907
977
  await this.send(chatId, `Error: ${esc(e.message)}`).catch(() => { });
908
978
  }
909
979
  }
980
+ /**
981
+ * A file sent to the bot: a QR code, a photo to check for AI or edits, or a document to check for editing.
982
+ * The caption picks the check (/qr, /photo, /doc); without one, documents go to the document check and
983
+ * images are read for a QR code first. Telegram re-compresses photos and drops their metadata, so the
984
+ * AI and edit check needs the image sent as a file.
985
+ */
986
+ async handleFile(m) {
987
+ const chatId = String(m.chat.id);
988
+ const owner = this.allowed(chatId);
989
+ if (!owner && !this.isPublic)
990
+ return;
991
+ if (!owner && !this.rateOk(chatId, true)) {
992
+ await this.send(chatId, 'You have reached the hourly limit. Try again a bit later, or use https://app.oculon.live');
993
+ return;
994
+ }
995
+ const o = this.oculon;
996
+ const want = /^\/(qr|photo|doc|where)\b/i.exec((m.caption ?? '').trim())?.[1]?.toLowerCase();
997
+ const pic = m.photo?.length ? m.photo[m.photo.length - 1] : null;
998
+ const fileId = pic?.file_id ?? m.document.file_id;
999
+ const size = pic?.file_size ?? m.document?.file_size ?? 0;
1000
+ if (size > 20 * 1024 * 1024) {
1001
+ await this.send(chatId, 'That file is larger than 20 MB (the most Telegram lets bots download).');
1002
+ return;
1003
+ }
1004
+ try {
1005
+ const info = await this.call('getFile', { file_id: fileId });
1006
+ if (!info.file_path)
1007
+ throw new Error('could not download the file');
1008
+ const res = await this.doFetch(`https://api.telegram.org/file/bot${this.opts.token}/${info.file_path}`, { signal: AbortSignal.timeout(30_000) });
1009
+ const file = Buffer.from(await res.arrayBuffer());
1010
+ const name = m.document?.file_name ?? 'photo.jpg';
1011
+ const isImage = Boolean(pic) || /^image\//.test(m.document?.mime_type ?? '') || /\.(png|jpe?g|webp)$/i.test(name);
1012
+ this.log(`file from ${owner ? chatId : 'public'}: ${want ?? (isImage ? 'image' : 'doc')}`);
1013
+ const { createHash } = await import('node:crypto');
1014
+ const hash = createHash('sha256').update(file).digest('hex');
1015
+ const line = (v, risk, pts, adv, id) => `<b>${esc(v.toUpperCase())}</b> · risk ${risk}/100${pts.slice(0, 5).map((p) => `\n! ${esc(p)}`).join('')}${adv ? `\n${esc(adv)}` : ''}\nReplay: https://app.oculon.live/replay/${id}`;
1016
+ if (/\.eml$/i.test(name) || m.document?.mime_type === 'message/rfc822') {
1017
+ const r = await o.recordCheck('eml', hash, () => o.emlCheck(file, name), { label: name });
1018
+ const d = r.value.result;
1019
+ await this.send(chatId, `<b>${esc(d.subject ?? name)}</b>\n${line(d.verdict, d.risk, d.reasons, d.advice[0], r.check.id)}`);
1020
+ return;
1021
+ }
1022
+ if (/\.apk$/i.test(name) || m.document?.mime_type === 'application/vnd.android.package-archive') {
1023
+ const r = await o.recordCheck('apk', hash, () => o.apkCheck(file, name), { label: name });
1024
+ const d = r.value.result;
1025
+ await this.send(chatId, `<b>${esc(d.package ?? name)}</b>\n${line(d.verdict, d.risk, d.reasons, d.advice[0], r.check.id)}`);
1026
+ return;
1027
+ }
1028
+ if (want === 'where') {
1029
+ const r = await o.recordCheck('where', hash, () => o.whereCheck(file, name), { label: name });
1030
+ const d = r.value.result;
1031
+ await this.send(chatId, `<b>Photo location</b>${d.gps ? `\n${esc(d.gps.map)}` : ''}\n${line(d.verdict, d.risk, [...d.reasons, ...d.notes], d.advice[0], r.check.id)}${pic ? '\n\nTelegram strips the location from photos: send it as a file.' : ''}`);
1032
+ return;
1033
+ }
1034
+ if (want === 'doc' || (!want && !isImage)) {
1035
+ const r = await o.recordCheck('doc', hash, () => o.docCheck(file, name), { label: name });
1036
+ const d = r.value.result;
1037
+ await this.send(chatId, `<b>${esc(name)}</b>\n${line(d.verdict, d.risk, d.flags, d.advice[0], r.check.id)}`);
1038
+ return;
1039
+ }
1040
+ if (want !== 'photo') {
1041
+ const r = await o.recordCheck('qr', hash, () => o.qrCheck(file, name), { label: name });
1042
+ const d = r.value.result;
1043
+ if (d.found || want === 'qr') {
1044
+ await this.send(chatId, `<b>QR code</b>${d.content ? `: <code>${esc(d.content.slice(0, 300))}</code>` : ''}\n${line(d.verdict, d.risk, d.reasons, d.advice[0], r.check.id)}`);
1045
+ return;
1046
+ }
1047
+ }
1048
+ const r = await o.recordCheck('image', hash, () => o.imageCheck(file, name), { label: name });
1049
+ const d = r.value.result;
1050
+ const note = pic ? '\n\nTelegram strips metadata from photos. For the AI and edit check, send the image as a file (paperclip, File).' : '';
1051
+ await this.send(chatId, `<b>Image</b>\n${line(d.verdict, d.risk, [...d.reasons, ...d.notes], d.advice[0], r.check.id)}${note}`);
1052
+ }
1053
+ catch (e) {
1054
+ await this.send(chatId, `Error: ${esc(e.message)}`).catch(() => { });
1055
+ }
1056
+ }
910
1057
  /** Push signals the chat has not seen yet. Returns how many were sent. */
911
1058
  async pushAlerts(signals) {
912
1059
  const db = this.oculon.ctx.store.db;
@@ -948,12 +1095,12 @@ export class TelegramBot {
948
1095
  const me = await this.call('getMe', {});
949
1096
  this.log(`bot @${me.username} running; ${this.opts.allowedChats.length} allowed chat(s)`);
950
1097
  if (this.isPublic) {
951
- await this.call('setMyCommands', { commands: ['scam', 'url', 'factcheck', 'recall', 'email', 'phone', 'company', 'iban', 'headers', 'breaches', 'ip', 'hash', 'lookalike', 'honeypot', 'address', 'ransomware', 'travel', 'airport', 'country', 'papers', 'audit', 'monitor', 'monitors', 'unmonitor', 'cve', 'hazards', 'blackout', 'alerts', 'help'].map((c) => ({ command: c, description: `Oculon ${c}` })) }).catch(() => { });
1098
+ await this.call('setMyCommands', { commands: ['scam', 'url', 'factcheck', 'recall', 'email', 'phone', 'company', 'iban', 'headers', 'breaches', 'ip', 'hash', 'lookalike', 'honeypot', 'address', 'approvals', 'contract', 'sig', 'poison', 'trace', 'repo', 'check', 'site', 'tx', 'creator', 'job', 'invite', 'archive', 'ransomware', 'travel', 'airport', 'country', 'papers', 'audit', 'monitor', 'monitors', 'unmonitor', 'cve', 'hazards', 'blackout', 'alerts', 'help'].map((c) => ({ command: c, description: `Oculon ${c}` })) }).catch(() => { });
952
1099
  }
953
1100
  for (const chat of this.opts.allowedChats)
954
1101
  await this.call('setMyCommands', {
955
1102
  scope: { type: 'chat', chat_id: Number(chat) },
956
- commands: ['ask', 'scam', 'monitors', 'unmonitor', 'url', 'factcheck', 'travel', 'audit', 'monitor', 'recall', 'email', 'phone', 'company', 'iban', 'headers', 'breaches', 'ip', 'hash', 'lookalike', 'honeypot', 'address', 'ransomware', 'satellite', 'airport', 'country', 'papers', 'case', 'brief', 'report', 'narratives', 'health', 'impact', 'contradict', 'sanctions', 'watch', 'fence', 'markets', 'launches', 'rewind', 'deployer', 'scoops', 'rh', 'ships', 'radar', 'signals', 'dossier', 'hype', 'footprint', 'plane', 'mil', 'events', 'lights', 'image', 'wallet', 'token', 'space', 'air', 'score', 'cloud', 'bgp', 'vulns', 'cve', 'regs', 'defi', 'squawk', 'filings', 'fires', 'sentinel', 'radar_image', 'darkships', 'vessel', 'blackout', 'hazards', 'podcast', 'exposure', 'social', 'calendar', 'connect', 'live', 'feedback', 'alerts'].filter((c) => onchainEnabled() || !/^(deployer|rh|wallet|token|defi|protocol)$/.test(c)).map((c) => ({ command: c, description: `Oculon ${c}` })),
1103
+ commands: ['ask', 'scam', 'monitors', 'unmonitor', 'url', 'factcheck', 'travel', 'audit', 'monitor', 'recall', 'email', 'phone', 'company', 'iban', 'headers', 'breaches', 'ip', 'hash', 'lookalike', 'honeypot', 'address', 'approvals', 'contract', 'sig', 'poison', 'trace', 'repo', 'check', 'site', 'tx', 'creator', 'job', 'invite', 'archive', 'ransomware', 'satellite', 'airport', 'country', 'papers', 'case', 'brief', 'report', 'narratives', 'health', 'impact', 'contradict', 'sanctions', 'watch', 'fence', 'markets', 'launches', 'rewind', 'deployer', 'scoops', 'rh', 'ships', 'radar', 'signals', 'dossier', 'hype', 'footprint', 'plane', 'mil', 'events', 'lights', 'image', 'wallet', 'token', 'space', 'air', 'score', 'cloud', 'bgp', 'vulns', 'cve', 'regs', 'defi', 'squawk', 'filings', 'fires', 'sentinel', 'radar_image', 'darkships', 'vessel', 'blackout', 'hazards', 'podcast', 'exposure', 'social', 'calendar', 'connect', 'live', 'feedback', 'alerts'].filter((c) => onchainEnabled() || !/^(deployer|rh|wallet|token|defi|protocol)$/.test(c)).map((c) => ({ command: c, description: `Oculon ${c}` })),
957
1104
  }).catch(() => { });
958
1105
  if (this.opts.watchMinutes && this.opts.watchMinutes > 0) {
959
1106
  this.scheduler = startScheduler(this.oculon, {
@@ -168,7 +168,7 @@ ots verify -d &lt;root&gt; &lt;id&gt;.ots # the root is committed i
168
168
  </section>
169
169
  <div id="doc" class="skeleton">Loading…</div>
170
170
  <section id="help"><h2 id="cli-reference">CLI reference</h2><p>The full command list, printed by <code>oculon help</code> on this install.</p><div id="help-out" class="skeleton">Loading…</div></section>
171
- <div style="margin-top:56px;padding-top:22px;border-top:1px solid var(--line)"><div class="lbl">Follow Oculon</div><div class="social"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div></div>
171
+ <div style="margin-top:56px;padding-top:22px;border-top:1px solid var(--line)"><div class="lbl">Follow Oculon</div><div class="social"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculonportal" target="_blank" rel="noopener" aria-label="Oculon community on Telegram" title="Oculon community on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div><p style="margin:10px 0 0;font:12px ui-monospace,Consolas,monospace;color:#7d8f93">Telegram bot: <a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" style="color:#9fb0b4">@oculon_radar_bot</a></p></div>
172
172
  </main>
173
173
  <aside class="right"><div class="lbl" style="margin-bottom:12px">On this page</div><div id="otp"></div></aside>
174
174
  </div>
@@ -559,7 +559,18 @@ nav button { white-space: nowrap; }
559
559
  <optgroup label="Everyday checks">
560
560
  <option value="scam">Is this message a scam? (paste it)</option>
561
561
  <option value="url">Is this link safe? (URL)</option>
562
- <option value="doc">Was this document edited? (PDF, screenshot or photo)</option>
562
+ <option value="doc">Was this document edited? (PDF, Word, Excel, screenshot or photo)</option>
563
+ <option value="aiimage">Is this image real? AI, edited or camera (image file)</option>
564
+ <option value="qr">Where does this QR code lead? (photo or screenshot)</option>
565
+ <option value="repo">Is this GitHub repo safe to run? (owner/name or link)</option>
566
+ <option value="domainreport">Full report on a domain (domain)</option>
567
+ <option value="site">Is this site a drainer or phishing page? (link)</option>
568
+ <option value="eml">Check a whole email file (.eml)</option>
569
+ <option value="apk">Is this Android app safe? (.apk file)</option>
570
+ <option value="job">Is this job offer a scam? (paste it)</option>
571
+ <option value="where">Where and when was this photo taken? (photo file)</option>
572
+ <option value="archive">Save a page as evidence (link)</option>
573
+ <option value="invite">What is behind this Telegram or Discord invite? (link)</option>
563
574
  <option value="iban">Is this IBAN valid? (IBAN)</option>
564
575
  <option value="headers">Was this email spoofed? (paste raw headers)</option>
565
576
  <option value="factcheck">Fact check (claim or news URL)</option>
@@ -581,6 +592,19 @@ nav button { white-space: nowrap; }
581
592
  <option value="lookalike">Lookalike domains of a brand (domain)</option>
582
593
  <option value="address">Crypto address check (BTC, 0x, Solana, Tron)</option>
583
594
  <option value="honeypot">Can this token be sold? (0x, Ethereum, BNB, Base)</option>
595
+ </optgroup>
596
+ <optgroup label="Wallet safety">
597
+ <option value="approvals">Who can take my tokens? Approvals (wallet 0x…, add arbitrum or polygon)</option>
598
+ <option value="contract">What can the token owner do? (token 0x…, add base, bsc…)</option>
599
+ <option value="signature">What does this signature request allow? (paste it)</option>
600
+ <option value="poisoning">Lookalike addresses in my history? (wallet 0x…)</option>
601
+ <option value="trace">Where did the money go? (address 0x…)</option>
602
+ <option value="walletreport">Full report on a wallet or token (0x…)</option>
603
+ <option value="tx">What happened in this transaction? (hash)</option>
604
+ <option value="creator">Who made this token? Creator record (token 0x…)</option>
605
+ <option value="stocktoken">Robinhood Stock Token (ticker or 0x…, empty for upcoming dividends)</option>
606
+ </optgroup>
607
+ <optgroup label="More threat intel">
584
608
  <option value="ransomware">Ransomware claims (country, sector, name, or empty)</option>
585
609
  <option value="satellites">Satellites (name, NORAD number, or empty for new launches)</option>
586
610
  </optgroup>
@@ -608,7 +632,7 @@ nav button { white-space: nowrap; }
608
632
  </optgroup>
609
633
  </select>
610
634
  <input type="text" id="inv-q" placeholder="paypa1-secure-login.top/verify" aria-label="Query">
611
- <label id="inv-file-l" class="filepick" hidden><input type="file" id="inv-file" accept=".pdf,.png,.jpg,.jpeg,application/pdf,image/png,image/jpeg"><span id="inv-file-n">Choose a PDF, PNG or JPEG (max 10 MB)</span></label>
635
+ <label id="inv-file-l" class="filepick" hidden><input type="file" id="inv-file" accept=".pdf,.png,.jpg,.jpeg,.webp,.docx,.docm,.xlsx,.xlsm,.pptx,.doc,.xls,.eml,.apk,application/pdf,image/*,message/rfc822,application/vnd.android.package-archive"><span id="inv-file-n">Choose a file (max 10 MB)</span></label>
612
636
  <textarea id="inv-ta" rows="7" hidden aria-label="Raw email headers" placeholder="Paste the full raw headers. Gmail: open the email, ⋮ menu, Show original. Outlook: File, Properties, Internet headers."></textarea>
613
637
  <button class="go" id="inv-go">Investigate</button>
614
638
  </div>
@@ -945,7 +969,7 @@ function handleMapClick(e) {
945
969
  const waitMap = setInterval(() => { if (map) { map.on('click', handleMapClick); clearInterval(waitMap); } }, 300);
946
970
 
947
971
  /* investigate */
948
- const placeholders = { doc: '', headers: '', iban: 'GB82 WEST 1234 5698 7654 32', lookalike: 'paypal.com', address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', honeypot: '0x6982508145454ce325ddbe47a25d4ec3d2311933', phone: '+1 876 555 0100', password: 'type a password (it never leaves your browser)', breaches: '(empty = newest breaches) or adobe.com', company: 'NL004495445B01', ip: '185.220.101.1', hash: '094fd325049b8a9cf6d3e5ef2a6d4cc6a567d7d49c35f8bb8dd9e3c6acf3d78d', ransomware: '(empty = newest claims) or Healthcare, DE, a company', satellites: '(empty = new launches) or ISS, 25544', scam: 'USPS: your package is on hold, pay the $1.99 fee within 24 hours at usps-redelivery-help.top/track', recall: '2018 Honda Accord', emailsec: 'example.com', airport: 'JFK', country: 'Argentina', papers: 'solid-state battery', url: 'paypa1-secure-login.top/verify', factcheck: 'The Great Wall of China is visible from space', audit: 'npm:lodash@4.17.15 npm:request pypi:requests==2.19.0', travel: 'Lisbon', dossier: 'Nvidia', hype: 'ai agent', footprint: 'openai.com', lights: 'Gaza Strip', aircraft: 'N628TS', image: 'Kyoto', /*onchain*/wallet: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', token: '0xdac17f958d2ee523a2206206994597c13d831ec7', /*/onchain*/air: 'New Delhi', space: '(no input needed)', /*onchain*/robinhood: '(no input needed)', deployer: '0x… token or deployer', /*/onchain*/launches: 'OpenAI', markets: '(no input needed)', rewind: '2026-11-12', sanctions: 'IMO 1234567 or 0x… or exact name', health: 'Nvidia', impact: '(empty = current quakes and storms)', contradictions: 'Anthropic IPO' };
972
+ const placeholders = { stocktoken: 'TSLA', doc: '', headers: '', aiimage: '', qr: '', signature: '', eml: '', apk: '', job: '', where: '', site: 'https://claim-airdrop-example.xyz', tx: '0x… transaction hash', creator: '0x… token', archive: 'https://… page to keep as evidence', invite: 't.me/name or discord.gg/code', approvals: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', contract: '0x6982508145454ce325ddbe47a25d4ec3d2311933', poisoning: '0x… your wallet', trace: '0x… address the funds went to', walletreport: '0x… wallet or token', repo: 'owner/name or https://github.com/…', domainreport: 'example.com', iban:'GB82 WEST 1234 5698 7654 32', lookalike: 'paypal.com', address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh', honeypot: '0x6982508145454ce325ddbe47a25d4ec3d2311933', phone: '+1 876 555 0100', password: 'type a password (it never leaves your browser)', breaches: '(empty = newest breaches) or adobe.com', company: 'NL004495445B01', ip: '185.220.101.1', hash: '094fd325049b8a9cf6d3e5ef2a6d4cc6a567d7d49c35f8bb8dd9e3c6acf3d78d', ransomware: '(empty = newest claims) or Healthcare, DE, a company', satellites: '(empty = new launches) or ISS, 25544', scam: 'USPS: your package is on hold, pay the $1.99 fee within 24 hours at usps-redelivery-help.top/track', recall: '2018 Honda Accord', emailsec: 'example.com', airport: 'JFK', country: 'Argentina', papers: 'solid-state battery', url: 'paypa1-secure-login.top/verify', factcheck: 'The Great Wall of China is visible from space', audit: 'npm:lodash@4.17.15 npm:request pypi:requests==2.19.0', travel: 'Lisbon', dossier: 'Nvidia', hype: 'ai agent', footprint: 'openai.com', lights: 'Gaza Strip', aircraft: 'N628TS', image: 'Kyoto', /*onchain*/wallet: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', token: '0xdac17f958d2ee523a2206206994597c13d831ec7', /*/onchain*/air: 'New Delhi', space: '(no input needed)', /*onchain*/robinhood: '(no input needed)', deployer: '0x… token or deployer', /*/onchain*/launches: 'OpenAI', markets: '(no input needed)', rewind: '2026-11-12', sanctions: 'IMO 1234567 or 0x… or exact name', health: 'Nvidia', impact: '(empty = current quakes and storms)', contradictions: 'Anthropic IPO' };
949
973
  const usd = (x) => (x == null ? '?' : '$' + Math.round(x).toLocaleString('en-US'));
950
974
 
951
975
  /* brief: tiny, safe Markdown renderer (escape first, then headings, bold, links, bullets) */
@@ -1092,8 +1116,21 @@ $('#ask-go').onclick = async () => {
1092
1116
  finally { $('#ask-go').disabled = false; }
1093
1117
  };
1094
1118
  $('#ask-q').addEventListener('keydown', (e) => { if (e.key === 'Enter') $('#ask-go').click(); });
1095
- $('#inv-kind').onchange = () => { const k = $('#inv-kind').value; $('#inv-q').placeholder = placeholders[k]; $('#inv-q').type = k === 'password' ? 'password' : 'text'; if (k === 'password') $('#inv-q').value = ''; $('#inv-q').hidden = k === 'doc' || k === 'headers'; $('#inv-file-l').hidden = k !== 'doc'; $('#inv-ta').hidden = k !== 'headers'; };
1096
- $('#inv-file').onchange = () => { const f = $('#inv-file').files[0]; $('#inv-file-n').textContent = f ? f.name + ' · ' + Math.round(f.size / 1024) + ' KB' : 'Choose a PDF, PNG or JPEG (max 10 MB)'; };
1119
+ $('#inv-kind').onchange = () => { const k = $('#inv-kind').value; $('#inv-q').placeholder = placeholders[k]; $('#inv-q').type = k === 'password' ? 'password' : 'text'; if (k === 'password') $('#inv-q').value = ''; $('#inv-q').hidden = FILE_KINDS.has(k) || TEXT_KINDS.has(k); $('#inv-file-l').hidden = !FILE_KINDS.has(k); $('#inv-ta').hidden = !TEXT_KINDS.has(k); $('#inv-ta').placeholder = TEXT_HINT[k] || ''; if (FILE_KINDS.has(k) && !$('#inv-file').files[0]) $('#inv-file-n').textContent = FILE_HINT[k]; };
1120
+ $('#inv-file').onchange = () => { const f = $('#inv-file').files[0]; $('#inv-file-n').textContent = f ? f.name + ' · ' + Math.round(f.size / 1024) + ' KB' : FILE_HINT[$('#inv-kind').value] || 'Choose a file (max 10 MB)'; };
1121
+ const FILE_KINDS = new Set(['doc', 'aiimage', 'qr', 'eml', 'apk', 'where']);
1122
+ const TEXT_KINDS = new Set(['headers', 'signature', 'job']);
1123
+ const FILE_HINT = { doc: 'Choose a PDF, Word, Excel, PNG or JPEG (max 10 MB)', aiimage: 'Choose the image file, not a screenshot of it (max 10 MB)', qr: 'Choose a photo or screenshot of the QR code (max 10 MB)', eml: 'Choose the .eml file (Gmail: ⋮ menu, Download message) (max 10 MB)', apk: 'Choose the .apk file (max 40 MB)', where: 'Choose the original photo file (JPEG or PNG, max 10 MB)' };
1124
+ const FILE_MAX = { apk: 40 };
1125
+ const TEXT_HINT = { headers: 'Paste the full raw headers. Gmail: open the email, ⋮ menu, Show original. Outlook: File, Properties, Internet headers.', signature: 'Paste what the wallet asks you to sign: the typed data JSON (eth_signTypedData), the transaction data (0x…), a {"to","data","value"} object, or the message text.', job: 'Paste the whole job message or email from the recruiter.' };
1126
+ const FILE_ROUTE = { doc: '/api/doc', aiimage: '/api/imagecheck', qr: '/api/qr', eml: '/api/eml', apk: '/api/apk', where: '/api/where' };
1127
+ const CHAIN_WORD = /^(eth|ethereum|base|bsc|bnb|arbitrum|polygon)$/i;
1128
+ /* Shared parts of the new check views: heading with verdict, list of reasons, advice. */
1129
+ const toneFor = (v, risk) => (/^(no|nothing|none)\b/i.test(v || '') ? 'ok' : /danger|malicious|sanction|poisoned|high risk|invalid|AI generated|mixer/i.test(v || '') || risk >= 70 ? 'bad' : /risky|suspicious|caution|check|review|edited|AI edited|computer/i.test(v || '') || risk >= 35 ? 'warn' : 'ok');
1130
+ const vHead = (title, d) => `<h3>${title} ${tonePill(toneFor(d.verdict, d.risk), d.verdict)} <span class="meta">risk ${d.risk}/100</span></h3>`;
1131
+ const vList = (xs, cls = 'ev') => (xs && xs.length ? `<ul class="${cls}">${xs.map((x) => `<li>${esc(x)}</li>`).join('')}</ul>` : '');
1132
+ const vAdvice = (d) => (d.advice && d.advice.length ? `<h3>What to do</h3>${vList(d.advice)}` : '');
1133
+ const short = (a) => (a ? esc(a.slice(0, 8) + '…' + a.slice(-6)) : '');
1097
1134
  /* Under every recorded check: what changed since last time, the replay log and the PDF report. */
1098
1135
  function checkFoot(r) {
1099
1136
  const c = r && r.check;
@@ -1106,6 +1143,89 @@ const sigList = (s) => (s.length ? `<h3>Signals</h3>${s.map(renderSignal).join('
1106
1143
  const link = (u, t) => `<a href="${safeUrl(u)}" target="_blank" rel="noopener noreferrer">${esc(t)}</a>`;
1107
1144
  const tonePill = (t, txt) => `<span class="pill ${t}">${esc(txt)}</span>`;
1108
1145
  const views = {
1146
+ approvals: (r) => {
1147
+ const d = r.result;
1148
+ return `${vHead(`<code>${short(d.address)}</code> <span class="meta">${esc(d.chain)}</span>`, d)}<p>${d.active} active approval${d.active === 1 ? '' : 's'}, ${d.unlimited} unlimited. <a href="${safeUrl(d.revokeUrl)}" target="_blank" rel="noopener noreferrer">Revoke them</a></p>${d.approvals.length ? `<table><tr><th>token</th><th>spender</th><th>amount</th><th>risk</th></tr>${d.approvals.slice(0, 40).map((a) => `<tr><td>${esc(a.symbol || short(a.token))}</td><td>${esc(a.spenderName || '')} <code>${short(a.spender)}</code><div class="meta">${esc(a.spenderType)}${a.why ? ' · ' + esc(a.why) : ''}</div></td><td>${esc(a.amount)}</td><td>${tonePill(a.risk === 'high' ? 'bad' : a.risk === 'medium' ? 'warn' : 'ok', a.risk)}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1149
+ },
1150
+ contract: (r) => {
1151
+ const d = r.result;
1152
+ const h = d.holders, l = d.liquidity;
1153
+ return `${vHead(`${esc(d.symbol || d.name || short(d.address))} <span class="meta">${esc(d.chain)}</span>`, d)}<p>${d.verified ? `Verified on ${esc(d.verifiedBy)}` : '<b>Source not verified</b>'} · owner ${d.owner ? `<code>${short(d.owner)}</code>${d.ownerRenounced ? ' (renounced)' : ''}` : 'none found'}${d.proxy ? ` · upgradeable proxy${d.proxy.admin ? `, admin <code>${short(d.proxy.admin)}</code>` : ''}` : ''}</p>${d.powers.length ? `<table><tr><th>owner power</th><th>functions</th></tr>${d.powers.map((p) => `<tr><td>${esc(p.power)}</td><td><code>${esc(p.functions.join(', '))}</code></td></tr>`).join('')}</table>` : '<p class="meta">No owner powers found in the code.</p>'}<p class="meta">${h ? `${h.count != null ? h.count.toLocaleString('en-US') + ' holders' : ''}${h.top10Percent != null ? ` · top 10 hold ${h.top10Percent}%` : ''}` : ''}${l ? ` · liquidity ${usd(l.usd)} ${esc(l.pair || '')} ${esc(l.dex || '')}${l.lockedPercent != null ? ` · ${l.lockedPercent}% LP locked or burned` : ''}` : ''}</p>${vList(d.reasons)}${vList(d.notes, 'meta')}${vAdvice(d)}`;
1154
+ },
1155
+ signature: (r) => {
1156
+ const d = r.result;
1157
+ return `${vHead(esc(d.type), d)}<h3>What you would allow</h3>${vList(d.allows)}${d.parties.length ? `<table><tr><th>role</th><th>address</th><th>who</th></tr>${d.parties.map((p) => `<tr><td>${esc(p.role)}</td><td><code>${esc(p.address)}</code></td><td>${esc(p.name || p.type || '?')}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1158
+ },
1159
+ poisoning: (r) => {
1160
+ const d = r.result;
1161
+ return `${vHead(`<code>${short(d.address)}</code> <span class="meta">${esc(d.chain)}</span>`, d)}<p class="meta">${d.checkedTransfers} token transfers read · ${d.realCounterparties} addresses this wallet really paid · ${d.zeroValue} zero-value transfers it never signed</p>${d.lookalikes.length ? `<table><tr><th>lookalike</th><th>posing as</th><th>how</th></tr>${d.lookalikes.map((x) => `<tr><td><code>${esc(x.fake)}</code></td><td><code>${esc(x.real)}</code></td><td>${esc(x.how.join(', '))} · ${x.seen}x</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1162
+ },
1163
+ trace: (r) => {
1164
+ const d = r.result;
1165
+ return `${vHead(`<code>${short(d.address)}</code> <span class="meta">${esc(d.chain)} · ${d.hops} hops</span>`, d)}<table><tr><th>hop</th><th>to</th><th>amount</th><th></th></tr>${d.nodes.slice(1).map((n) => `<tr><td class="num">${n.hop}</td><td><code>${short(n.address)}</code> ${esc(n.label || '')}<div class="meta">from <code>${short(n.receivedFrom)}</code>${n.firstTx ? ` · tx <code>${short(n.firstTx)}</code>` : ''}</div></td><td>${esc(n.amount || '')}</td><td>${tonePill(n.kind === 'exchange' ? 'info' : /mixer|sanctioned|scam/.test(n.kind) ? 'bad' : 'ok', n.kind)}</td></tr>`).join('')}</table>${vList(d.reasons)}${vAdvice(d)}`;
1166
+ },
1167
+ aiimage: (r) => {
1168
+ const d = r.result;
1169
+ const c = d.c2pa;
1170
+ return `${vHead(esc(d.name), d)}<p class="meta">${esc(d.type)} · ${Math.round(d.bytes / 1024)} KB${d.camera ? ' · camera ' + esc(d.camera) : ''}${d.software ? ' · software ' + esc(d.software) : ''}</p>${c ? `<p>Content Credentials: ${esc(c.generator || 'present')}${c.sourceType ? ` · ${esc(c.sourceType)}` : ''}${c.signers.length ? ` · certificates name ${esc(c.signers.slice(0, 3).join(', '))}` : ''}</p>` : ''}${d.generator ? `<p>Generator: <b>${esc(d.generator.tool)}</b>${d.generator.prompt ? `<div class="meta">prompt: ${esc(d.generator.prompt)}</div>` : ''}</p>` : ''}${vList(d.reasons)}${vList(d.notes, 'meta')}${vAdvice(d)}`;
1171
+ },
1172
+ qr: (r) => {
1173
+ const d = r.result;
1174
+ return `${vHead(d.found ? esc(d.kind || 'QR code') : 'No QR code found', d)}${d.content ? `<p><code>${esc(d.content.slice(0, 500))}</code></p>` : ''}${Object.keys(d.target || {}).length ? `<table>${Object.entries(d.target).map(([k, v]) => `<tr><td>${esc(k)}</td><td>${esc(v)}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1175
+ },
1176
+ repo: (r) => {
1177
+ const d = r.result;
1178
+ const s = d.stats;
1179
+ return `${vHead(link(d.url, d.repo), d)}<p class="meta">${s.stars.toLocaleString('en-US')} stars · created ${esc(s.createdAt.slice(0, 10))} · ${s.scanned} of ${s.files} files read${d.account ? ` · owner account ${d.account.ageDays ?? '?'} days old` : ''}${d.stars ? ` · ${d.stars.newAccounts} of the last ${d.stars.sampled} stars from new accounts` : ''}</p>${d.findings.length ? `<table><tr><th>file</th><th>finding</th><th></th></tr>${d.findings.slice(0, 30).map((f) => `<tr><td><code>${esc(f.file)}${f.line ? ':' + f.line : ''}</code></td><td>${esc(f.what)}${f.excerpt ? `<div class="meta"><code>${esc(f.excerpt)}</code></div>` : ''}</td><td>${tonePill(f.severity === 'high' ? 'bad' : f.severity === 'medium' ? 'warn' : 'ok', f.severity)}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1180
+ },
1181
+ stocktoken: (r) => {
1182
+ const d = r.result;
1183
+ const p = d.price;
1184
+ return `${vHead(esc(d.symbol ? `${d.symbol} · ${d.name || ''}` : 'Robinhood Stock Tokens'), d)}${d.contract ? `<p class="meta">${esc(d.contract)} · ${esc(d.chain || '')}${d.isin ? ' · ISIN ' + esc(d.isin) : ''}${d.supply != null ? ' · supply ' + d.supply.toLocaleString('en-US') : ''}</p>` : ''}${p ? `<p>Bid <b>$${p.tokenBid?.toFixed(2) ?? '?'}</b> · ask <b>$${p.tokenAsk?.toFixed(2) ?? '?'}</b> per token · day $${p.dailyLow ?? '?'} to $${p.dailyHigh ?? '?'}${p.halted ? ' · <span class="pill bad">halted</span>' : ''}</p>` : ''}${d.corporateActions.length ? `<table><tr><th>date</th><th>token</th><th>action</th><th>status</th></tr>${d.corporateActions.map((x) => `<tr><td>${esc(x.date || '?')}</td><td>${esc(x.symbol)}</td><td>${esc(x.type)}${x.detail ? ` <span class="meta">${esc(x.detail)}</span>` : ''}</td><td class="meta">${esc(x.status)}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1185
+ },
1186
+ site: (r) => {
1187
+ const d = r.result;
1188
+ return `${vHead(link(d.finalUrl, d.domain), d)}<p class="meta">${d.title ? `"${esc(d.title)}" · ` : ''}${d.scripts.read} scripts read${d.reputation && d.reputation.ageDays != null ? ` · domain ${d.reputation.ageDays} days old` : ''}${d.finalUrl !== d.url ? ` · redirected from ${esc(d.url)}` : ''}</p>${d.browser ? `<p class="meta">Opened in a real browser by Cloudflare: ${d.browser.malicious ? '<b>malicious</b>' : 'no verdict'}${d.browser.categories.length ? ' · ' + esc(d.browser.categories.join(', ')) : ''} · ${d.browser.domains} domains contacted · ${link(d.browser.report, 'scan report')}</p>` : ''}${d.reports && d.reports.count ? `<p class="meta">${d.reports.count} victim reports on Chainabuse · ${link(d.reports.url, 'view')}</p>` : ''}${d.forms.filter((f) => f.password || f.seed || f.card).length ? `<table><tr><th>form sends to</th><th>asks for</th></tr>${d.forms.filter((f) => f.password || f.seed || f.card).map((f) => `<tr><td><code>${esc(f.action || '(same page)')}</code>${f.external ? ' <span class="pill bad">other domain</span>' : ''}</td><td>${[f.seed && 'seed phrase', f.password && 'password', f.card && 'card'].filter(Boolean).join(', ')}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1189
+ },
1190
+ tx: (r) => {
1191
+ const d = r.result;
1192
+ return `${vHead(`<code>${short(d.hash)}</code> <span class="meta">${esc(d.chain)} · ${esc(d.status)}</span>`, d)}${vList(d.summary)}${d.reasons.length ? `<h3>Why</h3>${vList(d.reasons)}` : ''}<p>${link(d.explorer, 'Open in the explorer')}</p>${vAdvice(d)}`;
1193
+ },
1194
+ creator: (r) => {
1195
+ const d = r.result;
1196
+ const toks = d.deployments.filter((x) => x.isToken);
1197
+ return `${vHead(`<code>${short(d.token)}</code> <span class="meta">${esc(d.chain)}</span>`, d)}<p>Creator ${d.deployer ? `<code>${esc(d.deployer)}</code>` : 'not found'}${d.createdAt ? ` · created ${esc(d.createdAt.slice(0, 10))}` : ''}${d.fundedBy ? ` · first funded by ${esc(d.fundedBy.label || short(d.fundedBy.address))}` : ''}</p>${toks.length ? `<table><tr><th>token</th><th>created</th><th>liquidity</th><th></th></tr>${toks.slice(0, 30).map((x) => `<tr><td>${esc(x.symbol || '?')} <code>${short(x.address)}</code></td><td>${esc(x.createdAt.slice(0, 10))}</td><td>${x.liquidityUsd == null ? 'no pool' : usd(x.liquidityUsd)}</td><td>${tonePill(x.dead ? 'bad' : 'ok', x.dead ? 'dead' : 'alive')}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vList(d.notes, 'meta')}${vAdvice(d)}`;
1198
+ },
1199
+ eml: (r) => {
1200
+ const d = r.result;
1201
+ return `${vHead(esc(d.subject || 'Email'), d)}<p class="meta">${esc(d.from || '')}${d.date ? ' · ' + esc(d.date) : ''}</p><table><tr><th>part</th><th>verdict</th><th>details</th></tr>${d.headers ? `<tr><td>headers</td><td>${tonePill(d.headers.tone === 'info' ? 'ok' : d.headers.tone, d.headers.verdict || 'checked')}</td><td class="meta">${esc(d.headers.points.slice(0, 2).join(' · '))}</td></tr>` : ''}${d.body ? `<tr><td>message (${d.body.links} links)</td><td>${tonePill(d.body.tone === 'info' ? 'ok' : d.body.tone, d.body.verdict || 'checked')}</td><td class="meta">${esc(d.body.points.slice(0, 2).join(' · '))}</td></tr>` : ''}${d.attachments.map((x) => `<tr><td>${esc(x.name)} <span class="meta">${esc(x.check)}</span></td><td>${tonePill(x.tone === 'info' ? 'ok' : x.tone, x.verdict || 'checked')}</td><td class="meta">${esc(x.points.slice(0, 2).join(' · '))}</td></tr>`).join('')}</table>${vList(d.reasons)}${vAdvice(d)}`;
1202
+ },
1203
+ apk: (r) => {
1204
+ const d = r.result;
1205
+ return `${vHead(esc(d.package || d.name), d)}<p class="meta">version ${esc(d.version || '?')} · Android SDK ${d.minSdk ?? '?'} to ${d.targetSdk ?? '?'} · ${d.permissions.length} permissions · signed by ${esc(d.signer.join(', ') || 'unknown')}${d.malware ? ` · malware databases: ${esc(d.malware.verdict)}` : ''}</p>${d.risky.length ? `<table><tr><th>permission</th><th>what it allows</th></tr>${d.risky.map((p) => `<tr><td><code>${esc(p.permission)}</code></td><td>${esc(p.why)}</td></tr>`).join('')}</table>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1206
+ },
1207
+ job: (r) => {
1208
+ const d = r.result;
1209
+ return `${vHead('Job offer', d)}${d.patterns.length ? `<table><tr><th>pattern</th><th>in the message</th></tr>${d.patterns.map((p) => `<tr><td>${esc(p.name)}</td><td class="meta">"${esc(p.evidence)}"</td></tr>`).join('')}</table>` : ''}${d.repo ? `<p>Repo ${esc(d.repo.repo)}: ${tonePill(toneFor(d.repo.verdict, d.repo.risk), d.repo.verdict)}</p>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1210
+ },
1211
+ where: (r) => {
1212
+ const d = r.result;
1213
+ const w = d.weather;
1214
+ return `${vHead(esc(d.place || d.name), d)}${d.gps ? `<p><code>${d.gps.lat}, ${d.gps.lon}</code> · ${link(d.gps.map, 'Open the map')}</p>` : ''}${d.taken ? `<p class="meta">taken ${esc(d.taken.local || '?')} local${d.taken.gpsUtc ? ' · GPS time ' + esc(d.taken.gpsUtc) : ''}${d.camera ? ' · ' + esc(d.camera) : ''}</p>` : ''}${w ? `<p>At that hour: ${esc([w.condition, w.tempC != null ? w.tempC + ' °C' : null, w.precipMm ? w.precipMm + ' mm rain' : null, w.daylight == null ? null : w.daylight ? 'daylight' : 'dark'].filter(Boolean).join(', '))}</p>` : ''}${vList(d.reasons)}${vList(d.notes, 'meta')}${vAdvice(d)}`;
1215
+ },
1216
+ archive: (r) => {
1217
+ const d = r.result;
1218
+ return `${vHead(esc(d.url), d)}${d.snapshot ? `<p>${link(d.snapshot, 'Wayback Machine snapshot')} <span class="meta">${esc(d.snapshotTime || '')}</span></p>` : ''}${d.page ? `<p class="meta">SHA-256 <code>${esc(d.page.sha256)}</code> · HTTP ${d.page.status} · ${esc(d.page.finalUrl)}</p>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1219
+ },
1220
+ invite: (r) => {
1221
+ const d = r.result;
1222
+ return `${vHead(`${esc(d.name || d.link)} <span class="meta">${esc(d.platform)} ${esc(d.kind || '')}</span>`, d)}<p class="meta">${d.members != null ? d.members.toLocaleString('en-US') + ' members' : ''}${d.online != null ? ` · ${d.online} online` : ''}${d.verified ? ' · verified' : ' · not verified'}${d.createdAt ? ' · created ' + esc(d.createdAt.slice(0, 10)) : ''}</p>${d.description ? `<p>${esc(d.description.slice(0, 300))}</p>` : ''}${vList(d.reasons)}${vAdvice(d)}`;
1223
+ },
1224
+ domainreport: (r) => views.walletreport(r),
1225
+ walletreport: (r) => {
1226
+ const d = r.result;
1227
+ return `${vHead(`<code>${esc(d.target)}</code> <span class="meta">${esc(d.kind)} report</span>`, d)}<table><tr><th>part</th><th>verdict</th><th>details</th></tr>${d.parts.map((p) => `<tr><td>${esc(p.part)}</td><td>${p.error ? '<span class="meta">not checked</span>' : tonePill(p.tone === 'bad' ? 'bad' : p.tone === 'warn' ? 'warn' : p.tone === 'ok' ? 'ok' : 'info', p.verdict || 'done')}${p.risk != null ? ` <span class="meta">${p.risk}</span>` : ''}</td><td class="meta">${esc(p.error || p.points.slice(0, 2).join(' · '))}</td></tr>`).join('')}</table>${vList(d.reasons)}${vAdvice(d)}`;
1228
+ },
1109
1229
  ip: (r) => {
1110
1230
  const d = r.result;
1111
1231
  const t = d.verdict === 'malicious' ? 'bad' : d.verdict === 'suspicious' ? 'warn' : 'ok';
@@ -1340,17 +1460,28 @@ $('#inv-go').onclick = async () => {
1340
1460
  finally { $('#inv-go').disabled = false; }
1341
1461
  return;
1342
1462
  }
1343
- if (kind === 'doc' || kind === 'headers') {
1463
+ if (FILE_KINDS.has(kind) || TEXT_KINDS.has(kind)) {
1344
1464
  $('#inv-go').disabled = true;
1345
1465
  try {
1346
1466
  let r;
1347
- if (kind === 'doc') {
1467
+ if (FILE_KINDS.has(kind)) {
1348
1468
  const f = $('#inv-file').files[0];
1349
1469
  if (!f) throw new Error('Choose a file first.');
1350
- if (f.size > 10 * 1024 * 1024) throw new Error('The file is larger than 10 MB.');
1470
+ const maxMb = FILE_MAX[kind] || 10;
1471
+ if (f.size > maxMb * 1024 * 1024) throw new Error(`The file is larger than ${maxMb} MB.`);
1351
1472
  out.innerHTML = '<p class="meta">Reading the file…</p>';
1352
1473
  const data = await new Promise((res, rej) => { const fr = new FileReader(); fr.onload = () => res(String(fr.result)); fr.onerror = () => rej(new Error('could not read the file')); fr.readAsDataURL(f); });
1353
- r = await post('/api/doc', { name: f.name, data });
1474
+ r = await post(FILE_ROUTE[kind], { name: f.name, data });
1475
+ } else if (kind === 'job') {
1476
+ const s = $('#inv-ta').value.trim();
1477
+ if (s.length < 20) throw new Error('Paste the job message first.');
1478
+ out.innerHTML = '<p class="meta">Checking…</p>';
1479
+ r = await post('/api/job', { message: s });
1480
+ } else if (kind === 'signature') {
1481
+ const s = $('#inv-ta').value.trim();
1482
+ if (s.length < 10) throw new Error('Paste the signature request first.');
1483
+ out.innerHTML = '<p class="meta">Decoding…</p>';
1484
+ r = await post('/api/signature', { request: s });
1354
1485
  } else {
1355
1486
  const h = $('#inv-ta').value.trim();
1356
1487
  if (h.length < 20) throw new Error('Paste the raw headers first.');
@@ -1362,11 +1493,16 @@ $('#inv-go').onclick = async () => {
1362
1493
  finally { $('#inv-go').disabled = false; }
1363
1494
  return;
1364
1495
  }
1365
- const param = { iban: 'iban', lookalike: 'domain', address: 'address', honeypot: 'address', phone: 'number', breaches: 'domain', company: 'q', ip: 'ip', hash: 'hash', ransomware: 'q', satellites: 'q', scam: 'message', recall: 'q', emailsec: 'domain', airport: 'code', country: 'name', papers: 'topic', url: 'url', factcheck: 'claim', audit: 'packages', travel: 'place', dossier: 'name', hype: 'topic', footprint: 'domain', lights: 'place', aircraft: 'q', /*onchain*/wallet: 'address', token: 'address', /*/onchain*/air: 'place', space: 'x', /*onchain*/robinhood: 'x', deployer: 'address', /*/onchain*/launches: 'company', markets: 'x', rewind: 'date', sanctions: 'q', health: 'company', impact: 'place', contradictions: 'topic' }[kind];
1496
+ const param = { stocktoken: 'q', site: 'url', tx: 'hash', creator: 'address', archive: 'url', invite: 'link', approvals: 'address', contract: 'address', poisoning: 'address', trace: 'address', walletreport: 'address', repo: 'repo', domainreport: 'domain', iban: 'iban',lookalike: 'domain', address: 'address', honeypot: 'address', phone: 'number', breaches: 'domain', company: 'q', ip: 'ip', hash: 'hash', ransomware: 'q', satellites: 'q', scam: 'message', recall: 'q', emailsec: 'domain', airport: 'code', country: 'name', papers: 'topic', url: 'url', factcheck: 'claim', audit: 'packages', travel: 'place', dossier: 'name', hype: 'topic', footprint: 'domain', lights: 'place', aircraft: 'q', /*onchain*/wallet: 'address', token: 'address', /*/onchain*/air: 'place', space: 'x', /*onchain*/robinhood: 'x', deployer: 'address', /*/onchain*/launches: 'company', markets: 'x', rewind: 'date', sanctions: 'q', health: 'company', impact: 'place', contradictions: 'topic' }[kind];
1366
1497
  $('#inv-go').disabled = true;
1367
1498
  out.innerHTML = '<p class="meta">Working… some sources are rate-limited and take a while.</p>';
1368
1499
  try {
1369
- const r = kind === 'audit' && /^[{]/.test(q) ? await post('/api/audit', { manifest: q }) : await api(`/api/${kind}?${param}=${encodeURIComponent(q)}`);
1500
+ // "0x… arbitrum": a chain word after an address picks the chain.
1501
+ const words = q.split(/\s+/);
1502
+ const chainQ = words.length === 2 && /^0x[0-9a-f]{40}$/i.test(words[0]) && CHAIN_WORD.test(words[1]) ? `&chain=${encodeURIComponent(words[1].toLowerCase())}` : '';
1503
+ const qq = chainQ ? words[0] : q;
1504
+ const path = { domainreport: 'report/domain', walletreport: 'report/wallet' }[kind] || kind;
1505
+ const r = kind === 'audit' && /^[{]/.test(q) ? await post('/api/audit', { manifest: q }) : await api(`/api/${path}?${param}=${encodeURIComponent(qq)}${chainQ}`);
1370
1506
  const shareable = ['url', 'factcheck', 'travel', 'audit', 'recall', 'emailsec', 'papers', 'country', 'airport'].includes(kind) && !(kind === 'audit' && /^[{]/.test(q));
1371
1507
  out.innerHTML = views[kind](r) + checkFoot(r) + (shareable ? '<p class="row" style="margin-top:14px"><button class="icon-btn" id="inv-share">Share result</button><span class="meta" id="inv-share-out"></span></p>' : '') + `<h3>Sources</h3>${renderSources(r.provenance)}`;
1372
1508
  if (shareable) $('#inv-share').onclick = async () => {
@@ -638,7 +638,7 @@ r.provenance <span class="d">// every source used</span></pre></div></div>
638
638
 
639
639
  <footer class="sitefoot"><div class="wrap">
640
640
  <div class="fgrid">
641
- <div class="fbrand"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a><p>Open-source intelligence engine for the physical and digital world. Self-hosted, MIT licensed, zero runtime dependencies.</p><div class="fstatus"><i></i><span id="f-status">Engine online</span></div><div class="social"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" aria-label="Oculon Radar on Telegram" title="Oculon Radar on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div></div>
641
+ <div class="fbrand"><a class="logo" href="/"><img class="lm" src="/assets/logo.svg" alt="" width="22" height="22">OCULON</a><p>Open-source intelligence engine for the physical and digital world. Self-hosted, MIT licensed, zero runtime dependencies.</p><div class="fstatus"><i></i><span id="f-status">Engine online</span></div><div class="social"><a href="https://x.com/oculonlive" target="_blank" rel="noopener" aria-label="Oculon on X" title="Oculon on X"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg></a><a href="https://github.com/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on GitHub" title="Oculon on GitHub"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><a href="https://www.npmjs.com/package/oculon" target="_blank" rel="noopener" aria-label="Oculon on npm" title="Oculon on npm"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg></a><a href="https://t.me/oculonportal" target="_blank" rel="noopener" aria-label="Oculon community on Telegram" title="Oculon community on Telegram"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/></svg></a><a href="https://glama.ai/mcp/servers/oculonlive/oculon" target="_blank" rel="noopener" aria-label="Oculon on Glama" title="Oculon on Glama"><svg viewBox="15 15 300 300" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M95 15H75V155H95V15ZM255 15H235V155H255V15ZM75 25H65V125H75V25ZM265 25H255V125H265V25ZM65 35H55V95H65V35ZM275 35H265V95H275V35ZM105 75H95V155H105V75ZM235 75H225V155H235V75ZM205 85H125V185H205V85ZM125 95H105V155H125V95ZM225 95H205V155H225V95ZM75 145H65V155H75V145ZM265 145H255V155H265V145ZM125 155H115V225H125V155ZM215 155H205V225H215V155ZM85 165H75V315H85V165ZM115 165H105V315H115V165ZM225 165H215V315H225V165ZM255 165H245V315H255V165ZM105 175H85V315H105V175ZM245 175H225V315H245V175ZM135 185H125V235H135V185ZM185 185H145V195H185V185ZM205 185H195V235H205V185ZM75 195H65V275H75V195ZM145 195H135V235H145V195ZM195 195H185V235H195V195ZM155 205H145V235H155V205ZM185 205H175V235H185V205ZM125 235H115V315H125V235ZM215 235H205V315H215V235ZM145 245H125V315H145V245ZM205 245H185V315H205V245ZM185 265H145V315H185V265Z"/></svg></a></div><p style="margin:10px 0 0;font:12px ui-monospace,Consolas,monospace;color:#7d8f93">Telegram bot: <a href="https://t.me/oculon_radar_bot" target="_blank" rel="noopener" style="color:#9fb0b4">@oculon_radar_bot</a></p></div>
642
642
  <div><h5>Product</h5><a href="#console">Console</a><!--onchain--><a href="#robinhood">Robinhood Chain</a><!--/onchain--><a href="#world">Live world</a><a href="#modules">Modules</a><a href="/app">Open the app</a></div>
643
643
  <div><h5>Developers</h5><a href="/docs#cli">CLI</a><a href="/docs#sdk">SDK</a><a href="/docs#mcp-server">MCP server</a><a href="/docs#telegram-bot">Telegram bot</a><a href="/docs#cli-reference">Command reference</a></div>
644
644
  <div><h5>Resources</h5><a href="/docs">Documentation</a><a href="/docs#install">Install</a><a href="/docs#configuration">Configuration</a><a href="/docs#limits">Limits</a><a href="/report">Weekly report</a><a href="/thetoken">Token</a></div>