I'm not sure the best way to create a demo version of something I did. Can anyone help? Or a 10 time run will be good too. Thank you.
Printable View
I'm not sure the best way to create a demo version of something I did. Can anyone help? Or a 10 time run will be good too. Thank you.
or use the registry. There are many threads about using it. The easiest way would be to use the SaveSetting and GetSetting functions.
:)
could you explain a little more? I'm a bit confused.
Use savesetting and getsetting. Example:
Set your Timer in the general section.
Public Timesran As Integer
In the form_load, get the number of times your program has run. If it has never been ran before then we need to skip the getsetting to avoid an error. If has has been run before then Timesran hsa been saved and we can check it. If it has been ran 5 times then the user will get a Msgbox saying His Evaluation period has expired and the program will end.
Private Sub Form_Load()
If GetSetting("MyApp", "Key", "Timescan") = "" Then GoTo ex:
Timesran = GetSetting("MyApp", "Key", "Timescan")
If Timesran = 5 Then
MsgBox "sorry! Your evaluation period has expired!"
End
End If
ex:
End Sub
In the Form_Unload you save the number of Times the progam has ran.
Private Sub Form_Unload(Cancel As Integer)
Timesran = Timesran + 1
SaveSetting "MyApp", "Key", "Timescan", Timesran
End Sub
you may want to do something to the setting you save so people can't easily change it.
maybe get the windows username and xor it with the setting you save, so it wont be as easy to change.
a simple sample for u leif:
VB Code:
'Author: Reginald Wheat Option Explicit 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 TmpCRD = Format(Now, "m/d/yy") TmpLRD = GetSetting(App.EXEName, "Param", "LRD", "1/1/2000") TmpFRD = GetSetting(App.EXEName, "Param", "FRD", "1/1/2000") DateGood = False '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
go create :)
Yes but very easy to hack application! User go to registry-- change number uses :(
I think he just wanted to show you how to make it, then you need to encrypt it.
Quote:
Originally posted by Daler Mehndi
Yes but very easy to hack application! User go to registry-- change number uses :(
u'r both right :)Quote:
Originally posted by DaoK
I think he just wanted to show you how to make it, then you need to encrypt it.
when it comes to encryption/decryption I suck bigtime.... :(
where is eiSecure when u need him ??? :)
You can make a easy encryption. The registery thing will stop about 15% of user, a small encryption will block about 50% of the other. A small encryption is like : changing the asc letter +1 for exemple. Most of person will not understand than it's crypted and will stop searching because they do not understand at all :D
There's also ActiveLock; try searching for it at http://www.activex.com/ .Quote:
Originally posted by leif
I'm not sure the best way to create a demo version of something I did. Can anyone help? Or a 10 time run will be good too. Thank you.
Turtle and his activelock :rolleyes:
:D
Encprypt / Decrypt:
VB Code:
Public Function Encrypt(sStr As String) As String Dim iLength As Integer Dim sEachLetter As String Dim i As Integer Dim sNewString As String iLength = Len(sStr) 'Added Trim$ to remove any trailing spaces entered 'Encrypt each character in the string For i = 1 To iLength 'Take 1 character at a time sEachLetter = Mid(sStr, i) 'Convert the character to ASCII then add the encryption key then convert that value to a character sEachLetter = Chr((10) + Asc(sEachLetter)) 'Append each encrypted value to a new string sNewString = sNewString & sEachLetter Next i Encrypt = sNewString End Function Public Function UnEncrypt(sStr) As String Dim iLength As Integer Dim sEachLetter As String Dim i As Integer Dim sNewString As String iLength = Len(sStr) 'UnEncrypt each character in the string For i = 1 To iLength 'Take 1 character at a time sEachLetter = Mid(sStr, i) 'Convert the character to ASCII then subtract encryption key then convert that value to a character sEachLetter = Chr(Asc(sEachLetter) - (10)) 'Append each unencrypted value to a new string sNewString = sNewString & sEachLetter Next i UnEncrypt = sNewString End Function
Hey, don't 'diss ActiveLock! It is one of the best/affordable VB solutions for copy protection out there!:) (version 5, that is. v6.0 sucks because you don't control registration process.:D)Quote:
Originally posted by DaoK
Turtle and his activelock :rolleyes:
:D
Anyways, the best way to do it would be to store it in the registry, as well as appened a copy of it (encryped, of course), to the end of your program's executable. This way, when your program runs, it checks both places.
...also helps a bit if it stores a MD5 hash of the EXE at the end of the EXE file.:)
I only understand encryption who work with the asc number of the letter and I do not understand what MD5 and 128 bits encryption mean :confused:
MD5 isn't encryption, but only a "hash" algorithm. What's a hash algorithm, you ask?
A hash is something where you can go from 1 source to the other, but not vice versa. For example, 1+2+3+4+5=15. However, if you are given the number 15, it is hard to arrive at the numbers 1, 2, 3, 4, and 5.
A hash algorithm is like the same idea, except A LOT more complicated.:)
128-bit encryption basically means that's how long your encryption keys are. It does not guarantee security, since a user using 128-bit encryption on file with the password "abc" will be easily breakable.
Someone once said: "If the door's locked, there's always the window.":D;)
2 questions :
1-Md5 : how can you find the pass if it's only one way?
2-128 bits : abc do not have 128 of lenght...how they do to have 128?
MD5: It hashes the input and compares it with the original hashed version.
128-bit: ABCs do not contain 128-bits, but if you put many letters together, along with other characters, such as §, Å, ¶, etc. you get 128-bits. (Yeah, REALLY bad explanation here...:D)
If you want to learn more, read Applied Cryptography by Bruce Schneier.
This stuff is going to take a while for me to pick up. I had originally put in what ARC had wrote. Should I take it out and go with one of these newer suggestions?
thx you EI !!!
Sure, no problem!:)Quote:
Originally posted by DaoK
thx you EI !!!
ARC's idea is a basic implementation of what we have said.Quote:
Originally posted by leif
This stuff is going to take a while for me to pick up. I had originally put in what ARC had wrote. Should I take it out and go with one of these newer suggestions?
If you want better protection, you should go with the appending to EXE and encryption stuff.
Guys... get real. 95% of Comp users have no clue how to search the registry and change things in it. 3% of the 5% left wouldn't know what they were looking for and if the found it would not know exactly how to change it to make it better.
The other 2% you only have to worrie about if it's a big time proggy like VB or Photoshop or something.
If you are working on a company/widley distributed program you will want to encrypt your registry settings otherwise... for a normal VB prog i wouldn't waste my time.
lol....here's 2 questions/statistics for ya:
1. does that survey include adults? If it does, then it's HUGELY biased.:D
2. Did you know that 85.4% of all statistics and figures have no scientific base, and are made up as you go along?;)
No actualy that is going on myself and everyone i know as well as knowing that Most people are computer illiterate. By computer illiterate i mean they can work AOL and Excel and Word but as far as digging into the registry... no way. I know how to save and get from the registry but even I as a programmer wouldn't know how to look in there and reset a programs time used setting. I think i know a hell of alot more than "most" people. So My Percentages are based on common sense not just grabed out of thin air.
I'm sorry, but from people I know/have met, there are A LOT of people who are good at computers.
Many adults don't get them, but almost all kids have a pretty decent knowledge of computers.
Judging from my friends (no, they're not geeks/hackers:D), I'd say that your solution will provide a VERY low level of security, since even my little brother (4 years old) knows how to turn on computer, log on (we're using Win2K), open IE6, go to shockwave.com/run Red Alert 2, and beat the computer.
IF you hide your stuff in the registery with a weird name and in a weird place no one will find it :)
*ahem*RegMon*ahem*
You can use number : 9293217 no one will know it's your program :)
I can say one thing - whatever software method you use it will be cracked.
I used MD5 with some extras thrown on top and a keygen was out in the crack world in a few weeks.:(
But, you have to kind of expect it. All you can do is change the keygen around every other release, so at least it makes it a little harder for people who have a cracked copy to be able to use the "latest" version. Plus, you don't want to make it too inconvenient for all the legit folks out there.
-QuaffAPint
==============================================
Hey, don't 'diss ActiveLock! It is one of the best/affordable VB solutions for copy protection out there!
==============================================
To eiSecure about activelock:
Affordable - YES
Best - COMPLETELY WRONG (if you want to know why I can explain)
?Quote:
Best - COMPLETELY WRONG (if you want to know why I can explain)
What do you mean by '?'
Ok, so lets say that text was encrypted. It contained a bunch of mush characters along with the text. For instance...
H§ELÄ__§LO
Would you have to make a "filter" if you wanted to read the text?
Tell it not to display all the mush chars, and just the reg alphabet????
Im trying to figure something out, and this may help me. Bare with me ;)
? = question = i do not understand = d'uh
You don't need to explain me the question mark :). Didn't you understood my sentence or didn't you understood why I said that?
Bottom line: Activelock can be easily cracked (stupid thing is that you can crack it without debuggers and disassemblers; you only need vb)