HISE Logo Forum
    • Categories
    • Register
    • Login

    Check the serial once a day?

    Scheduled Pinned Locked Moved General Questions
    11 Posts 4 Posters 542 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.
    • L
      LeeC @A Former User
      last edited by

      @Steve-Mohican should be possible.
      What serial method are you using at the moment?
      Post a quick snippet and we can add in the check ☺

      ? 1 Reply Last reply Reply Quote 0
      • ?
        A Former User @LeeC
        last edited by

        @LeeC Actually I am using Simple Copy Protection tutorial system of Hise. My checkOnLoad() function is below.

        namespace Authorisation
        {
         
        inline function checkOnLoad()
          {
                SerialInput.set("text", "");
                
           // Load the serial from the stored files
                local pData_SingleProduct = Engine.loadFromJSON("../../ProductLicense.js");
                
                Console.print("Checking serial");
            
        
        // Single product serials      
         if(pData_SingleProduct)    
             {
                   local v = pData_SingleProduct.Serial;
                   Console.print("Restored serial: " + v);
                
                    
                   if(SingleProductSerials.Data.contains(v))
                    {
                        setValidLicense(true);
                        return;
                    }      
             }
        
              setValidLicense(false);
        
          }    
            
        // Call this on startup
            checkOnLoad();
        
        }
        
        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by

          Guys any help will be appreciated....

          LindonL L 2 Replies Last reply Reply Quote 0
          • LindonL
            Lindon @A Former User
            last edited by

            @Steve-Mohican I know @ustk was working on some sort of time/date function perhaps if you search for that it might help?

            HISE Development for hire.
            www.channelrobot.com

            1 Reply Last reply Reply Quote 1
            • L
              LeeC @A Former User
              last edited by LeeC

              @Steve-Mohican Sorry only just seen this...

              /// Dates
              
              const var datetime = Engine.getSystemTime(false);
              const var today = Math.round(datetime.substring(0, 8));  /// Truncates and converts to integer
              Console.print(today);
              
              

              Essentially you'll need to write today to the ProductLicense.js file as the datelastchecked, then check it before checking the serial.

              ? 1 Reply Last reply Reply Quote 0
              • ?
                A Former User @LeeC
                last edited by

                @LeeC Thank you so much, I'll check it out!

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

                  @Steve-Mohican No problemo! Let me know if you hit any road blocks and I'll look at it a bit closer.
                  Had my head in the sand over the last couple of days ☺

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

                    So you basically want to store a flag that controls whether to check the credential as clear text into a JSON object? This simplifies the hacking procedure to open up a text file and change true to false and in that case you can save yourself the trouble with bothering about serials at all :)

                    ? 1 Reply Last reply Reply Quote 4
                    • ?
                      A Former User @Christoph Hart
                      last edited by

                      @Christoph-Hart You are right. I never thought like that before 😄

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

                        @Steve-Mohican you'll probably have to obscure the date information that you are writing to the JSON file somehow... Encrypt/Decrypt etc

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

                        33

                        Online

                        1.8k

                        Users

                        12.0k

                        Topics

                        104.7k

                        Posts