Re: time-based beta termination system
Re: time-based beta termination system
- Subject: Re: time-based beta termination system
- From: James Quick <email@hidden>
- Date: Thu, 24 Jul 2003 17:28:27 -0400
On Thursday, July 24, 2003, at 01:54 AM, Prachi Gauriar wrote:
On Wednesday, July 23, 2003, at 11:54 PM, M. Uli Kusterer wrote:
At 17:26 Uhr -0700 23.07.2003, Francisco Tolmasky wrote:
Anybody know a good reliable way to make betas terminate/stop
working after x amount of days or after some date? I'd like
something more reliable than just checking the date and thus not
working if someone sets their clocks backwards.
I don't think there's a real way around that. You could of course
save the last date your app was run somewhere (invisible Prefs file?)
and refuse to launch if the current date is before that (but don't
say "you're trying to hack me!" to the user ... that'll only invite
the hackers to try harder -- better just show the same "expired"
message).
If you're network connected, why not try to contact a network time
server? If that fails (no network or some other connection error),
then check the system clock?
I am averse to plonking down a hidden file somewhere. I hate it when a
programmer thinks they
can write something somewhere clever, assuming it doesn't matter where
it puts things.
If it's not in /tmp, somewhere under my home directory, in the
application bundle, or where
appropriate, in an application specific directory under /Library, it
ticks me off.
I like Prachi's suggestion, and if you are really paranoid, backing it
up with a further harmless
check. If a known external time source says it's today, and agrees
with clock, believe them.
If you are still suspicious, perhaps check a few files which change
frequently, by reading
mtimes, and atimes from /var/log/..., /var/log or /tmp/.
The casual offender is likely to change the system clock and try once.
When you see a
file written or accessed in the future, bail.
As another poster commented, however, don't go overboard, a dedicated
cracker
might change your binary, or alter what resources you load from your
environment.
rendering your work moot.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.