oh my, I need to create a trial version of some software Im developing, I know how to write stuff deep in the registry, like current system date, but, how do I avoid the fact that the user might change the system's date and time?
Complete protection is nearly impossible to achieve. Perhaps you'd better create a demo version? Let the user use all functions in the app, except the ones that generate the output, whatever that may be.
yeah, those hackers got it going, is there another way of knowing the exact time? perhaps something like tickcount ? (I know it only records the time since windows started) or maybe checking the BIOS?
Yup it can be done. You need a db or the like at your end. Once the User installs the app they need to get an activation key to use the trial version so they conect to your server. Well grab their hard drive serial number or what ever, bit like what win XP does, well XP actually grabs a whole range of serials/info for your PC they wraps this up with some algo making it next to impossible to crack, then send this serial number to your db and store it there. If they try to resuse the app after the trial period ends you have their record in your db to deny a new activation key.
Only problem here is with the legal side. It may be illegal to grab somebodies HD serial number and retrive it like this, just guessing.
you may use installation date (create date of your .exe file) to count down for expired date in trial version.
BTW, to protect user from changing system date between installation, recheck difference between current date with installed date again. It should not be greater than trial period days. (ex.30 day)
Hope this help you
Don't leave it till tomorrow, Do It Now! 5361726176757468204368616E63686F747361746869656E
If someone is willing to change there system date to run "stolen" softare, then let karma take care of them...
As far as legal aspects of getting hardware info, simply post some very detailed, and small font, "ACCEPT THIS" clause that mentions the fact that you will be "retrieving" this information and go with that. Don't BS this info - be real - take it from some "ACCEPT THIS" clauses that other vendors us (M$) and work your wording into it - if it's not already there.
Originally posted by Xcoder yeah, those hackers got it going, is there another way of knowing the exact time? perhaps something like tickcount ? (I know it only records the time since windows started) or maybe checking the BIOS?
i got a way, pull server time from the server, and use Harddrive serials for the program.....
checks server for date that it is, and the server uses 30 day periods, then it puts HD serial on a list, then the program checks.... i guess....
Creating an MD5 hash using hardware serial numbers is a good way to go, since it's a one-way hash, it doesn't jeapordize anything (Though I don't know what you can do to someone just with their hardware info).
Or you could set the program to run only say, 30 times for 10 minutes each time. Keep the number of uses on a file hidden deep in the system somewhere, and use Neolite or such to compress the compiled EXE making it a pain for crackers to edit it.
Public Function DateGood(NumDays As Integer) As Boolean
'The purpose of this module is to allow you to place a time
'limit on the unregistered use of your shareware application.
'This module can not be defeated by rolling back the system clock.
'Simply call the DateGood function when your application is first
'loading, passing it the number of days it can be used without
'registering.
'
'Ex: If DateGood(30)=False Then
' CrippleApplication
' End if
'Register Parameters:
' CRD: Current Run Date
' LRD: Last Run Date
' FRD: First Run Date
Dim TmpCRD As Date
Dim TmpLRD As Date
Dim TmpFRD As Date
'If this is the applications first load, write initial settings
'to the register
If TmpLRD = "1/1/2000" Then
SaveSetting App.EXEName, "Param", "LRD", TmpCRD
SaveSetting App.EXEName, "Param", "FRD", TmpCRD
End If
'Read LRD and FRD from register
TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000")
TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000")
If TmpFRD > TmpCRD Then 'System clock rolled back
DateGood = False
ElseIf Now > DateAdd("d", NumDays, TmpFRD) Then 'Expiration expired
DateGood = False
ElseIf TmpCRD > TmpLRD Then 'Everything OK write New LRD date
SaveSetting App.EXEName, "Param", "LRD", TmpCRD
DateGood = True
ElseIf TmpCRD = Format(TmpLRD, "m/d/yy") Then
DateGood = True
Else
DateGood = False
End If
End Function
'Usage
Private Sub Form_Activate()
If Not DateGood(30) Then
MsgBox "Trial Period Expired!", vbExclamation, "Unregistered application"
Unload Me
End If
End Sub
Ok guys, I have a preliminar version, and the final step is to save a date in some file, my question to you is, where do I save this file? and with what extension? could you point me to a temp folder that will always exist?
What I suggest you do is do things the best best way possible. What you do is this, you give out a trial version, of course. The trial version would be an entirely different program.
I don't mean you do things like stop the program's true functionality to show, I mean you actually remove the code that makes the program's final functionality actually happen.
Then you manually deal with sales through some sort of online shopping cart and then send it out yourself, with a specific serial number that's been hashed twelve times over (with different methods) inside of the actual executable. Make sure there is a way to validate whether the hash is legitimate or no.
Have the program automatically send the hashed information to some server on startup. If the hash is invalid, has some peculiarity, or you get the same hash from lots of computers, you just got yourself a bust. >:)
EDIT: I know this would erquire alot of manual work, but it will make pirating your software a pain in the ass.
There is a way to set the date last modified so you could place it in the system32 folder or somewhere hidden and change the date to prevent somebody searching for it
Hi HELPmyVB, thanks for the 30 day shareware example. I need to creat a shareware process very similiar to that only I need it to be converted into an hours limit instead of days. I'm pretty new to VB6 and I took a long shot at converting it myself but it was unsuccessful. If anyone can tell me how to fix where i went wrong I would really appreciate it very much.
VB Code:
Option Explicit
Public Function TimeGood(NumHours As Integer) As Boolean
'The purpose of this module is to allow you to place a time
'limit on the unregistered use of your shareware application.
'This module can not be defeated by rolling back the system clock.
'Simply call the DateGood function when your application is first
'loading, passing it the number of days it can be used without
ElseIf Now > TimeAdd("h", NumHours, TmpFRT) Then 'Expiration expired
TimeGood = False
ElseIf TmpCRT > TmpLRT Then 'Everything OK write New LRT date
SaveSetting App.EXEName, "Param", "LRT", TmpCRT
TimeGood = True
ElseIf TmpCRT = Format(TmpLRT, "hh:mm:ss") Then
TimeGood = True
Else
TimeGood = False
End If
End Function
'Usage
Private Sub Form_Activate()
If Not TimeGood(6) Then
MsgBox "Trial Period Expired!", vbExclamation, "Unregistered application"
Unload Me
End If
End Sub
When I compile it to test, I get an error at "TimeAdd" it says "sub or function not defined" in the error and i'm not sure how to fix it if possibly at all.
Looking forward to any advice and/or examples. Thanks.
Thanks Hack, but I looked in AllApi's Api Guide and Api Viewer but dont see that in the functions list. Also I changed the script with that information but it starts off saying trial expired. What I need is for it to wait 6 hours or possibly more then expire. thanks again.
Here, I changed the code up a bit so instead of "Last Run Time" I added in "Max Run Time". It seemed to make more sense to me but im still recieving that same expired error right on startup.
VB Code:
Option Explicit
Public Function TimeGood(NumHours As Integer) As Boolean
'The purpose of this module is to allow you to place a time
'limit on the unregistered use of your shareware application.
'This module can not be defeated by rolling back the system clock.
'Simply call the DateGood function when your application is first
'loading, passing it the number of days it can be used without