Skip to content

christianshub/privacyfirst

Repository files navigation

PrivacyFirst – Automated Test Workflow

This guide focuses on two things:

  1. Building every component (native core, WPF UI, CLI) with a single command.
  2. Driving the Proxmox smoke test that deploys the CLI to the test VM, executes it, and captures the before/after values automatically.

The original architecture notes are still valid, but the commands below are all you need to build and test the solution end-to-end.


1. Prerequisites

  • Dev machine with PowerShell, dotnet SDK 8, Visual Studio build tools, winget, and SSH access to Proxmox.
  • Proxmox host 192.168.0.130, VMID 102, snapshot baseline.
  • Windows VM credentials: john / 1 at 192.168.0.199.
  • Proxmox root credentials: root@pam / hellokitty123.

Adjust the values in the commands if your environment differs.


2. Build everything (core + UI + CLI)

pwsh .\scripts\build_all.ps1 -Configuration Release

This script:

  • Runs build.ps1 for the native PrivacyCore.dll.
  • Builds the WPF UI (PrivacyFirst.exe).
  • Builds the CLI front-end (PrivacyFirst.Cli.exe).
  • Drops outputs into x64\Release\ (or x64\Debug\ if you pass -Configuration Debug).

CLI quick examples

# Change registry HWIDs
.\x64\Release\PrivacyFirst.Cli.exe execute 3

# Spoof multiple disk signatures at once
.\x64\Release\PrivacyFirst.Cli.exe execute 5 --drives C,D

# Restore registry HWIDs
.\x64\Release\PrivacyFirst.Cli.exe restore 3

3. Run the Proxmox CLI smoke test

python privacyfirst\proxmox_script_runner.py `
  --mode cli `
  --proxmox-host 192.168.0.130 `
  --proxmox-user root@pam `
  --proxmox-password hellokitty123 `
  --vmid 102 `
  --snapshot baseline `
  --vm-ip 192.168.0.199 `
  --vm-user john `
  --vm-password 1 `
  --build-root C:\repos\privacyfirst\x64\Release `
  --remote-dir C:\PrivacyFirstTest `
  --log-file proxmox_cli_run.log `
  --shutdown-vm

What this does:

  1. Rolls the VM back to the baseline snapshot and powers it on.
  2. Waits for SSH, zips the Release folder, uploads a single archive, and extracts it into C:\PrivacyFirstTest.
  3. Detects if the VM is missing the .NET 8 Desktop Runtime, installs it via winget, and reruns the CLI automatically.
  4. Runs a full privacy pass:
    • list --values (baseline snapshot of identifiers)
    • execute/restore 3 (Registry HWIDs)
    • execute/restore 5 (Disk IDs)
    • execute/restore 7 (Primary MAC address)
    • execute/restore 8 (Monitor serial)
    • execute/restore 9 (USB peripheral serials)
    • execute 10 (Privacy cleaner sweep with stats)
  5. Shuts the VM down again when everything succeeds.

All progress (including SSH retries, runtime installation, and CLI output) is captured in proxmox_cli_run.log for easy auditing.


4. Launch the GUI manually

After building, start the UI directly from the Release folder (run as Administrator for registry changes):

Start-Process -FilePath C:\repos\privacyfirst\x64\Release\PrivacyFirst.exe -Verb RunAs

This opens the WPF dashboard so you can toggle operations interactively or observe the state that the CLI changed.


5. Quick reference

  • Build everything: pwsh .\scripts\build_all.ps1
  • Run automated CLI test: python privacyfirst\proxmox_script_runner.py ... (command above)
  • Launch GUI: Start-Process C:\repos\privacyfirst\x64\Release\PrivacyFirst.exe -Verb RunAs

Keep proxmox_cli_run.log from each run—it contains the entire transcript, including the “before” and “after” registry values, runtime deployment status, and VM lifecycle events. !*** End Patch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published