diff --git a/dist/chrome/index.html b/dist/chrome/index.html index 9d26d6b..3d62064 100644 --- a/dist/chrome/index.html +++ b/dist/chrome/index.html @@ -2,7 +2,7 @@ - + diff --git a/dist/firefox/index.html b/dist/firefox/index.html index 9d26d6b..3d62064 100644 --- a/dist/firefox/index.html +++ b/dist/firefox/index.html @@ -2,7 +2,7 @@ - + diff --git a/dist/inzerosight-chrome.zip b/dist/inzerosight-chrome.zip index 5dd5088..3a4404b 100644 Binary files a/dist/inzerosight-chrome.zip and b/dist/inzerosight-chrome.zip differ diff --git a/dist/inzerosight-firefox.zip b/dist/inzerosight-firefox.zip index 6c09cb7..8a45fa8 100644 Binary files a/dist/inzerosight-firefox.zip and b/dist/inzerosight-firefox.zip differ diff --git a/docs/zwus.md b/docs/zwus.md index 9a724f6..a3b19fb 100644 --- a/docs/zwus.md +++ b/docs/zwus.md @@ -35,7 +35,7 @@ Detection requires an exact match to one of the nine registered signatures (thre For compatibility, inØsight still reads the old five-character PLAIN headers and ten-character encrypted headers for ZWUS-3, ZWUS-6, and ZWUS-7. New encoding always writes the 11-character format. Complete modern signatures take priority within an uninterrupted zero-width run. Legacy messages separated from modern messages by visible text remain independently detectable. -Legacy recognition is isolated in `LEGACY_SIGNATURES` and `parseLegacySig` in `sig.js`, with explicitly labeled legacy tests. To retire it, remove that registry, reader, legacy tests, and the `legacyPlain` condition in `findSig`, then make `parseSig` use only `parseModernSig`. Future standards must not be added to the legacy registry. +Legacy recognition is isolated in `LEGACY_SIGNATURES` and `parseLegacySig` in `src/sig.js`, with explicitly labeled legacy tests. To retire it, remove that registry, reader, legacy tests, and the `legacyPlain` condition in `findSig`, then make `parseSig` use only `parseModernSig`. Future standards must not be added to the legacy registry. Incomplete or unknown extended headers do not fall back to legacy PLAIN. Exact legacy encrypted headers remain recognized, with everything after their tenth character treated as payload. diff --git a/package.json b/package.json index 18abafd..7776fa2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "test": "bun test sig.test.js content.test.js", + "test": "bun test tests/sig.test.js tests/content.test.js", "dev": "vite --mode chrome", "build:web": "vite build --mode web", "build:firefox": "vite build --mode firefox", diff --git a/readme.md b/readme.md index c512bc0..de16a63 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -

+

inØsight

This sentence contains hidden text you can only read by installing inzerosight.‍​­‌‍‏‎‏‌⁠‍⁠‌⁠‍­‌­‎‏‌⁠‏‍‌­​‏‌⁠‏­‌⁠‏‏‌‏‏­‌‎­‌⁠­‏‌⁠‍⁠‌⁠‏⁠‌‎­‌­​⁠‌­​‏‌⁠‍­‌‎­‌⁠‍­‌⁠‍⁠‌⁠‏‎‌‎­‌­​⁠‌⁠‍⁠‌⁠‍‏‌⁠‍‏‌⁠‏⁠‌⁠‍­‌­‎⁠‌­​⁠‌­​‏‌⁠‏­‌­​‎‌‎­‌⁠‏‏‌­​‎‌­​⁠‌⁠‏‍‌­​‎‌⁠‏­‌⁠‍‍‌⁠­‏‌‎­‌­‎⁠‌⁠‍­‌‎­‌⁠‍​‌⁠‍‍‌­​‏‌­‎⁠‌⁠‍­‌‎­‌⁠‏‏‌­‎⁠‌­‎‏‌­‎­‌⁠‏­‌‏‏​

diff --git a/fonts/open-sans-v44-latin-regular.woff2 b/src/assets/fonts/open-sans-v44-latin-regular.woff2 similarity index 100% rename from fonts/open-sans-v44-latin-regular.woff2 rename to src/assets/fonts/open-sans-v44-latin-regular.woff2 diff --git a/icon_128.png b/src/assets/icon_128.png similarity index 100% rename from icon_128.png rename to src/assets/icon_128.png diff --git a/icon_500.png b/src/assets/icon_500.png similarity index 100% rename from icon_500.png rename to src/assets/icon_500.png diff --git a/chunked.js b/src/chunked.js similarity index 100% rename from chunked.js rename to src/chunked.js diff --git a/content.js b/src/content.js similarity index 100% rename from content.js rename to src/content.js diff --git a/dash.js b/src/dash.js similarity index 100% rename from dash.js rename to src/dash.js diff --git a/index.html b/src/index.html similarity index 100% rename from index.html rename to src/index.html diff --git a/sig.js b/src/sig.js similarity index 100% rename from sig.js rename to src/sig.js diff --git a/speck32_64ecb.js b/src/speck32_64ecb.js similarity index 100% rename from speck32_64ecb.js rename to src/speck32_64ecb.js diff --git a/speck48_96ctr.js b/src/speck48_96ctr.js similarity index 100% rename from speck48_96ctr.js rename to src/speck48_96ctr.js diff --git a/style.css b/src/style.css similarity index 97% rename from style.css rename to src/style.css index 60db6c8..de6e2e0 100644 --- a/style.css +++ b/src/style.css @@ -3,7 +3,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url('fonts/open-sans-v44-latin-regular.woff2') format('woff2'); + src: url('assets/fonts/open-sans-v44-latin-regular.woff2') format('woff2'); } html, body, div, span, applet, object, iframe, diff --git a/content.test.js b/tests/content.test.js similarity index 98% rename from content.test.js rename to tests/content.test.js index 6819872..197cc77 100644 --- a/content.test.js +++ b/tests/content.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import zwus from 'zwus'; -import { makeSig } from './sig.js'; +import { makeSig } from '../src/sig.js'; test('page overlay detects headers split by WBR and decodes across the split', async () => { const buttons = [], inserted = [], fixtures = [], texts = []; @@ -78,7 +78,7 @@ test('page overlay detects headers split by WBR and decodes across the split', a }; globalThis.requestAnimationFrame = callback => { callback(); return 1; }; - await import('./content.js'); + await import('../src/content.js'); assert.equal(buttons.length, fixtures.length); fixtures.forEach(({ cipher }, i) => assert.equal(buttons[i].textContent, cipher === 'PLAIN' ? 'Decode' : 'Decrypt')); diff --git a/sig.test.js b/tests/sig.test.js similarity index 97% rename from sig.test.js rename to tests/sig.test.js index 125d88d..e52b418 100644 --- a/sig.test.js +++ b/tests/sig.test.js @@ -1,10 +1,10 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import zwus from 'zwus'; -import * as chunked from './chunked.js'; -import * as ctr from './speck48_96ctr.js'; -import * as ecb from './speck32_64ecb.js'; -import { makeSig, parseSig, parseModernSig, parseLegacySig, getPayloadEnd } from './sig.js'; +import * as chunked from '../src/chunked.js'; +import * as ctr from '../src/speck48_96ctr.js'; +import * as ecb from '../src/speck32_64ecb.js'; +import { makeSig, parseSig, parseModernSig, parseLegacySig, getPayloadEnd } from '../src/sig.js'; // Frozen wire-format fixtures, independent of the signature registry. const HEADERS = { diff --git a/vite.config.js b/vite.config.js index 73fc40f..8844023 100644 --- a/vite.config.js +++ b/vite.config.js @@ -65,15 +65,16 @@ export default defineConfig(async ({ mode }) => { plugins.push({ name: 'copy-icon', writeBundle() { - if (fs.existsSync('icon_500.png')) { - fs.copyFileSync('icon_500.png', `dist/${target}/icon_500.png`); + if (fs.existsSync('src/assets/icon_500.png')) { + fs.copyFileSync('src/assets/icon_500.png', `dist/${target}/icon_500.png`); } } }); return { + root: 'src', build: { - outDir: `dist/${target}`, + outDir: `../dist/${target}`, emptyOutDir: true, }, plugins,