Re: How to write application that expires after some days

From: steve (me_at_me.com)
Date: 04/14/04


Date: Thu, 15 Apr 2004 05:51:55 +0800

On Sat, 10 Apr 2004 08:32:19 +0800, Struts Dude wrote
(in article <ea2dc128.0404091632.469da15d@posting.google.com>):

> 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



Relevant Pages

  • Re: lack of Cs static local variables
    ... direct correlation in Java. ... create an executable jar, use java webstart, run it from a network drive, ... package the JRE with the app, ...
    (comp.lang.java.programmer)
  • Re: Mac free compilers
    ... There's some file inside the bundle that must either ... It's the Info.plist file in the application package, ... you've neatly wrapped the app in a package. ... of Java 1.3.x available, but not Java 1.4. ...
    (comp.lang.java.programmer)
  • Re: [opensuse] Java and swing
    ... Is "javax.swing" inside some other java file? ... That name, "javax.swing" is a package name, not a class name. ... file that uses swing, and that is old enough that it wants to have ... so the official way to load the app included ...
    (SuSE)
  • Re: (OT) In search of a definition
    ... primarily works under Windows XP, I am in search of a "good ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)
  • Re: (OT) In search of a definition
    ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)