Was genau ist das?

    Was genau ist das?

    Spoiler anzeigen

    C# - CSharp

    1. using System;
    2. using BANANA;
    3. using Microsoft.VisualBasic;
    4. namespace PAWNit.Licensing
    5. {
    6. public class TrialMaker
    7. {
    8. public TrialMaker(string SoftwareName, string RegFilePath, string HideFilePath, string Text, int TrialDays, int TrialRunTimes, string Identifier, string LiteIdentifier)
    9. {
    10. this.HBRZOLKOABCXSRUIGZOCT = SoftwareName;
    11. this.BZZORTXTCNYFDURYALOHFF = Identifier;
    12. this.NHVGVPGYGOYFLHWMGGGKEF = LiteIdentifier;
    13. this.RHVJJQZSCTEYOBUIDHGVOF();
    14. this.GRDSURTEDADSPULDJECNKN = TrialDays;
    15. this.HUJYDZVVKXABYSKJSKUUNY = TrialRunTimes;
    16. this.KPOOVNQAMHHOLDZBSEROLV = RegFilePath;
    17. this.LNQNOOIQAKMSPOVWFPJHPF = HideFilePath;
    18. this.SEAXZMVQAPGGOQPJFCQMJT = Text;
    19. }
    20. private void RHVJJQZSCTEYOBUIDHGVOF()
    21. {
    22. IJLYBJLZLHHHLXNMEGSFND.PSBOXDGLCKTJYPUXSMUPTO = false;
    23. IJLYBJLZLHHHLXNMEGSFND.DLCWAWOCPTYSQQFDOAZYKJ = true;
    24. IJLYBJLZLHHHLXNMEGSFND.GTDPSHPOOLGWXLZVQJRTJI = false;
    25. IJLYBJLZLHHHLXNMEGSFND.NATKIDQEOKEKNIKPBIOUZG = true;
    26. IJLYBJLZLHHHLXNMEGSFND.KKCOPNEDZWZWRGMRXCRQLH = true;
    27. IJLYBJLZLHHHLXNMEGSFND.HBTAPAUPIDUDWHEMCZABKE = false;
    28. IJLYBJLZLHHHLXNMEGSFND.SUIWBCEKMPEYMSKQEBQPY = true;
    29. IJLYBJLZLHHHLXNMEGSFND.APLERGRVQKLTKCEQHBSNAO = false;
    30. IJLYBJLZLHHHLXNMEGSFND.GQTASWHVRRCMRDEELXREI = false;
    31. this.ZVYFXXAQYAEAPSTCYCIVGI();
    32. this.GTBRQLBGQZSPGFSOZJWTTG();
    33. }
    34. private void ZVYFXXAQYAEAPSTCYCIVGI()
    35. {
    36. this.TLOFWJJFZRSHRGJNTTUNNC = Encryption.Boring(Encryption.InverseByBase(IJLYBJLZLHHHLXNMEGSFND.ILVKOAWNKCRAUWYJUJOMW(this.HBRZOLKOABCXSRUIGZOCT), 10));
    37. }
    38. private void GTBRQLBGQZSPGFSOZJWTTG()
    39. {
    40. this.MAENPPMBIOCLKDGKAXIKNI = Encryption.MakePassword(this.TLOFWJJFZRSHRGJNTTUNNC, this.BZZORTXTCNYFDURYALOHFF);
    41. this.UFRFXULFGIJHILFJPMPLEV = Encryption.MakePassword(this.TLOFWJJFZRSHRGJNTTUNNC, this.NHVGVPGYGOYFLHWMGGGKEF);
    42. }
    43. public LicenseInformation ShowDialog()
    44. {
    45. if (this.QYBNGOTACBMHKTHQAJWVXH() == 1)
    46. {
    47. return new LicenseInformation(LicenseInformation.RunTypes.Full, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    48. }
    49. if (this.QYBNGOTACBMHKTHQAJWVXH() == 2)
    50. {
    51. return new LicenseInformation(LicenseInformation.RunTypes.Lite, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    52. }
    53. LicensingDialog licensingDialog = new LicensingDialog(this.TLOFWJJFZRSHRGJNTTUNNC, this.MAENPPMBIOCLKDGKAXIKNI, this.UFRFXULFGIJHILFJPMPLEV, this.THWXWSVVSDPXAPEXLJBNBE(), this.HUJYDZVVKXABYSKJSKUUNY, this.SEAXZMVQAPGGOQPJFCQMJT);
    54. this.PUIYWMBNSZTBWGLSTGRDEC();
    55. licensingDialog.ShowDialog();
    56. this.WRNDTGYTPWPAQBBCISTWB = licensingDialog.eMail;
    57. if (licensingDialog.LicenseResult == 1)
    58. {
    59. this.XDJZIWWOGTZMPOOFSDOMMF(LicenseInformation.RunTypes.Full);
    60. return new LicenseInformation(LicenseInformation.RunTypes.Full, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    61. }
    62. if (licensingDialog.LicenseResult == 2)
    63. {
    64. this.XDJZIWWOGTZMPOOFSDOMMF(LicenseInformation.RunTypes.Lite);
    65. return new LicenseInformation(LicenseInformation.RunTypes.Lite, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    66. }
    67. if (licensingDialog.LicenseResult == -1)
    68. {
    69. return new LicenseInformation(LicenseInformation.RunTypes.Trial, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    70. }
    71. if (licensingDialog.LicenseResult == -2)
    72. {
    73. return new LicenseInformation(LicenseInformation.RunTypes.None, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    74. }
    75. return new LicenseInformation(LicenseInformation.RunTypes.Expired, this.WRNDTGYTPWPAQBBCISTWB, this.TLOFWJJFZRSHRGJNTTUNNC);
    76. }
    77. public void EditTrial(int Days, int Runed)
    78. {
    79. this.GRDSURTEDADSPULDJECNKN = Days;
    80. this.HUJYDZVVKXABYSKJSKUUNY = Runed;
    81. this.PUIYWMBNSZTBWGLSTGRDEC();
    82. XOBZGGODHXPHLOFEGCUCKN.RHIRXRRKWZPMTBRWVFAEBK(this.KPOOVNQAMHHOLDZBSEROLV);
    83. }
    84. public void ResetLicense()
    85. {
    86. XOBZGGODHXPHLOFEGCUCKN.RHIRXRRKWZPMTBRWVFAEBK(this.KPOOVNQAMHHOLDZBSEROLV);
    87. }
    88. private void XDJZIWWOGTZMPOOFSDOMMF(LicenseInformation.RunTypes VDMVOZTGBFWACAALUNJSFD)
    89. {
    90. if (VDMVOZTGBFWACAALUNJSFD == LicenseInformation.RunTypes.Full)
    91. {
    92. XOBZGGODHXPHLOFEGCUCKN.UZJQFGUFOBMLNVFQRBVAKG(this.KPOOVNQAMHHOLDZBSEROLV, string.Format("{0};{1}", this.MAENPPMBIOCLKDGKAXIKNI, this.WRNDTGYTPWPAQBBCISTWB));
    93. return;
    94. }
    95. XOBZGGODHXPHLOFEGCUCKN.UZJQFGUFOBMLNVFQRBVAKG(this.KPOOVNQAMHHOLDZBSEROLV, string.Format("{0};{1}", this.UFRFXULFGIJHILFJPMPLEV, this.WRNDTGYTPWPAQBBCISTWB));
    96. }
    97. private int QYBNGOTACBMHKTHQAJWVXH()
    98. {
    99. string text = XOBZGGODHXPHLOFEGCUCKN.VORGSCRFJYXEPUHZYLYBGE(this.KPOOVNQAMHHOLDZBSEROLV);
    100. if (text.Length <= 0)
    101. {
    102. return 0;
    103. }
    104. string[] array = text.Split(new char[]
    105. {
    106. ';'
    107. });
    108. this.WRNDTGYTPWPAQBBCISTWB = array[1];
    109. if (this.MAENPPMBIOCLKDGKAXIKNI == array[0])
    110. {
    111. return 1;
    112. }
    113. if (this.UFRFXULFGIJHILFJPMPLEV == array[0])
    114. {
    115. return 2;
    116. }
    117. return 0;
    118. }
    119. private int THWXWSVVSDPXAPEXLJBNBE()
    120. {
    121. if (!XOBZGGODHXPHLOFEGCUCKN.MNSOWVVPXQGBQBMYBMLBRL(this.LNQNOOIQAKMSPOVWFPJHPF))
    122. {
    123. this.PUIYWMBNSZTBWGLSTGRDEC();
    124. return this.GRDSURTEDADSPULDJECNKN;
    125. }
    126. return this.ZWBWHOKEYWKSGGTQZPHSOV();
    127. }
    128. private void PUIYWMBNSZTBWGLSTGRDEC()
    129. {
    130. string kXJBBSHRUQSPFIKQINZVIG = string.Format("{0};{1};{2};{3}", new object[]
    131. {
    132. DateTime.Now.Ticks,
    133. this.GRDSURTEDADSPULDJECNKN,
    134. this.HUJYDZVVKXABYSKJSKUUNY,
    135. this.TLOFWJJFZRSHRGJNTTUNNC
    136. });
    137. XOBZGGODHXPHLOFEGCUCKN.UZJQFGUFOBMLNVFQRBVAKG(this.LNQNOOIQAKMSPOVWFPJHPF, kXJBBSHRUQSPFIKQINZVIG);
    138. }
    139. // Token: 0x06000045 RID: 69 RVA: 0x000039D4 File Offset: 0x00001BD4
    140. private int ZWBWHOKEYWKSGGTQZPHSOV()
    141. {
    142. string[] array = XOBZGGODHXPHLOFEGCUCKN.VORGSCRFJYXEPUHZYLYBGE(this.LNQNOOIQAKMSPOVWFPJHPF).Split(new char[]
    143. {
    144. ';'
    145. });
    146. if (this.TLOFWJJFZRSHRGJNTTUNNC == array[3])
    147. {
    148. int num = Convert.ToInt32(array[1]);
    149. if (num <= 0)
    150. {
    151. this.HUJYDZVVKXABYSKJSKUUNY = 0;
    152. this.GRDSURTEDADSPULDJECNKN = 0;
    153. return 0;
    154. }
    155. DateTime dateTime = new DateTime(Convert.ToInt64(array[0]));
    156. long value = DateAndTime.DateDiff(DateInterval.Day, dateTime.Date, DateTime.Now.Date, FirstDayOfWeek.Saturday, FirstWeekOfYear.FirstFullWeek);
    157. num = Convert.ToInt32(array[1]);
    158. this.HUJYDZVVKXABYSKJSKUUNY = Convert.ToInt32(array[2]);
    159. this.HUJYDZVVKXABYSKJSKUUNY--;
    160. value = Math.Abs(value);
    161. this.GRDSURTEDADSPULDJECNKN = num - Convert.ToInt32(value);
    162. }
    163. return this.GRDSURTEDADSPULDJECNKN;
    164. }
    165. public string RegFilePath
    166. {
    167. get
    168. {
    169. return this.KPOOVNQAMHHOLDZBSEROLV;
    170. }
    171. set
    172. {
    173. this.KPOOVNQAMHHOLDZBSEROLV = value;
    174. }
    175. }
    176. public string HideFilePath
    177. {
    178. get
    179. {
    180. return this.LNQNOOIQAKMSPOVWFPJHPF;
    181. }
    182. set
    183. {
    184. this.LNQNOOIQAKMSPOVWFPJHPF = value;
    185. }
    186. }
    187. public int TrialPeriodDays
    188. {
    189. get
    190. {
    191. return this.GRDSURTEDADSPULDJECNKN;
    192. }
    193. }
    194. public byte[] TripleDESKey
    195. {
    196. get
    197. {
    198. return XOBZGGODHXPHLOFEGCUCKN.QKSLTSGHZKETWCVMKSIVKO;
    199. }
    200. set
    201. {
    202. XOBZGGODHXPHLOFEGCUCKN.QKSLTSGHZKETWCVMKSIVKO = value;
    203. }
    204. }
    205. public bool UseProcessorID
    206. {
    207. get
    208. {
    209. return IJLYBJLZLHHHLXNMEGSFND.SUIWBCEKMPEYMSKQEBQPY;
    210. }
    211. set
    212. {
    213. IJLYBJLZLHHHLXNMEGSFND.SUIWBCEKMPEYMSKQEBQPY = value;
    214. }
    215. }
    216. public bool UseBaseBoardProduct
    217. {
    218. get
    219. {
    220. return IJLYBJLZLHHHLXNMEGSFND.DLCWAWOCPTYSQQFDOAZYKJ;
    221. }
    222. set
    223. {
    224. IJLYBJLZLHHHLXNMEGSFND.DLCWAWOCPTYSQQFDOAZYKJ = value;
    225. }
    226. }
    227. public bool UseBaseBoardManufacturer
    228. {
    229. get
    230. {
    231. return IJLYBJLZLHHHLXNMEGSFND.GTDPSHPOOLGWXLZVQJRTJI;
    232. }
    233. set
    234. {
    235. IJLYBJLZLHHHLXNMEGSFND.GTDPSHPOOLGWXLZVQJRTJI = value;
    236. }
    237. }
    238. public bool UseDiskDriveSignature
    239. {
    240. get
    241. {
    242. return IJLYBJLZLHHHLXNMEGSFND.KKCOPNEDZWZWRGMRXCRQLH;
    243. }
    244. set
    245. {
    246. IJLYBJLZLHHHLXNMEGSFND.KKCOPNEDZWZWRGMRXCRQLH = value;
    247. }
    248. }
    249. public bool UseVideoControllerCaption
    250. {
    251. get
    252. {
    253. return IJLYBJLZLHHHLXNMEGSFND.APLERGRVQKLTKCEQHBSNAO;
    254. }
    255. set
    256. {
    257. IJLYBJLZLHHHLXNMEGSFND.APLERGRVQKLTKCEQHBSNAO = value;
    258. }
    259. }
    260. public bool UsePhysicalMediaSerialNumber
    261. {
    262. get
    263. {
    264. return IJLYBJLZLHHHLXNMEGSFND.HBTAPAUPIDUDWHEMCZABKE;
    265. }
    266. set
    267. {
    268. IJLYBJLZLHHHLXNMEGSFND.HBTAPAUPIDUDWHEMCZABKE = value;
    269. }
    270. }
    271. public bool UseBiosVersion
    272. {
    273. get
    274. {
    275. return IJLYBJLZLHHHLXNMEGSFND.NATKIDQEOKEKNIKPBIOUZG;
    276. }
    277. set
    278. {
    279. IJLYBJLZLHHHLXNMEGSFND.NATKIDQEOKEKNIKPBIOUZG = value;
    280. }
    281. }
    282. public bool UseBiosManufacturer
    283. {
    284. get
    285. {
    286. return IJLYBJLZLHHHLXNMEGSFND.GTDPSHPOOLGWXLZVQJRTJI;
    287. }
    288. set
    289. {
    290. IJLYBJLZLHHHLXNMEGSFND.GTDPSHPOOLGWXLZVQJRTJI = value;
    291. }
    292. }
    293. public bool UseWindowsSerialNumber
    294. {
    295. get
    296. {
    297. return IJLYBJLZLHHHLXNMEGSFND.GQTASWHVRRCMRDEELXREI;
    298. }
    299. set
    300. {
    301. IJLYBJLZLHHHLXNMEGSFND.GQTASWHVRRCMRDEELXREI = value;
    302. }
    303. }
    304. private string TLOFWJJFZRSHRGJNTTUNNC;
    305. private string MAENPPMBIOCLKDGKAXIKNI;
    306. private string UFRFXULFGIJHILFJPMPLEV;
    307. private string HBRZOLKOABCXSRUIGZOCT;
    308. private string KPOOVNQAMHHOLDZBSEROLV;
    309. private string LNQNOOIQAKMSPOVWFPJHPF;
    310. private int GRDSURTEDADSPULDJECNKN;
    311. private int HUJYDZVVKXABYSKJSKUUNY;
    312. private string SEAXZMVQAPGGOQPJFCQMJT;
    313. private string BZZORTXTCNYFDURYALOHFF;
    314. private string NHVGVPGYGOYFLHWMGGGKEF;
    315. private string WRNDTGYTPWPAQBBCISTWB;
    316. }
    317. }


    Kann mir jemand was zu diesem Banana sagen ?

    // BANANA
    //
    // Typen:
    //
    // DOENODGHZSRMOOVHKZUPC
    // IJLYBJLZLHHHLXNMEGSFND
    // MDDOWKDTTCNPOJMFAJIHMI
    // XOBZGGODHXPHLOFEGCUCKN

    C# - CSharp

    1. using System;
    2. using System.CodeDom.Compiler;
    3. using System.Configuration;
    4. using System.Runtime.CompilerServices;
    5. namespace BANANA
    6. {
    7. // Token: 0x0200000C RID: 12
    8. [CompilerGenerated, GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    9. internal sealed class DOENODGHZSRMOOVHKZUPC : ApplicationSettingsBase
    10. {
    11. // Token: 0x06000063 RID: 99 RVA: 0x0000236E File Offset: 0x0000056E
    12. public static DOENODGHZSRMOOVHKZUPC NDJWHEJNIZCOFRYNHPLFT()
    13. {
    14. return DOENODGHZSRMOOVHKZUPC.CZMAYAKWNRYTBQAIZAFMOK;
    15. }
    16. // Token: 0x0400004C RID: 76
    17. private static DOENODGHZSRMOOVHKZUPC CZMAYAKWNRYTBQAIZAFMOK = (DOENODGHZSRMOOVHKZUPC)SettingsBase.Synchronized(new DOENODGHZSRMOOVHKZUPC());
    18. }
    19. }

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Chaya_“ ()

    Benutze doch bitte einen Hide-Tag!

    der Namespace BANANA hat im obigen Code nichts zu bedeuten. Er wurde wohl fälschlicherweise gesetzt.
    Hier mal BANANA Code refactored:

    C# - CSharp

    1. using System;
    2. using System.CodeDom.Compiler;
    3. using System.Configuration;
    4. using System.Runtime.CompilerServices;
    5. namespace BANANA
    6. {
    7. // Token: 0x0200000C RID: 12
    8. [CompilerGenerated, GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    9. internal sealed class AppSettings : ApplicationSettingsBase
    10. {
    11. // Token: 0x06000063 RID: 99 RVA: 0x0000236E File Offset: 0x0000056E
    12. public static AppSettings getInstance()
    13. {
    14. return AppSettings.Instance;
    15. }
    16. // Token: 0x0400004C RID: 76
    17. private static AppSettings Instance = (AppSettings)SettingsBase.Synchronized(new AppSettings());
    18. }
    19. }


    Es handelt sich um ein einfaches Singleton Pattern, das von ApplicationSettingsBase erbt. Man benutzt Singleton wenn ein Programmierer möchte, dass zur ganzen Laufzeit des Programms nur ein Objekt existiert.
    Bei dem Singleton handelt es sich um einen Speicherort für Einstellungen, die man programmweit abgerufen und setzen kann.

    MSDN sagt: Acts as a base class for deriving concrete wrapper classes to implement the application settings feature in Window Forms applications.

    Ähnliches findest du überall im Netz:
    github.com/pdfforge/PDFCreator…ties/Settings.Designer.cs
    github.com/Huntereb/NTR-Debugg…nt/Properties/Settings.cs
    searchcode.com/codesearch/view/27835332/

    Die Klasse TrialMaker ist wohl ein TrailMaker... Der Konstruktor sagt ja schon eine Menge aus:

    C# - CSharp

    1. TrialMaker(string SoftwareName, string RegFilePath, string HideFilePath, string Text, int TrialDays, int TrialRunTimes, string Identifier, string LiteIdentifier)


    Ich habe dir die Klasse auch mal refactored:
    Spoiler anzeigen

    C# - CSharp

    1. using System;
    2. using BANANA;
    3. using Microsoft.VisualBasic;
    4. namespace PAWNit.Licensing
    5. {
    6. public class TrialMaker
    7. {
    8. public TrialMaker(string SoftwareName, string RegFilePath, string HideFilePath, string Text, int TrialDays, int TrialRunTimes, string Identifier, string LiteIdentifier)
    9. {
    10. this.m_softwareName = SoftwareName;
    11. this.m_identifier = Identifier;
    12. this.m_liteIdentifier = LiteIdentifier;
    13. this.init();
    14. this.m_trailDays = TrialDays;
    15. this.m_trialRunTimes = TrialRunTimes;
    16. this.m_RegFilePath = RegFilePath;
    17. this.m_HideFilePath = HideFilePath;
    18. this.m_Text = Text;
    19. }
    20. private void init()
    21. {
    22. Config.PSBOXDGLCKTJYPUXSMUPTO = false;
    23. Config.UseBaseBoardProduct = true;
    24. Config.UseBiosManufacturer = false;
    25. Config.UseBiosVersion = true;
    26. Config.UseDiskDriveSignature = true;
    27. Config.UsePhysicalMediaSerialNumber = false;
    28. Config.UseProcessorID = true;
    29. Config.UseVideoControllerCaption = false;
    30. Config.UseWindowsSerialNumber = false;
    31. this.ZVYFXXAQYAEAPSTCYCIVGI();
    32. this.GTBRQLBGQZSPGFSOZJWTTG();
    33. }
    34. private void ZVYFXXAQYAEAPSTCYCIVGI()
    35. {
    36. this.m_enctyptedSoftwareName = Encryption.Boring(Encryption.InverseByBase(Config.ILVKOAWNKCRAUWYJUJOMW(this.m_softwareName), 10));
    37. }
    38. private void GTBRQLBGQZSPGFSOZJWTTG()
    39. {
    40. this.Password_1 = Encryption.MakePassword(this.m_enctyptedSoftwareName, this.m_identifier);
    41. this.Password_2 = Encryption.MakePassword(this.m_enctyptedSoftwareName, this.m_liteIdentifier);
    42. }
    43. public LicenseInformation ShowDialog()
    44. {
    45. if (this.checkPassword() == 1)
    46. {
    47. return new LicenseInformation(LicenseInformation.RunTypes.Full, this.m_licensEmail, this.m_enctyptedSoftwareName);
    48. }
    49. if (this.checkPassword() == 2)
    50. {
    51. return new LicenseInformation(LicenseInformation.RunTypes.Lite, this.m_licensEmail, this.m_enctyptedSoftwareName);
    52. }
    53. LicensingDialog licensingDialog = new LicensingDialog(this.m_enctyptedSoftwareName, this.Password_1, this.Password_2, this.trailDays(), this.m_trialRunTimes, this.m_Text);
    54. this.writeHideFilePath();
    55. licensingDialog.ShowDialog();
    56. this.m_licensEmail = licensingDialog.eMail;
    57. if (licensingDialog.LicenseResult == 1)
    58. {
    59. this.writeLicenseInformationRunType(LicenseInformation.RunTypes.Full);
    60. return new LicenseInformation(LicenseInformation.RunTypes.Full, this.m_licensEmail, this.m_enctyptedSoftwareName);
    61. }
    62. if (licensingDialog.LicenseResult == 2)
    63. {
    64. this.writeLicenseInformationRunType(LicenseInformation.RunTypes.Lite);
    65. return new LicenseInformation(LicenseInformation.RunTypes.Lite, this.m_licensEmail, this.m_enctyptedSoftwareName);
    66. }
    67. if (licensingDialog.LicenseResult == -1)
    68. {
    69. return new LicenseInformation(LicenseInformation.RunTypes.Trial, this.m_licensEmail, this.m_enctyptedSoftwareName);
    70. }
    71. if (licensingDialog.LicenseResult == -2)
    72. {
    73. return new LicenseInformation(LicenseInformation.RunTypes.None, this.m_licensEmail, this.m_enctyptedSoftwareName);
    74. }
    75. return new LicenseInformation(LicenseInformation.RunTypes.Expired, this.m_licensEmail, this.m_enctyptedSoftwareName);
    76. }
    77. public void EditTrial(int Days, int Runed)
    78. {
    79. this.m_trailDays = Days;
    80. this.m_trialRunTimes = Runed;
    81. this.writeHideFilePath();
    82. TripleDESKey.removeFile(this.m_RegFilePath);
    83. }
    84. public void ResetLicense()
    85. {
    86. TripleDESKey.removeFile(this.m_RegFilePath);
    87. }
    88. private void writeLicenseInformationRunType(LicenseInformation.RunTypes runtype)
    89. {
    90. if (runtype == LicenseInformation.RunTypes.Full)
    91. {
    92. TripleDESKey.writeFile(this.m_RegFilePath, string.Format("{0};{1}", this.Password_1, this.RegistryValue));
    93. return;
    94. }
    95. TripleDESKey.writeFile(this.m_RegFilePath, string.Format("{0};{1}", this.Password_2, this.RegistryValue));
    96. }
    97. private int checkPassword()
    98. {
    99. string text = TripleDESKey.readFile(this.m_RegFilePath);
    100. if (text.Length <= 0)
    101. {
    102. return 0;
    103. }
    104. string[] array = text.Split(new char[]
    105. {
    106. ';'
    107. });
    108. this.RegistryValue = array[1];
    109. if (this.Password_1 == array[0])
    110. {
    111. return 1;
    112. }
    113. if (this.Password_2 == array[0])
    114. {
    115. return 2;
    116. }
    117. return 0;
    118. }
    119. private int trailDays()
    120. {
    121. if (!TripleDESKey.fileExists(this.m_HideFilePath))
    122. {
    123. this.writeHideFilePath();
    124. return this.m_trailDays;
    125. }
    126. return this.getTrailDays();
    127. }
    128. private void writeHideFilePath()
    129. {
    130. string text = string.Format("{0};{1};{2};{3}", new object[]
    131. {
    132. DateTime.Now.Ticks,
    133. this.m_trailDays,
    134. this.m_trialRunTimes,
    135. this.m_enctyptedSoftwareName
    136. });
    137. TripleDESKey.writeFile(this.m_HideFilePath, text);
    138. }
    139. // Token: 0x06000045 RID: 69 RVA: 0x000039D4 File Offset: 0x00001BD4
    140. private int getTrailDays()
    141. {
    142. string[] array = TripleDESKey.readFile(this.m_HideFilePath).Split(new char[]
    143. {
    144. ';'
    145. });
    146. if (this.m_enctyptedSoftwareName == array[3])
    147. {
    148. int num = Convert.ToInt32(array[1]);
    149. if (num <= 0)
    150. {
    151. this.m_trialRunTimes = 0;
    152. this.m_trailDays = 0;
    153. return 0;
    154. }
    155. DateTime dateTime = new DateTime(Convert.ToInt64(array[0]));
    156. long value = DateAndTime.DateDiff(DateInterval.Day, dateTime.Date, DateTime.Now.Date, FirstDayOfWeek.Saturday, FirstWeekOfYear.FirstFullWeek);
    157. num = Convert.ToInt32(array[1]);
    158. this.m_trialRunTimes = Convert.ToInt32(array[2]);
    159. this.m_trialRunTimes--;
    160. value = Math.Abs(value);
    161. this.m_trailDays = num - Convert.ToInt32(value);
    162. }
    163. return this.m_trailDays;
    164. }
    165. public string RegFilePath
    166. {
    167. get
    168. {
    169. return this.m_RegFilePath;
    170. }
    171. set
    172. {
    173. this.m_RegFilePath = value;
    174. }
    175. }
    176. public string HideFilePath
    177. {
    178. get
    179. {
    180. return this.m_HideFilePath;
    181. }
    182. set
    183. {
    184. this.m_HideFilePath = value;
    185. }
    186. }
    187. public int TrialPeriodDays
    188. {
    189. get
    190. {
    191. return this.m_trailDays;
    192. }
    193. }
    194. public byte[] TripleDESKey
    195. {
    196. get
    197. {
    198. return TripleDESKey.byteArray;
    199. }
    200. set
    201. {
    202. TripleDESKey.byteArray = value;
    203. }
    204. }
    205. public bool UseProcessorID
    206. {
    207. get
    208. {
    209. return Config.UseProcessorID;
    210. }
    211. set
    212. {
    213. Config.UseProcessorID = value;
    214. }
    215. }
    216. public bool UseBaseBoardProduct
    217. {
    218. get
    219. {
    220. return Config.UseBaseBoardProduct;
    221. }
    222. set
    223. {
    224. Config.UseBaseBoardProduct = value;
    225. }
    226. }
    227. public bool UseBaseBoardManufacturer
    228. {
    229. get
    230. {
    231. return Config.UseBiosManufacturer;
    232. }
    233. set
    234. {
    235. Config.UseBiosManufacturer = value;
    236. }
    237. }
    238. public bool UseDiskDriveSignature
    239. {
    240. get
    241. {
    242. return Config.UseDiskDriveSignature;
    243. }
    244. set
    245. {
    246. Config.UseDiskDriveSignature = value;
    247. }
    248. }
    249. public bool UseVideoControllerCaption
    250. {
    251. get
    252. {
    253. return Config.UseVideoControllerCaption;
    254. }
    255. set
    256. {
    257. Config.UseVideoControllerCaption = value;
    258. }
    259. }
    260. public bool UsePhysicalMediaSerialNumber
    261. {
    262. get
    263. {
    264. return Config.UsePhysicalMediaSerialNumber;
    265. }
    266. set
    267. {
    268. Config.UsePhysicalMediaSerialNumber = value;
    269. }
    270. }
    271. public bool UseBiosVersion
    272. {
    273. get
    274. {
    275. return Config.UseBiosVersion;
    276. }
    277. set
    278. {
    279. Config.UseBiosVersion = value;
    280. }
    281. }
    282. public bool UseBiosManufacturer
    283. {
    284. get
    285. {
    286. return Config.UseBiosManufacturer;
    287. }
    288. set
    289. {
    290. Config.UseBiosManufacturer = value;
    291. }
    292. }
    293. public bool UseWindowsSerialNumber
    294. {
    295. get
    296. {
    297. return Config.UseWindowsSerialNumber;
    298. }
    299. set
    300. {
    301. Config.UseWindowsSerialNumber = value;
    302. }
    303. }
    304. private string m_enctyptedSoftwareName;
    305. private string Password_1;
    306. private string Password_2;
    307. private string m_softwareName;
    308. private string m_RegFilePath;
    309. private string m_HideFilePath;
    310. private int m_trailDays;
    311. private int m_trialRunTimes;
    312. private string m_Text;
    313. private string m_identifier;
    314. private string m_liteIdentifier;
    315. private string WRNDTGYTPWPAQBBCISTWB;
    316. }
    317. }


    Diese Klasse Stellt wohl einen Lizenzdialog dar. Sie liest einige Daten ein, entschlüsselt diese und prüft zwei Passwörter und schreibt wohl immer wieder ein Datei mit dem Pfad HideFilePath, die mit TripelDES verschlüsselt wird:

    C# - CSharp

    1. private void writeHideFilePath()
    2. {
    3. string text = string.Format("{0};{1};{2};{3}", new object[]
    4. {
    5. DateTime.Now.Ticks,
    6. this.m_trailDays,
    7. this.m_trialRunTimes,
    8. this.m_enctyptedSoftwareName
    9. });
    10. TripleDESKey.writeFile(this.m_HideFilePath, text);
    11. }

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „krusty“ ()

    Beliebigen Editor mit Find und Replace.
    Die Namen kann man ja einfach ableiten. Wenn im Code folgendes steht:
    this.HBRZOLKOABCXSRUIGZOCT = SoftwareName;
    dann habe ich HBRZOLKOABCXSRUIGZOCT in m_SoftwareName umbenannt. Gleiches gilt für Funktionsnamen.

    Bitte setze den obiven Code in Hide Tags!!

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „krusty“ ()