Advertisement
Guest User

NetLimiterCrack

a guest
Nov 10th, 2023
2,651
0
192 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.69 KB | Source Code | 0 0
  1. using System;
  2. using System.Runtime.Serialization;
  3. using LicenseKeeper.Models;
  4. using NLInterop;
  5.  
  6. namespace NetLimiter.Service
  7. {
  8.     // Token: 0x0200003B RID: 59
  9.     [DataContract]
  10.     public class NLLicense
  11.     {
  12.         // Token: 0x17000088 RID: 136
  13.         // (get) Token: 0x06000214 RID: 532 RVA: 0x0000AE7A File Offset: 0x0000907A
  14.         // (set) Token: 0x06000215 RID: 533 RVA: 0x0000AE82 File Offset: 0x00009082
  15.         [DataMember]
  16.         public string EditionId { get; set; }
  17.  
  18.         // Token: 0x17000089 RID: 137
  19.         // (get) Token: 0x06000216 RID: 534 RVA: 0x0000AE8B File Offset: 0x0000908B
  20.         // (set) Token: 0x06000217 RID: 535 RVA: 0x0000AE93 File Offset: 0x00009093
  21.         [DataMember]
  22.         public int Quantity { get; set; }
  23.  
  24.         // Token: 0x1700008A RID: 138
  25.         // (get) Token: 0x06000218 RID: 536 RVA: 0x0000AE9C File Offset: 0x0000909C
  26.         // (set) Token: 0x06000219 RID: 537 RVA: 0x0000AEA4 File Offset: 0x000090A4
  27.         [DataMember]
  28.         public string LicenseType { get; set; }
  29.  
  30.         // Token: 0x1700008B RID: 139
  31.         // (get) Token: 0x0600021A RID: 538 RVA: 0x0000AEAD File Offset: 0x000090AD
  32.         // (set) Token: 0x0600021B RID: 539 RVA: 0x0000AEB5 File Offset: 0x000090B5
  33.         [DataMember]
  34.         public string PlanId { get; set; }
  35.  
  36.         // Token: 0x1700008C RID: 140
  37.         // (get) Token: 0x0600021C RID: 540 RVA: 0x0000AEBE File Offset: 0x000090BE
  38.         // (set) Token: 0x0600021D RID: 541 RVA: 0x0000AEC6 File Offset: 0x000090C6
  39.         [DataMember]
  40.         public bool IsRecurring { get; set; }
  41.  
  42.         // Token: 0x1700008D RID: 141
  43.         // (get) Token: 0x0600021E RID: 542 RVA: 0x0000AECF File Offset: 0x000090CF
  44.         // (set) Token: 0x0600021F RID: 543 RVA: 0x0000AED7 File Offset: 0x000090D7
  45.         [DataMember]
  46.         public DateTime Expiration { get; set; }
  47.  
  48.         // Token: 0x1700008E RID: 142
  49.         // (get) Token: 0x06000220 RID: 544 RVA: 0x0000AEE0 File Offset: 0x000090E0
  50.         // (set) Token: 0x06000221 RID: 545 RVA: 0x0000AEE8 File Offset: 0x000090E8
  51.         [DataMember]
  52.         public bool IsTestingVersion { get; set; }
  53.  
  54.         // Token: 0x1700008F RID: 143
  55.         // (get) Token: 0x06000222 RID: 546 RVA: 0x0000AEF1 File Offset: 0x000090F1
  56.         // (set) Token: 0x06000223 RID: 547 RVA: 0x0000AEF9 File Offset: 0x000090F9
  57.         [DataMember]
  58.         public bool IsCancelled { get; set; }
  59.  
  60.         // Token: 0x17000090 RID: 144
  61.         // (get) Token: 0x06000224 RID: 548 RVA: 0x0000AF02 File Offset: 0x00009102
  62.         // (set) Token: 0x06000225 RID: 549 RVA: 0x0000AF0A File Offset: 0x0000910A
  63.         [DataMember]
  64.         public bool IsRegistered { get; set; }
  65.  
  66.         // Token: 0x17000091 RID: 145
  67.         // (get) Token: 0x06000226 RID: 550 RVA: 0x0000AF13 File Offset: 0x00009113
  68.         // (set) Token: 0x06000227 RID: 551 RVA: 0x0000AF1B File Offset: 0x0000911B
  69.         [DataMember]
  70.         public string RegName { get; set; }
  71.  
  72.         // Token: 0x17000092 RID: 146
  73.         // (get) Token: 0x06000228 RID: 552 RVA: 0x0000AF24 File Offset: 0x00009124
  74.         // (set) Token: 0x06000229 RID: 553 RVA: 0x0000AF2C File Offset: 0x0000912C
  75.         [DataMember]
  76.         public string RegCodeHash { get; set; }
  77.  
  78.         // Token: 0x17000093 RID: 147
  79.         // (get) Token: 0x0600022A RID: 554 RVA: 0x0000AF35 File Offset: 0x00009135
  80.         // (set) Token: 0x0600022B RID: 555 RVA: 0x0000AF3D File Offset: 0x0000913D
  81.         [DataMember]
  82.         public SupportedFeatures SupporetedFeatures { get; set; }
  83.  
  84.         // Token: 0x17000094 RID: 148
  85.         // (get) Token: 0x0600022C RID: 556
  86.         public bool IsExpired
  87.         {
  88.             get
  89.             {
  90.                 return false;
  91.             }
  92.         }
  93.  
  94.         // Token: 0x17000095 RID: 149
  95.         // (get) Token: 0x0600022D RID: 557
  96.         public bool IsExtendedExpired
  97.         {
  98.             get
  99.             {
  100.                 if (!this.IsRegistered)
  101.                 {
  102.                     return this.IsExpired;
  103.                 }
  104.                 return this.ExtendedDaysLeft == 999999;
  105.             }
  106.         }
  107.  
  108.         // Token: 0x17000096 RID: 150
  109.         // (get) Token: 0x0600022E RID: 558
  110.         public int DaysLeftRaw
  111.         {
  112.             get
  113.             {
  114.                 return 999999;
  115.             }
  116.         }
  117.  
  118.         // Token: 0x17000097 RID: 151
  119.         // (get) Token: 0x0600022F RID: 559
  120.         public int DaysLeft
  121.         {
  122.             get
  123.             {
  124.                 return 999999;
  125.             }
  126.         }
  127.  
  128.         // Token: 0x17000098 RID: 152
  129.         // (get) Token: 0x06000230 RID: 560
  130.         public DateTime ExtendedExpiration
  131.         {
  132.             get
  133.             {
  134.                 if (!this.IsRegistered || this.IsTestingVersion)
  135.                 {
  136.                     return this.Expiration;
  137.                 }
  138.                 return this.Expiration.AddDays(999999.0);
  139.             }
  140.         }
  141.  
  142.         // Token: 0x17000099 RID: 153
  143.         // (get) Token: 0x06000231 RID: 561
  144.         public int ExtendedDaysLeft
  145.         {
  146.             get
  147.             {
  148.                 return 999999;
  149.             }
  150.         }
  151.  
  152.         // Token: 0x06000232 RID: 562
  153.         public NLLicense()
  154.         {
  155.             this.Expiration = DateTime.MaxValue;
  156.             this.EditionId = "pro";
  157.             this.Quantity = 1;
  158.             this.IsRegistered = true;
  159.             this.IsRecurring = true;
  160.             this.SupporetedFeatures = new SupportedFeatures(this.EditionId);
  161.             this.InitTestingVersion();
  162.         }
  163.  
  164.         // Token: 0x06000233 RID: 563
  165.         public NLLicense(DateTime expiration)
  166.             : this()
  167.         {
  168.             this.Expiration = DateTime.MaxValue;
  169.             this.InitTestingVersion();
  170.         }
  171.  
  172.         // Token: 0x06000234 RID: 564 RVA: 0x0000B08C File Offset: 0x0000928C
  173.         public NLLicense(RegData regData)
  174.         {
  175.             this.Expiration = regData.EndTime;
  176.             this.PlanId = regData.PlanId;
  177.             this.EditionId = regData.EditionId;
  178.             this.Quantity = Math.Max(1, regData.Quantity);
  179.             this.LicenseType = regData.LicenseId;
  180.             this.IsRegistered = true;
  181.             this.IsCancelled = regData.IsCancelled;
  182.             this.SupporetedFeatures = new SupportedFeatures(this.EditionId);
  183.             this.RegName = regData.RegName;
  184.             this.RegCodeHash = regData.RegCodeHash;
  185.             this.IsRecurring = regData.IsRecurring;
  186.             this.InitTestingVersion();
  187.         }
  188.  
  189.         // Token: 0x06000235 RID: 565
  190.         private void InitTestingVersion()
  191.         {
  192.             this.IsTestingVersion = false;
  193.             if (this.IsTestingVersion && this.Expiration < NLEnv.TestingExpiration)
  194.             {
  195.                 this.Expiration = DateTime.MaxValue;
  196.             }
  197.         }
  198.  
  199.         // Token: 0x040000FA RID: 250
  200.         public const int ExtendedPeriodDays = 14;
  201.     }
  202. }
  203.  
Tags: NetLimiter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement