Cut over to new decryption lib version and provide channel crack streaming updates

This commit is contained in:
Jack Kingsman
2026-01-08 18:52:24 -08:00
parent c739d536ec
commit 9d8229c7be
11 changed files with 583 additions and 740766 deletions
+8 -6
View File
@@ -1,5 +1,6 @@
import { useState, useEffect, useRef, useCallback } from 'react';
import { GroupTextCracker, type ProgressReport } from 'meshcore-hashtag-cracker';
import { ENGLISH_WORDLIST } from 'meshcore-hashtag-cracker/wordlist';
import NoSleep from 'nosleep.js';
import type { RawPacket, Channel } from '../types';
import { api } from '../api';
@@ -59,10 +60,9 @@ export function CrackerPanel({ packets, channels, onChannelCreate, onRunningChan
const noSleep = new NoSleep();
noSleepRef.current = noSleep;
// Load wordlist
cracker.loadWordlist('/words_alpha.txt')
.then(() => setWordlistLoaded(true))
.catch((err) => console.error('Failed to load wordlist:', err));
// Use built-in wordlist
cracker.setWordlist(ENGLISH_WORDLIST);
setWordlistLoaded(true);
return () => {
cracker.destroy();
@@ -387,9 +387,11 @@ export function CrackerPanel({ packets, channels, onChannelCreate, onRunningChan
/>
Decrypt historical
</label>
{decryptHistorical && undecryptedPacketCount !== null && undecryptedPacketCount > 0 && (
{decryptHistorical && (
<span className="text-xs text-muted-foreground">
(may take a while for {undecryptedPacketCount.toLocaleString()} packets)
{undecryptedPacketCount !== null && undecryptedPacketCount > 0
? `(${undecryptedPacketCount.toLocaleString()} packets; messages stream in as decrypted)`
: '(messages stream in as decrypted)'}
</span>
)}
</div>
+19 -12
View File
@@ -220,18 +220,25 @@ export function NewMessageModal({
</Tabs>
{showHistoricalOption && (
<div className="flex items-center justify-end space-x-2">
<Label
htmlFor="try-historical"
className="text-sm text-muted-foreground cursor-pointer"
>
Try decrypting {undecryptedCount.toLocaleString()} stored packet{undecryptedCount !== 1 ? 's' : ''}
</Label>
<Checkbox
id="try-historical"
checked={tryHistorical}
onCheckedChange={(checked) => setTryHistorical(checked === true)}
/>
<div className="space-y-1">
<div className="flex items-center justify-end space-x-2">
<Label
htmlFor="try-historical"
className="text-sm text-muted-foreground cursor-pointer"
>
Try decrypting {undecryptedCount.toLocaleString()} stored packet{undecryptedCount !== 1 ? 's' : ''}
</Label>
<Checkbox
id="try-historical"
checked={tryHistorical}
onCheckedChange={(checked) => setTryHistorical(checked === true)}
/>
</div>
{tryHistorical && (
<p className="text-xs text-muted-foreground text-right">
Messages will stream in as they decrypt in the background
</p>
)}
</div>
)}