Skip to main content

Module exe_version

Module exe_version 

Source
Expand description

Extract the embedded ProductVersion / FileVersion string from a Windows PE binary’s VERSIONINFO resource — the same data File Explorer’s Details tab shows.

Used by:

  • kanade-backend’s POST /api/agents/publish — auto-derives the Object-Store key from the uploaded bytes, so the operator can’t typo a label that disagrees with the binary (the failure mode that caused the “rollout to 1.0.0 → endless self-update” incident on v0.13.0).
  • kanade agent publish on the CLI — replaces the spawn-based --version probe (which only worked on hosts that could execute the binary).

Pure-pelite, no spawn / no OS-specific deps — works from any host (Linux operator uploading a Windows .exe is fine).

Functions§

extract_pe_version
Read the ProductVersion (falling back to FileVersion) from the VS_VERSIONINFO resource of a Windows PE. Returns None when: