mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2026-11-12 22:26:36 +00:00
Continues the Rust port with the two tractable remaining slices plus the
foundation for the deepest one. Analyzed the deleted scripts from git
history (f34d025) to keep data and mechanics faithful.
HWID (src/activation/hwid.rs):
- Region decision (30-country skip list -> GeoId 244) and the two-method
apply retry (ClipSVC restart, then `clipup -v -o`, success = tokens.dat)
as portable, unit-tested orchestration. ClipSVC ops added behind the Spp
trait; the Windows backend drives them via std::process/std::fs.
- Corrected: GenuineTicket.xml is an in-process RSA-signed XML build (not
gatherosstate/clipup) — generation is portable once the shared RSA layer
lands; documented accordingly.
KMS38 (src/activation/kms38.rs):
- Corrected mechanism: not a ClipUp flow but a detect-and-preserve variant
of Online KMS. Ported the load-bearing pure logic (eligibility gate
build>=14393 excl. EnterpriseG/GN, >180-day lease detection, ceil grace
days) with tests; loopback 127.0.0.2 pin via a new Spp op (reg add).
libtsforge (new workspace crate, dependency-free, 17 tests):
- The deleted TSforge script embeds the full LibTSforge C# reference; this
ports it in layers. CRC-32/BZIP2 (fixes a wrong reflected-IEEE CRC) and
SHA-256, both test-vector verified; PsVersion detection, Align, UTF-16;
the Vista/Win7 physical-store dialects and both VariableBag CRC dialects
(incl. the CRCBlockModern unaligned-CRC-input quirk), all round-trip
tested. RSA/AES/HMAC deferred behind a crypto-trait seam.
- tsforge activator wired to libtsforge (store-version selection); still
returns a typed Unsupported until TokenStore + RSA land.
48 tests pass (31 mas + 17 libtsforge), clippy clean, offline. The Windows
backend additions compile only on Windows and are unverified on this host.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
745 B
TOML
19 lines
745 B
TOML
[package]
|
|
name = "libtsforge"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
rust-version = "1.74"
|
|
description = "SPP trusted-store codec for TSforge activation — CRC/hash primitives, store container format, and product tables."
|
|
license = "GPL-3.0-or-later"
|
|
|
|
# Dependency-free by default so the store/CRC/hash logic and data tables are
|
|
# unit-tested on any OS, offline. The RSA/AES layers needed to sign a real
|
|
# ticket are the one part that should pull vetted crates (RustCrypto: `rsa`,
|
|
# `aes`, `cbc`) behind a future `crypto` feature — see src/crypto.rs. CRC32 and
|
|
# SHA-256 are hand-rolled here (small, standard, test-vector-verified) so the
|
|
# store-integrity layers stay dependency-free and portable.
|
|
|
|
[lib]
|
|
name = "libtsforge"
|
|
path = "src/lib.rs"
|