The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Red Hat's business model: the "elevator speech" version (video) iBot UNIX and Linux RSS News 0 04-08-2008 04:10 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
limited ping "command" at solaris srilinux SUN Solaris 3 06-13-2006 06:38 AM
how could i make a program mixed with many "|", "<" and ">" strugglingman High Level Programming 2 04-29-2006 08:11 AM
What is "incompatible protocol version" yaoww UNIX for Advanced & Expert Users 1 09-25-2005 12:26 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-06-2007
the_learner the_learner is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 75
Implementing "Time Limited, Trial" version of my program

Hello everyone,

I am just looking for ideas on how I can implement a demo version of my program which will be available in unix environment (solaris and linux).

So what I have in mind is to either implement a limited-time version (trial version expires after 30 days) or a limited-number version (trial version expires after the program has ran for 'x' number of times)

Can anyone please give any idea on how any of this this can be implemented ?

The simplest strategy I can think of is to store a number (for e.g: the date or a count) in a file when the program is run for the first time and then on each subsequent run, read this number and, lets say if its a date, then compare it with the current date.

But then I ran into issues like, where can I store this file? (I want the strategy atleast a little secure, so that it is not very obvious to everyone to go ahead and delete this file whenever the trial version expires) ? Is it possible the program does not have write permission ? Is there any kind of a registry in unix where I can store key, value pairs ?

(Actually, I am not so much concerned about crackers being able to break the demo version, it just should not be too obvious)

Please, just throw in whatever ideas you have.

Thanks !!
  #2 (permalink)  
Old 06-06-2007
the_learner the_learner is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 75
The program should not be time limited on a particular system, but should be time limited for a particular user.

And, I guess I can atleast make the file which stores the date a hidden file.
  #3 (permalink)  
Old 06-06-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
If you are planning to release the code of your program to the rest of the world, then a demo version is redundant. If not, then you can generate a key when the program is installed and store it in some file. You can check for that file's checksum and timestamps when the file is written to and then on subsequent runs, your program should check the file and refuse to run if the checksum/size or the timestamp changes in any way.

For a user, it would be a bit more complicated, but you could go along similar lines.
  #4 (permalink)  
Old 06-07-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
If you host an ftp server you could publish a version which is recompiled everyday with a datestamp in the source code.
  #5 (permalink)  
Old 06-07-2007
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Hmm.. interesting post.

Since you are absolutely fine with the hidden file approach, why not make it as part of the config file, if you have any. That is, put in an encrypted (perhaps XOR encryption) form of the initial date when the app ran for the first time. Everytime you start the app, you will look at that date and then decide on the expiration message. Likewise with the number of trials. In this case, you will update it accordingly.

Or embed the whole source code in your application and then when you are about to exit, recompile the code with the relevant information i.e. number of tries left or the remaining time for the app to run. This is easier said than done
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0