summaryrefslogtreecommitdiff
path: root/LibTSforge/Modifiers
diff options
context:
space:
mode:
authorWitherOrNot2025-04-07 22:19:19 +0000
committerGitHub2025-04-07 22:19:19 +0000
commit3a3ac06ca3715127475c7a2c7b3f0782e1690dfb (patch)
treef83328728b259bb6ec1e52979322377df1c7d627 /LibTSforge/Modifiers
parentbdd201061daf7492fb116b86a54cd349c01fbb0a (diff)
parent22bbb93e909154da94aee1b55e551038a3a37e6c (diff)
downloadTSforge-3a3ac06ca3715127475c7a2c7b3f0782e1690dfb.zip
Merge pull request #4 from massgravel/minor-fixups
Minor fixups
Diffstat (limited to 'LibTSforge/Modifiers')
-rw-r--r--LibTSforge/Modifiers/GenPKeyInstall.cs12
-rw-r--r--LibTSforge/Modifiers/GracePeriodReset.cs4
-rw-r--r--LibTSforge/Modifiers/KMSHostCharge.cs12
-rw-r--r--LibTSforge/Modifiers/KeyChangeLockDelete.cs5
-rw-r--r--LibTSforge/Modifiers/RearmReset.cs4
-rw-r--r--LibTSforge/Modifiers/SetIIDParams.cs13
-rw-r--r--LibTSforge/Modifiers/TamperedFlagsDelete.cs6
-rw-r--r--LibTSforge/Modifiers/UniqueIdDelete.cs5
8 files changed, 28 insertions, 33 deletions
diff --git a/LibTSforge/Modifiers/GenPKeyInstall.cs b/LibTSforge/Modifiers/GenPKeyInstall.cs
index 2e4c23d..a747952 100644
--- a/LibTSforge/Modifiers/GenPKeyInstall.cs
+++ b/LibTSforge/Modifiers/GenPKeyInstall.cs
@@ -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)
diff --git a/LibTSforge/Modifiers/GracePeriodReset.cs b/LibTSforge/Modifiers/GracePeriodReset.cs
index 059b1c5..3d0f6a3 100644
--- a/LibTSforge/Modifiers/GracePeriodReset.cs
+++ b/LibTSforge/Modifiers/GracePeriodReset.cs
@@ -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
{
diff --git a/LibTSforge/Modifiers/KMSHostCharge.cs b/LibTSforge/Modifiers/KMSHostCharge.cs
index 94f4dfd..153c700 100644
--- a/LibTSforge/Modifiers/KMSHostCharge.cs
+++ b/LibTSforge/Modifiers/KMSHostCharge.cs
@@ -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
{
diff --git a/LibTSforge/Modifiers/KeyChangeLockDelete.cs b/LibTSforge/Modifiers/KeyChangeLockDelete.cs
index 3883d3c..f6ec3de 100644
--- a/LibTSforge/Modifiers/KeyChangeLockDelete.cs
+++ b/LibTSforge/Modifiers/KeyChangeLockDelete.cs
@@ -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
diff --git a/LibTSforge/Modifiers/RearmReset.cs b/LibTSforge/Modifiers/RearmReset.cs
index 89a12f3..e909316 100644
--- a/LibTSforge/Modifiers/RearmReset.cs
+++ b/LibTSforge/Modifiers/RearmReset.cs
@@ -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
{
diff --git a/LibTSforge/Modifiers/SetIIDParams.cs b/LibTSforge/Modifiers/SetIIDParams.cs
index d7fa2c5..3d54b9d 100644
--- a/LibTSforge/Modifiers/SetIIDParams.cs
+++ b/LibTSforge/Modifiers/SetIIDParams.cs
@@ -1,13 +1,10 @@
-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)
diff --git a/LibTSforge/Modifiers/TamperedFlagsDelete.cs b/LibTSforge/Modifiers/TamperedFlagsDelete.cs
index 8369d4e..a9edc55 100644
--- a/LibTSforge/Modifiers/TamperedFlagsDelete.cs
+++ b/LibTSforge/Modifiers/TamperedFlagsDelete.cs
@@ -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");
}
diff --git a/LibTSforge/Modifiers/UniqueIdDelete.cs b/LibTSforge/Modifiers/UniqueIdDelete.cs
index d1851c4..b66954a 100644
--- a/LibTSforge/Modifiers/UniqueIdDelete.cs
+++ b/LibTSforge/Modifiers/UniqueIdDelete.cs
@@ -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);