Minor fixups
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
namespace LibTSforge.Activators
|
||||
{
|
||||
using System;
|
||||
using LibTSforge.PhysicalStore;
|
||||
using LibTSforge.SPP;
|
||||
using PhysicalStore;
|
||||
using SPP;
|
||||
|
||||
public static class AVMA4k
|
||||
{
|
||||
@ -42,24 +42,20 @@ namespace LibTSforge.Activators
|
||||
{
|
||||
string key = string.Format("SPPSVC\\{0}\\{1}", appId, actId);
|
||||
|
||||
ulong unknown = 0;
|
||||
ulong time1;
|
||||
ulong crcBindTime = (ulong)DateTime.UtcNow.ToFileTime();
|
||||
ulong timerTime;
|
||||
|
||||
ulong expiry = Constants.TimerMax;
|
||||
|
||||
long creationTime = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-CREATION-TIME$$").Data, 0);
|
||||
long tickCount = BitConverter.ToInt64(store.GetBlock("__##USERSEP##\\$$_RESERVED_$$\\NAMESPACE__", "__##USERSEP-RESERVED##__$$GLOBAL-TICKCOUNT-UPTIME$$").Data, 0);
|
||||
long deltaTime = BitConverter.ToInt64(store.GetBlock(key, "__##USERSEP-RESERVED##__$$UP-TIME-DELTA$$").Data, 0);
|
||||
|
||||
time1 = (ulong)(creationTime + tickCount + deltaTime);
|
||||
timerTime = crcBindTime / 10000;
|
||||
const ulong unknown = 0;
|
||||
ulong time1 = (ulong)(creationTime + tickCount + deltaTime);
|
||||
ulong crcBindTime = (ulong)DateTime.UtcNow.ToFileTime();
|
||||
ulong timerTime = crcBindTime / 10000;
|
||||
ulong expiry = Constants.TimerMax;
|
||||
expiry /= 10000;
|
||||
|
||||
VariableBag avmaBinding = new VariableBag(version);
|
||||
|
||||
avmaBinding.Blocks.AddRange(new CRCBlockModern[]
|
||||
avmaBinding.Blocks.AddRange(new[]
|
||||
{
|
||||
new CRCBlockModern
|
||||
{
|
||||
@ -97,7 +93,7 @@ namespace LibTSforge.Activators
|
||||
store.DeleteBlock(key, storeVal);
|
||||
store.DeleteBlock(key, timerVal);
|
||||
|
||||
store.AddBlocks(new PSBlock[]
|
||||
store.AddBlocks(new[]
|
||||
{
|
||||
new PSBlock
|
||||
{
|
||||
|
@ -2,8 +2,8 @@ namespace LibTSforge.Activators
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using LibTSforge.PhysicalStore;
|
||||
using LibTSforge.SPP;
|
||||
using PhysicalStore;
|
||||
using SPP;
|
||||
|
||||
public class KMS4k
|
||||
{
|
||||
@ -78,7 +78,7 @@ namespace LibTSforge.Activators
|
||||
writer.Write(Constants.UniversalHWIDBlock);
|
||||
byte[] kmsData = writer.GetBytes();
|
||||
|
||||
store.AddBlocks(new PSBlock[]
|
||||
store.AddBlocks(new[]
|
||||
{
|
||||
new PSBlock
|
||||
{
|
||||
@ -121,7 +121,7 @@ namespace LibTSforge.Activators
|
||||
|
||||
VariableBag kmsBinding = new VariableBag(version);
|
||||
|
||||
kmsBinding.Blocks.AddRange(new CRCBlockModern[]
|
||||
kmsBinding.Blocks.AddRange(new[]
|
||||
{
|
||||
new CRCBlockModern
|
||||
{
|
||||
@ -145,7 +145,7 @@ namespace LibTSforge.Activators
|
||||
|
||||
if (version == PSVersion.WinModern)
|
||||
{
|
||||
kmsBinding.Blocks.AddRange(new CRCBlockModern[]
|
||||
kmsBinding.Blocks.AddRange(new[]
|
||||
{
|
||||
new CRCBlockModern
|
||||
{
|
||||
@ -178,7 +178,7 @@ namespace LibTSforge.Activators
|
||||
store.DeleteBlock(key, storeVal);
|
||||
store.DeleteBlock(key, timerVal);
|
||||
|
||||
store.AddBlocks(new PSBlock[]
|
||||
store.AddBlocks(new[]
|
||||
{
|
||||
new PSBlock
|
||||
{
|
||||
|
@ -3,14 +3,13 @@ namespace LibTSforge.Activators
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using LibTSforge.Crypto;
|
||||
using LibTSforge.PhysicalStore;
|
||||
using LibTSforge.SPP;
|
||||
using Crypto;
|
||||
using PhysicalStore;
|
||||
using SPP;
|
||||
|
||||
public static class ZeroCID
|
||||
{
|
||||
public static void Deposit(Guid actId, string instId)
|
||||
private static void Deposit(Guid actId, string instId)
|
||||
{
|
||||
uint status = SLApi.DepositConfirmationID(actId, instId, Constants.ZeroCID);
|
||||
Logger.WriteLine(string.Format("Depositing fake CID status {0:X}", status));
|
||||
@ -98,7 +97,7 @@ namespace LibTSforge.Activators
|
||||
string uniqueId = Utils.DecodeString(pkeyData.Skip(0x120).Take(0x80).ToArray());
|
||||
string extPid = Utils.DecodeString(pkeyData.Skip(0x1A0).Take(0x80).ToArray());
|
||||
|
||||
uint group = 0;
|
||||
uint group;
|
||||
uint.TryParse(extPid.Split('-')[1], out group);
|
||||
|
||||
if (group == 0)
|
||||
@ -154,7 +153,7 @@ namespace LibTSforge.Activators
|
||||
store.DeleteBlock(key, hwidBlockName);
|
||||
store.DeleteBlock(key, pkeyInfoName);
|
||||
|
||||
store.AddBlocks(new PSBlock[] {
|
||||
store.AddBlocks(new[] {
|
||||
new PSBlock
|
||||
{
|
||||
Type = BlockType.NAMED,
|
||||
|
Reference in New Issue
Block a user