Minor fixups

This commit is contained in:
Lyssa
2025-04-07 19:19:24 +04:00
parent 3f1c878318
commit 0c8b1efaa9
25 changed files with 168 additions and 194 deletions

View File

@ -3,9 +3,9 @@ namespace LibTSforge.Modifiers
using System;
using System.IO;
using Microsoft.Win32;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using LibTSforge.TokenStore;
using PhysicalStore;
using SPP;
using TokenStore;
public static class GenPKeyInstall
{
@ -58,7 +58,7 @@ namespace LibTSforge.Modifiers
if (pkey.Algorithm == PKeyAlgorithm.PKEY2009)
{
uint status = SLApi.InstallProductKey(pkey);
Logger.WriteLine(string.Format("Installing generated product key {0} status {1:X}", pkey.ToString(), status));
Logger.WriteLine(string.Format("Installing generated product key {0} status {1:X}", pkey, status));
if ((int)status < 0)
{
@ -74,7 +74,7 @@ namespace LibTSforge.Modifiers
if (pkey.Channel == "Volume:GVLK" && version == PSVersion.Win7) throw new NotSupportedException("Fake GVLK generation is not supported on Windows 7.");
VariableBag pkb = new VariableBag(version);
pkb.Blocks.AddRange(new CRCBlockModern[]
pkb.Blocks.AddRange(new[]
{
new CRCBlockModern
{
@ -169,7 +169,7 @@ namespace LibTSforge.Modifiers
uriMap.Data[pkeyId] = pkey.GetAlgoUri();
tks.SetEntry(uriMapName, "xml", uriMap.Serialize());
string skuMetaName = actId.ToString() + metSuffix;
string skuMetaName = actId + metSuffix;
TokenMeta skuMeta = tks.GetMetaEntry(skuMetaName);
foreach (string k in skuMeta.Data.Keys)

View File

@ -2,8 +2,8 @@ namespace LibTSforge.Modifiers
{
using System.Collections.Generic;
using System.Linq;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using PhysicalStore;
using SPP;
public static class GracePeriodReset
{

View File

@ -2,8 +2,8 @@ namespace LibTSforge.Modifiers
{
using System;
using System.IO;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using PhysicalStore;
using SPP;
public static class KMSHostCharge
{
@ -31,9 +31,9 @@ namespace LibTSforge.Modifiers
string key = string.Format("SPPSVC\\{0}", appId);
long ldapTimestamp = DateTime.Now.ToFileTime();
byte[] cmidGuids = new byte[] { };
byte[] reqCounts = new byte[] { };
byte[] kmsChargeData = new byte[] { };
byte[] cmidGuids = { };
byte[] reqCounts = { };
byte[] kmsChargeData = { };
BinaryWriter writer = new BinaryWriter(new MemoryStream());
@ -94,7 +94,7 @@ namespace LibTSforge.Modifiers
if (version != PSVersion.Vista)
{
VariableBag kmsCountData = new VariableBag(version);
kmsCountData.Blocks.AddRange(new CRCBlockModern[]
kmsCountData.Blocks.AddRange(new[]
{
new CRCBlockModern
{

View File

@ -2,9 +2,8 @@ namespace LibTSforge.Modifiers
{
using System.Collections.Generic;
using System.Linq;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using LibTSforge;
using PhysicalStore;
using SPP;
using System;
public static class KeyChangeLockDelete

View File

@ -2,8 +2,8 @@ namespace LibTSforge.Modifiers
{
using System.Collections.Generic;
using System.Linq;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using PhysicalStore;
using SPP;
public static class RearmReset
{

View File

@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
namespace LibTSforge.Modifiers
{
using PhysicalStore;
using SPP;
using System.IO;
using System;
public static class SetIIDParams
{
public static void SetParams(PSVersion version, bool production, Guid actId, PKeyAlgorithm algorithm, int group, int serial, ulong security)

View File

@ -1,8 +1,8 @@
namespace LibTSforge.Modifiers
{
using System.Linq;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using PhysicalStore;
using SPP;
public static class TamperedFlagsDelete
{
@ -14,7 +14,7 @@ namespace LibTSforge.Modifiers
using (IPhysicalStore store = SPPUtils.GetStore(version, production))
{
if (version == PSVersion.Vista)
if (version == PSVersion.Vista)
{
DeleteFlag(store, "6BE8425B-E3CF-4e86-A6AF-5863E3DCB606");
}

View File

@ -1,8 +1,8 @@
namespace LibTSforge.Modifiers
{
using System;
using LibTSforge.PhysicalStore;
using LibTSforge.SPP;
using PhysicalStore;
using SPP;
public static class UniqueIdDelete
{
@ -27,7 +27,6 @@ namespace LibTSforge.Modifiers
appId = SLApi.GetAppId(actId);
}
string instId = SLApi.GetInstallationID(actId);
Guid pkeyId = SLApi.GetInstalledPkeyID(actId);
SPPUtils.KillSPP(version);