2 Replies Latest reply on Dec 31, 2014 6:41 AM by JJMack

    Auto Expire JavaScript




      I have created a javascript code. I would like to share this to my client as a trail version. I don't know about the auto-expire pack? Could you please help/suggest me!


      thanks in advance,


        • 1. Re: Auto Expire JavaScript
          JJMack Most Valuable Participant

          You could code in a date check. Check the date current and just exit if after some end date save the java script in binary so the user can not change the script.

          • 2. Re: Auto Expire JavaScript
            mangalarajiv Level 1



            I don't know about the date check, kindly guide me on it. I have a question on it too.

            1. If they rollback system time and date, script may starts work.

            I got a suggestion from my friend that, get the MAC id of your client's system and give access to utilize the script.

            Could you please help me to get date check and MAC id check?

            Is it possible?




            • 3. Re: Auto Expire JavaScript
              JJMack Most Valuable Participant

              Using JavaScript you can get the current date should be the same on a mac or pc a standard java functuon. You can hard code an expiration date into the script.   If the current date is before the expiration date continue else return. 


              If you do not want users to be able to roll back the date you could add extra code the would log script start clock time and make sure its always advancing. If not the clock been set back. Log that the clock been set back.  So when when the script starts the first check you make if there is a log has the clock been tampered with if no log exist create log  and record first start time log entry.   If log exist and clock not logged as tampered with read log last time record.  If current time is after that record that time in the log as the last start time.


              If the Clock is OK is the date OK before the expiration date ... Its not rocket science...


              Whatever you code will not stop a thief if you don't deal with thieves and your program is worth while for a mass market they will steal it from someone else.