HISE Logo Forum
    • Categories
    • Register
    • Login

    Simple copy protection done right :)

    Scheduled Pinned Locked Moved Presets / Scripts / Ideas
    151 Posts 25 Posters 17.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • orangeO
      orange
      last edited by orange

      @Christoph-Hart I am trying to check the serial input on 2 different serial lists. There are two serial lists;

      • Bundle serials (stores and checks the file in "../Individual_RegistrationInfo.js" )
      • Individual serials (stores and checks the file in "../Bundle_RegistrationInfo.js" )

      It works on bundle serial list checking but not works on Individual serial list :( What is the thing that I missed?

      namespace Authorisation
      {
          const var SerialInput = Content.getComponent("SerialInput");
          const var Description = Content.getComponent("Description");
          const var SerialStateLabel = Content.getComponent("SerialStateLabel");
          const var AuthorisationDialogue = Content.getComponent("AuthorisationDialogue");
      
          
          
          inline function onSubmitButtonControl(component, value)
          {
            if(!value) 
                  return;
          
              local v = SerialInput.getValue();
              Console.print(v);
      	
      // Checks if it's in the Individual Serial sList
              if(Individual_serials.Data.contains(v))
              {
                  Console.print("Serial number found");
              
                  local data = 
                  {
                      "Serial": v
                  };
              
      // Saves as Individual_RegistrationInfo.js 
                  Engine.dumpAsJSON(data, "../Individual_RegistrationInfo.js");
                  
                  setValidLicense(true);
              }
              
        
       // Checks if it's in the Bundle Serial sList
          if(Bundle_serials.Data.contains(v))
              {
                  Console.print("Serial number found");
              
                  local data = 
                  {
                      "Serial": v
                  };
      
       // Saves as Bundle_RegistrationInfo.js 
                  Engine.dumpAsJSON(data, "../Bundle_RegistrationInfo.js");
                  
                  setValidLicense(true);
              }      
      
              
              else
              {
                  Console.print("Invalid serial number");
                  Description.set("text", "INVALID KEY THAT DOES NOT MATCH WITH YOUR LICENSE");
                  
                  setValidLicense(false);
              }
          };
      
          Content.getComponent("SubmitButton").setControlCallback(onSubmitButtonControl);
      
      
      
          inline function setValidLicense(isValid)
          {
                  
              if(isValid)
              {
                  // My action
              }
              else
              {
                  // My action
              }
          }
      
          inline function checkOnLoad()
          {
              SerialInput.set("text", "");
              
      // Load the serial from the stored files
      
              local pData_Individual = Engine.loadFromJSON("../Individual_RegistrationInfo.js");
              local pData_Bundle = Engine.loadFromJSON("../Bundle_RegistrationInfo.js");
              
              Console.print("Checking serial");
          
      // Individual serials
              if(pData_Individual)    
              {
                  local v = pData_Individual.Serial;
                  Console.print("Restored serial: " + v);
              
                 if(Individual_serials.Data.contains(v))
                  {
                      setValidLicense(true);
                      return;
                  }
          }
      
      // Bundle serials    
            if(pData_Bundle)    
              {
                  local v = pData_Bundle.Serial;
                  Console.print("Restored serial: " + v);
              
                 if(Bundle_serials.Data.contains(v))
                  {
                      setValidLicense(true);
                      return;
                  }      
          }
      
            setValidLicense(false);
        }    
          
      // Call this on startup
          checkOnLoad();
      
      }
      

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Basics:

        if(x)
        {
            // Will be executed if x is true
        }
        if(y)
        {
           // will be executed if y is true
        }
        else
        {
           // will be executed if y is false 
           // no matter what x is
        }
        

        Solution:

        else if(y)
        

        Protipp: y is Bundle_serials.Data.contains(v) :)

        1 Reply Last reply Reply Quote 2
        • JayJ
          Jay @staiff
          last edited by

          @staiff I already did it

          reg.png

          Joansi Villalona

          lalalandsynthL 1 Reply Last reply Reply Quote 2
          • Dan KorneffD
            Dan Korneff
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • Dan KorneffD
              Dan Korneff
              last edited by

              Have you guys seen https://soraco.co/ ? It appears to be $900 (one time fee) for 1 cross platform license server. Have you guys seen anything more cost effective?
              @Christoph-Hart Could this be implemented with a HISE product?

              d.healeyD 1 Reply Last reply Reply Quote 0
              • d.healeyD
                d.healey @Dan Korneff
                last edited by d.healey

                @dustbro said in Simple copy protection done right :):

                Have you guys seen https://soraco.co/ ? It appears to be $900 (one time fee) for 1 cross platform license server. Have you guys seen anything more cost effective?
                @Christoph-Hart Could this be implemented with a HISE product?

                Only works with Windows by the looks of it and not compatible with the GNU GPL.

                Edit: oh actually is says Mac and Android too, but at the bottom of the page it only has Windows compatibility labels... no GNU/Linux support either. Also, how would this be any better than the server/client license (not the simple copy protection discussed in this thread) Christoph already provides?

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                Dan KorneffD 1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @d.healey
                  last edited by

                  @d-healey This would be for closed source projects.

                  @d-healey said in Simple copy protection done right :):

                  how would this be any better than the server/client license Christoph already provides?

                  This would give you the ability to offer Trial licenses, as well as subscriptions.

                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Dan Korneff
                    last edited by d.healey

                    @dustbro said in Simple copy protection done right :):

                    @d-healey This would be for closed source projects.

                    Oh definitely, but HISE is licensed under the GNU GPL, so Christoph would have to either provide two binaries and sets of source code, one with the proprietary code and one without, or offer a way for individual developers to link HISE to Soraco themselves - assuming Soraco allows you to connect to their system in a way that is GNU GPL compatible.

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    Dan KorneffD 1 Reply Last reply Reply Quote 1
                    • Christoph HartC
                      Christoph Hart
                      last edited by

                      To be honest I have no interest embedding other copy protection services. There is the GPL way, the simple solution sketched up here and an inhouse solution for more advanced copy protection so there are plenty of options available.

                      I embedded TurboActivate in a product a few years ago and it was absolute nightmare so I vowed to myself to never do this again ;)

                      1 Reply Last reply Reply Quote 2
                      • Dan KorneffD
                        Dan Korneff @d.healey
                        last edited by

                        @d-healey said in Simple copy protection done right :):

                        but HISE is licensed under the GNU GPL

                        Honestly, I don't know the intricacies of the licenses. :) I just assumed that you pay a fee for a commercial version of HISE, and you do what you want with it.

                        @Christoph-Hart said in Simple copy protection done right :):

                        I have no interest embedding other copy protection services

                        Fair enough! It looks like I'll be investigating your inhouse solution shortly.

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • d.healeyD
                          d.healey @Dan Korneff
                          last edited by

                          @dustbro said in Simple copy protection done right :):

                          Honestly, I don't know the intricacies of the licenses. :) I just assumed that you pay a fee for a commercial version of HISE, and you do what you want with it.

                          You can't mix proprietary software with any software licensed under the GNU GPL, it has to be 100% free. But you can link to proprietary software as long as it's independent.

                          The HISE commercial license doesn't mean you are suddenly able to release commercial plugins - you already have that freedom with the GNU GPL - it's called a commercial license because you have to pay for it. And what it grants you is the freedom to restrict your users (isn't that nice :p )

                          Libre Wave - Freedom respecting instruments and effects
                          My Patreon - HISE tutorials
                          YouTube Channel - Public HISE tutorials

                          1 Reply Last reply Reply Quote 1
                          • L
                            LeeC @orange
                            last edited by LeeC

                            Hey @orange,

                            Just trying to compile this 'Simple Copy Protection' code using Hise 2.1.0

                            When I click 'compile' the console returns the following:

                            Component with name SerialInput wasn't found
                            Component with name Description wasn't found
                            Component with name SerialStateLabel wasn't found
                            Component with name AuthorisationDialogue wasn't found
                            Component with name GlobalMute wasn't found

                            Do I need to create these components or are they inbuilt somehow?

                            I've place Serial.js in the 'Script' folder as instructed.

                            Any help, examples or code snippets from anyone would be golden.

                            Thanks

                            Dan KorneffD 1 Reply Last reply Reply Quote 0
                            • Dan KorneffD
                              Dan Korneff @LeeC
                              last edited by

                              @LeeC said in Simple copy protection done right :):

                              Do I need to create these components

                              Yeah, you gotta make these items.
                              There is a demo project available to use as reference.

                              Link Preview Image
                              GitHub - christophhart/hise_tutorial: The Tutorial project for HISE

                              The Tutorial project for HISE. Contribute to christophhart/hise_tutorial development by creating an account on GitHub.

                              favicon

                              GitHub (github.com)

                              L 1 Reply Last reply Reply Quote 0
                              • L
                                LeeC @Dan Korneff
                                last edited by

                                @dustbro Thanks just seen the Github project.
                                Makes sense ☺

                                1 Reply Last reply Reply Quote 0
                                • L
                                  LeeC
                                  last edited by LeeC

                                  Mmmmm

                                  So I downloaded the 'SimpleCopyProtection' demo from Github and tried to load the project folder using Hise 2.1.0

                                  The following interface message is returned in the console:

                                  Interface:| onControl could not be parsed!

                                  Any thoughts why that might be?

                                  For the record, other demo projects such as the 'ParametriqEQ' and the 'DynamicsFx' load fine.

                                  Thanks

                                  L 1 Reply Last reply Reply Quote 0
                                  • L
                                    LeeC @LeeC
                                    last edited by

                                    All sorted now.

                                    1 Reply Last reply Reply Quote 1
                                    • B
                                      BWSounds
                                      last edited by

                                      simple question out of curiosity (im trying to figure out a simple way to do this)... for the ppl using serial code activation, how are you sending our the code? manually via email or.....

                                      orangeO 1 Reply Last reply Reply Quote 0
                                      • orangeO
                                        orange @BWSounds
                                        last edited by

                                        @BWSounds If your website is wordpress based, you can use License Manager plugin. You need to upload serial list and the plugin will send serial number automatically.

                                        develop Branch / XCode 13.1
                                        macOS Monterey / M1 Max

                                        1 Reply Last reply Reply Quote 2
                                        • Dan KorneffD
                                          Dan Korneff
                                          last edited by

                                          Im using license manager as well for my WOO site

                                          1 Reply Last reply Reply Quote 2
                                          • B
                                            BWSounds
                                            last edited by

                                            Thank you 🙏

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            42

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.8k

                                            Posts