private void RegisterTurboActivate() { //TODO: goto the version page at LimeLM and paste this GUID here TurboActivate.VersionGUID = "ea47f8154f93260b389f5.40653018"; try { // Check if we're activated, and every 90 days verify it with the activation servers // In this example we won't show an error if the activation was done offline // (see the 3rd parameter of the IsGenuine() function) -- http://wyday.com/limelm/help/offline-activation/ IsGenuineResult gr = TurboActivate.IsGenuine(90, 14, true); isActivated = gr == IsGenuineResult.Genuine || gr == IsGenuineResult.GenuineFeaturesChanged || // an internet error means the user is activated but // TurboActivate failed to contact the LimeLM servers gr == IsGenuineResult.InternetError; if (gr == IsGenuineResult.InternetError) { //TODO: give the user the option to retry the genuine checking immediately // For example a dialog box. In the dialog call IsGenuine() to retry immediately MessageBox.Show(@"Internet error", Constants.ApplicationTitle); isActivated = false; } } catch (TurboActivateException ex) { MessageBox.Show(@"Failed to check if activated: " + ex.Message); isActivated = false; } }
public ReVerifyNow(TurboActivate ta, uint DaysBetweenChecks, uint GracePeriodLength) { // Set the TurboActivate instance from the main form this.ta = ta; InitializeComponent(); // Use the days between checks and grace period from // the main form GenuineDaysLeft = ta.GenuineDays(DaysBetweenChecks, GracePeriodLength, ref inGrace); if (GenuineDaysLeft == 0) { lblDescr.Text = "You must re-verify with the activation servers to continue using this app."; } else { lblDescr.Text = "You have " + GenuineDaysLeft + " days to re-verify with the activation servers."; } }
public Form1() { InitializeComponent(); try { //TODO: goto the version page at LimeLM and paste this GUID here ta = new TurboActivate("18324776654b3946fc44a5f3.49025204"); // set the trial changed event handler ta.TrialChange += trialChange; // Check if we're activated, and every 90 days verify it with the activation servers // In this example we won't show an error if the activation was done offline // (see the 3rd parameter of the IsGenuine() function) // https://wyday.com/limelm/help/offline-activation/ IsGenuineResult gr = ta.IsGenuine(DaysBetweenChecks, GracePeriodLength, true); isGenuine = gr == IsGenuineResult.Genuine || gr == IsGenuineResult.GenuineFeaturesChanged || // an internet error means the user is activated but // TurboActivate failed to contact the LimeLM servers gr == IsGenuineResult.InternetError; // If IsGenuineEx() is telling us we're not activated // but the IsActivated() function is telling us that the activation // data on the computer is valid (i.e. the crypto-signed-fingerprint matches the computer) // then that means that the customer has passed the grace period and they must re-verify // with the servers to continue to use your app. //Note: DO NOT allow the customer to just continue to use your app indefinitely with absolutely // no reverification with the servers. If you want to do that then don't use IsGenuine() or // IsGenuineEx() at all -- just use IsActivated(). if (!isGenuine && ta.IsActivated()) { // We're treating the customer as is if they aren't activated, so they can't use your app. // However, we show them a dialog where they can reverify with the servers immediately. ReVerifyNow frmReverify = new ReVerifyNow(ta, DaysBetweenChecks, GracePeriodLength); if (frmReverify.ShowDialog(this) == DialogResult.OK) { isGenuine = true; } else if (!frmReverify.noLongerActivated) // the user clicked cancel and the user is still activated { // Just bail out of your app Environment.Exit(1); return; } } } catch (TurboActivateException ex) { // failed to check if activated, meaning the customer screwed // something up so kill the app immediately MessageBox.Show("Failed to check if activated: " + ex.Message); Environment.Exit(1); return; } ShowTrial(!isGenuine); // If this app is activated then you can get custom license fields. // See: https://wyday.com/limelm/help/license-features/ /* * if (isGenuine) * { * string featureValue = ta.GetFeatureValue("your feature name"); * * //TODO: do something with the featureValue * } */ }
// Token: 0x060002CF RID: 719 RVA: 0x0002CAC8 File Offset: 0x0002ACC8 public static void CheckLicense() { string text = ""; try { text = TurboActivate.GetPKey(); } catch (Exception) { } bool flag = true; IsGenuineResult isGenuineResult; try { isGenuineResult = TurboActivate.IsGenuine(0u, 0u, false, false); flag = (isGenuineResult == IsGenuineResult.Genuine || isGenuineResult == IsGenuineResult.GenuineFeaturesChanged || isGenuineResult == IsGenuineResult.InternetError); } catch (TurboActivateException ex) { if (MessageBox.Show("Failed to check license. Click OK to retry. Please disable any antivirus or firewall that could be blocking bnb. \r\n" + ex.Message, "Checking License", MessageBoxButtons.OKCancel, MessageBoxIcon.Hand) == DialogResult.OK) { Program.CheckLicense(); } return; } if (flag) { if (isGenuineResult != IsGenuineResult.InternetError) { Program.run = true; Form1.Abc = "cba"; string text2 = "invalid"; try { text2 = TurboActivate.GetPKey(); } catch (Exception ex2) { "Error getting license details {0}".With(new object[] { ex2.Message }).Show(MessageBoxIcon.Hand, "", MessageBoxButtons.OK); } Form1.SerialCode = (Program.serial_code = text2); return; } if (MessageBox.Show("Could not connect to server. Click OK to retry.", "Checking License", MessageBoxButtons.OKCancel, MessageBoxIcon.Hand) == DialogResult.OK) { Program.CheckLicense(); return; } } else { string text3 = FormHelper.InputHelper(false, "Better Nike Bot: Enter Serial Key", "Please enter the serial code that you received upon purchase", text, 500, 0); if (text3.IsNull()) { "You need a valid serial to run BetterNikeBot.".Show(MessageBoxIcon.Hand, "", MessageBoxButtons.OK); return; } try { TurboActivate.CheckAndSavePKey(text3, TurboActivate.TA_Flags.TA_USER); TurboActivate.Activate(); isGenuineResult = TurboActivate.IsGenuine(0u, 0u, false, false); Program.run = true; Form1.Abc = "cba"; string serialCode = "invalid"; try { serialCode = TurboActivate.GetPKey(); } catch (Exception ex3) { "Error getting license details. {0}".With(new object[] { ex3.Message }).Show(MessageBoxIcon.Hand, "", MessageBoxButtons.OK); } Form1.SerialCode = serialCode; } catch (Exception ex4) { ("Error in serial key:\r\n" + ex4.Message).Show(MessageBoxIcon.Hand, "", MessageBoxButtons.OK); Program.CheckLicense(); } return; } }
public ActivationGui() { InitializeComponent(); try { //TODO: goto the version page at LimeLM and paste this GUID here ta = new TurboActivate("4jb6ccnwvp47kmfhqe6cs3jv3p5aeaa"); // set the trial changed event handler ta.TrialChange += trialChange; // Check if we're activated, and every 90 days verify it with the activation servers // In this example we won't show an error if the activation was done offline // (see the 3rd parameter of the IsGenuine() function) // https://wyday.com/limelm/help/offline-activation/ var gr = ta.IsGenuine(DaysBetweenChecks, GracePeriodLength); isGenuine = gr == IsGenuineResult.Genuine || gr == IsGenuineResult.GenuineFeaturesChanged || // an internet error means the user is activated but // TurboActivate failed to contact the LimeLM servers gr == IsGenuineResult.InternetError; // If IsGenuineEx() is telling us we're not activated // but the IsActivated() function is telling us that the activation // data on the computer is valid (i.e. the crypto-signed-fingerprint matches the computer) // then that means that the customer has passed the grace period and they must re-verify // with the servers to continue to use your app. //Note: DO NOT allow the customer to just continue to use your app indefinitely with absolutely // no reverification with the servers. If you want to do that then don't use IsGenuine() or // IsGenuineEx() at all -- just use IsActivated(). if (!isGenuine && ta.IsActivated()) { // We're treating the customer as is if they aren't activated, so they can't use your app. // However, we show them a dialog where they can reverify with the servers immediately. var frmReverify = new ReVerifyNow(ta, DaysBetweenChecks, GracePeriodLength); if (frmReverify.ShowDialog(this) == DialogResult.OK) { isGenuine = true; } else if (!frmReverify.noLongerActivated) // the user clicked cancel and the user is still activated { InitPlugin.Activated = false; return; } } } catch (TurboActivateException ex) { // failed to check if activated, meaning the customer screwed // something up so kill the app immediately MessageBox.Show("Failed to check if activated: " + ex.Message); InitPlugin.Activated = false; return; } ShowTrial(!isGenuine); InitPlugin.Activated = ta.IsActivated() && isGenuine; }