How to write application that expires after some days

Discussion in 'Java' started by Struts Dude, Apr 10, 2004.

  1. Struts Dude

    Struts Dude Guest

    Hi

    Does anyone know how to write Java application that expires after some
    days
    on trial version, say 30 days??

    Ideally, tinkering with system date will not stop application from
    expiring. Maybe by invalidating the application from starting once
    date has been manipulated

    Thanks

    Struts
     
    Struts Dude, Apr 10, 2004
    #1
    1. Advertising

  2. Struts Dude

    Uma Shanker Guest

    Struts Dude wrote:
    > Hi
    >
    > Does anyone know how to write Java application that expires after some
    > days
    > on trial version, say 30 days??
    >
    > Ideally, tinkering with system date will not stop application from
    > expiring. Maybe by invalidating the application from starting once
    > date has been manipulated
    >
    > Thanks
    >
    > Struts

    hi.
    1. fix the time and date on which program is used/installed for the
    first time.
    1.a may be the your program's folder creation time
    1.b may be MD5 it and put in special file or location.
    2. in your application main() method, check this value and continue
    based on your policies.
    - 1.a or 1.b etc. or may be even more checks can be done.


    --
    uma shanker
     
    Uma Shanker, Apr 10, 2004
    #2
    1. Advertising

  3. Struts Dude

    alan jeeves Guest

    "Struts Dude" <> wrote in message
    news:...
    > Hi
    >
    > Does anyone know how to write Java application that expires after some
    > days
    > on trial version, say 30 days??
    >
    > Ideally, tinkering with system date will not stop application from
    > expiring. Maybe by invalidating the application from starting once
    > date has been manipulated
    >
    > Thanks
    >
    > Struts


    You could implement a web based script that your app calls when it is
    installed and then everytime it is started to validate the number of days
    its been installed - maybe storing the installed date on the server?

    Alan
     
    alan jeeves, Apr 10, 2004
    #3
  4. (Struts Dude) wrote in
    news::

    > Hi
    >
    > Does anyone know how to write Java application that expires after some
    > days
    > on trial version, say 30 days??
    >
    > Ideally, tinkering with system date will not stop application from
    > expiring. Maybe by invalidating the application from starting once
    > date has been manipulated



    Simply pop up a window that says two things:

    1) 30 days have expired.
    2) Please download a new trial version from our site. We have made some improvements and fixed a few
    bugs.
    3) After they close this dialog, let your app run normally. If you stop your app from running you will lose a
    sale.

    Do not attempt any fancy stuff with install dates and clock checking, it will only alienate your potential
    customers.


    --
    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP t+ !5 X- R- tv--- b++
    DI++ D+ G++ e++ h---- r+++ y+++
    ------END GEEK CODE BLOCK------
     
    Tris Orendorff, Apr 10, 2004
    #4
  5. And keep in mind no matter how clever your check is - somewhere you
    have a spot in your code that is
    If (checkFails())
    System.exit();

    And all they have to do is eliminate those 2 lines of code...



    On Sat, 10 Apr 2004 16:51:40 +0200, Uma Shanker <>
    wrote:

    >Struts Dude wrote:
    >> Hi
    >>
    >> Does anyone know how to write Java application that expires after some
    >> days
    >> on trial version, say 30 days??
    >>
    >> Ideally, tinkering with system date will not stop application from
    >> expiring. Maybe by invalidating the application from starting once
    >> date has been manipulated
    >>
    >> Thanks
    >>
    >> Struts

    >hi.
    > 1. fix the time and date on which program is used/installed for the
    >first time.
    > 1.a may be the your program's folder creation time
    > 1.b may be MD5 it and put in special file or location.
    >2. in your application main() method, check this value and continue
    >based on your policies.
    > - 1.a or 1.b etc. or may be even more checks can be done.



    david@
    Windward Reports -- http://www.WindwardReports.com
    DefendTek -- http://www.DefendTek.com
    Page 2 Stage -- http://www.Page2Stage.com
    Enemy Nations -- http://www.EnemyNations.com
    me -- http://dave.thielen.com
    Barbie Science Fair -- http://www.BarbieScienceFair.info
    Hillary Clinton -- http://www.HillaryIn2004.org
    (yes I have lots of links)
     
    David Thielen, Apr 11, 2004
    #5
  6. Struts Dude

    steve Guest

    On Sat, 10 Apr 2004 08:32:19 +0800, Struts Dude wrote
    (in article <>):

    > Hi
    >
    > Does anyone know how to write Java application that expires after some
    > days
    > on trial version, say 30 days??
    >
    > Ideally, tinkering with system date will not stop application from
    > expiring. Maybe by invalidating the application from starting once
    > date has been manipulated
    >
    > Thanks
    >
    > Struts


    first of all you need to decide how serious you are on this.
    If it is to cover a commercial app, then you need to put a lot more thought
    into it. from the time before you write your app.

    start by having a function that returns true,- always!!!-
    then code so that your app will continue based on "true"
    as you code add a call to this function in each(randomly ) of your routines.

    1.use the java security manager to protect this routine.
    2. overload the java zip package, to "change" the compression system, for
    this package.
    3. encode the first time this app is run along with some system specific
    data.( check for silly dates & times, & always check for negative time)
    I.E if the install date claims to be 2032 then it is obviously wrong.

    4. finally write the protection code of your routine, and change it so that
    it only returns "true" if the app is valid or in date.

    what you should have is an app that any hacker will always attack your
    package that returns "true/false", as it would be too much work to patch all
    the other stuff.

    you just need to prevent the package from being replaced/overriden.(security
    manager) then put all your thought into that package.
    the overloaded zip package , will mess up any decompiler programs, because
    they ALL reply on standard zip format.

    it's not completely fool proof, but it will dishearten all but the hardest
    hackers.

    steve
     
    steve, Apr 14, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Stockwell
    Replies:
    2
    Views:
    727
    Anna Martelli Ravenscroft
    Sep 20, 2004
  2. Gerrit
    Replies:
    0
    Views:
    410
    Gerrit
    Sep 20, 2004
  3. Terry Reedy
    Replies:
    0
    Views:
    446
    Terry Reedy
    Sep 20, 2004
  4. Replies:
    5
    Views:
    502
    Bo Yang
    Nov 2, 2006
  5. kirke

    list of days between two days

    kirke, Oct 19, 2006, in forum: Javascript
    Replies:
    7
    Views:
    153
    Julian Turner
    Oct 20, 2006
Loading...

Share This Page