 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Mar 10, 2006 5:24 pm Post subject: |
|
|
Well, store the date of the last run somewhere more or less hidden. You can perhaps change the time stamp of the exe.
If the current date is before the last run date, don't update this date, and cry "CHEATER!"... _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
Stefan16 Guest
|
Posted: Sat Mar 11, 2006 12:27 am Post subject: |
|
|
PhiLho: Do you know how this can be done? Do you have any script on that? |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Sat Mar 11, 2006 12:42 am Post subject: |
|
|
You could build a low-key rootkit/DRM system with AutoHotkey and bundle it with your app. By this I mean using a combination of encryption, registry editing and creating use log files.
In my opinion, there is no point trying to reinvent the wheel. There are many installer programs that provide this kind of protection. A famous one is Installshield (overrated), but google it and see how many you can find. If Microsoft apps can be cracked within days, a native AutoHotkey security system is bound to be exploited before you know it. Therefore it seems logical to use professional third-party software along with your compiled scripts. _________________
 |
|
| Back to top |
|
 |
Stefan16 Guest
|
Posted: Sat Mar 11, 2006 12:49 am Post subject: |
|
|
| Titan, it could be crackd, this is not my point. I just would like to have a more or less "perfect" soulution without that someone change the clock and the proggy is working again. By the way, I have look on Installshield, it is not freeware. If I'm looking for this kind of installer, what I have to look for? |
|
| Back to top |
|
 |
mrclox
Joined: 12 Nov 2006 Posts: 29
|
Posted: Mon Mar 19, 2007 6:23 pm Post subject: |
|
|
just read the beginning part of this thread. and so this suggestion may have already been suggested or surpassed .
i wrote a script which using urldownload to file to get the date from a webpage on the internet instead of from the system clock, this stopped people changing the clock but required internet access to run |
|
| Back to top |
|
 |
mrclox
Joined: 12 Nov 2006 Posts: 29
|
Posted: Tue Mar 20, 2007 9:22 am Post subject: |
|
|
| Code: | urldownloadtofile,http://www.sportinglife.com/,date.txt
fileread,date,date.txt
pos:= instr(date,"clock")
pos += 13
stringmid, date, date,%pos%, 8
msgbox %date% |
for instance this will get todays date from the internet you could then compare it with your date |
|
| Back to top |
|
 |
L-Cartinine
Joined: 28 Nov 2007 Posts: 56
|
Posted: Wed Feb 06, 2008 10:01 pm Post subject: |
|
|
| Stefan16 wrote: | | The last script is very good, problem only that if you turn the date back, the software is working again. |
This is better updated for 2008 Febuary if you put <> instead on the year and month then if they go forward or back on the month or year it won't be working. Only trouble is you get less than 30 days if it not the start of a month.
| Code: |
CheckExpiry:
FormatTime currentYear, , yyyy
FormatTime currentMonth, , M
MsgBox Y: %currentYear%`nM: %currentMonth%
If ((currentYear = 2008 and currentMonth <> 2) or currentYear <> 2008)
{
MsgBox Beta version expired`nContact author for new version.
ExitApp
} |
|
|
| Back to top |
|
 |
L-Cartinine
Joined: 28 Nov 2007 Posts: 56
|
Posted: Wed Feb 06, 2008 11:21 pm Post subject: |
|
|
So this is better solution still, giving exactly 30 days. Any date outside of Start or Expiry will prevent it running. It still not perfect as they can change the date to a date between these times to keep it running. Ideally better not to use date but use a modified or created date stamp of a common file on there system.
| Code: |
CheckExpiry:
FormatTime, Today,, yyyyMMdd
Start = 20080206
Expiry = 20080306
If (Today > Expiry or Today < Start)
{
MsgBox Beta version expired`nContact author for new version.
ExitApp
}
|
Last edited by L-Cartinine on Thu Feb 07, 2008 12:04 am; edited 1 time in total |
|
| Back to top |
|
 |
littlebut0
Joined: 22 Dec 2005 Posts: 33 Location: Belgium
|
Posted: Wed Feb 06, 2008 11:40 pm Post subject: One other sollution |
|
|
I just saw this forum by coïncidence. I m thinking about doing the same thing
with one of my own scripts. This script needs internet access in order to function correctly.
There is a tiny utility (cmdtime3.exe) which forces the computer to synchronize with a timeserver on the internet. Chech this forum http://www.autohotkey.com/forum/topic2773.html to see an example of how to use cmdtime3. This prevents the user of messing up the systemtime.
Additionally, you can capture the output of cmdtime3, using cmdret.dll
This can be very usefull in case the user has prevented cmdtime3 from accessing the internet, by setting up a firewall rule for it. Just play with it, set a firewall rule for it and see what the output of cmdtime3 looks like in case access to the internet is denied.
Additionally you can check if the user is connected to the internet when the script launches,by using this few lines of script: | Code: | ConnectedToInternet(flag=0x43) {
Return DllCall("Wininet.dll\InternetGetConnectedState", Str,flag, Int,0 )
}
if ! connectedtointernet()
{
msgbox, please make a connection with the internet and try again
exitapp
}
| If not connected, the timeserver is unreachable and the timecheck can not be executed. In this case you can notice the user that he has to connect to the internet prior to launch the script. Not fully waterproof, but almost impossible to screw up the systemtime. |
|
| Back to top |
|
 |
L-Cartinine
Joined: 28 Nov 2007 Posts: 56
|
Posted: Thu Feb 07, 2008 12:14 am Post subject: |
|
|
| PhiLho wrote: | You can perhaps change the time stamp of the exe.
If the current date is before the last run date, don't update this date, and cry "CHEATER!"... |
Nice idea but you can't change the TimeStamp of a exe of it self while it running in memory. It have to be another file not running.
@littlebut
not bad but what if a legitamate customer can't connect to the net? are you going to expire his software too? it's ok if the software is internet software then they got to be on the net. It best not to rely on one solution but several. Put so many different checks in your software all over the place even the cracker will find it tiresome. The software will not slow down. |
|
| Back to top |
|
 |
L-Cartinine
Joined: 28 Nov 2007 Posts: 56
|
Posted: Fri Feb 08, 2008 7:53 am Post subject: |
|
|

Last edited by L-Cartinine on Fri Feb 15, 2008 6:49 pm; edited 2 times in total |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Feb 14, 2008 4:42 pm Post subject: |
|
|
@L-Cartinine
he point is not to make it work for 1 specific month. what they are trying to do is make it work for one month "Any month".
As per
If you install it on march 10th it will work until april 10th
I like that your trying to solve the issue at hand but knowing what you are trying to solving helps.
As per me I have no easy solutions that have not been mentionned.
all of which anyone with 2 bits of computer knowledge will be able to break. |
|
| Back to top |
|
 |
L-Cartinine
Joined: 28 Nov 2007 Posts: 56
|
Posted: Thu Feb 14, 2008 4:54 pm Post subject: |
|
|
@guest
using hidden registry keys is not very secure as FileMon can detect these locations
Last edited by L-Cartinine on Fri Feb 15, 2008 6:49 pm; edited 1 time in total |
|
| Back to top |
|
 |
Firewolf91
Joined: 19 Oct 2007 Posts: 127 Location: PA
|
Posted: Thu Feb 14, 2008 9:01 pm Post subject: |
|
|
i had my own idea for trial version software. i'm not sure how fool-proof it is or how well it works, but it seems to do just fine so far.
basically, u include an EXE file that creates an environment variable and then closes. the main script launches the EXE and waits till it closes, then the EXE reads it's own creation date (this does not change if someone cuts and pastes elsewhere, copies elsewhere and then copies it back and overwrites, etc.). the EXE then sends its creation date to the EnvVar, which is read by the main script, adds 30 to it (for 30 days) and compares to the current date.
if the file doesn't exist, the script doesn't run. if the creation date is older than 30 days, it tells you it has expired.
the only problem is wrapping for months/years.
i.e.
what if it's 05/01/08? 30 days later is 05/31/08. No problems.
the program sees it as 20080501+30 = 20080531, which is correct.
what if it's 02/01/08? 30 days later is 03/02/08. (depending where you start the count and leapyear. this is a leapyear, otherwise it would be 03/03/08 )
the program sees it as 20080201+30 = 20080302. (in the expression yyyyMMdd --> if EXEdate = CurrentDate) The EXEdate + 30 will be 20080231 (which doesn't exist) and therefore will be LESS than the current date on march 1st rather than the 2nd or 3rd. in this case, regardless of when in feb the EXE was created, it will always expire march 1st.
to prevent this, i was going to do a check on the calculated result of EXEdate+30, but i wasn't sure if there was a way to convert 20080231 into 20080302...without doing an If (EXEdate > 20080200 And EXEdate < 20080230 [for leap, 0229 for non-leap] ) for every month, plus using the variable for the yyyy (year), because you dont want to write the same if expression for the year as i mention here for the month. lol...
hopefully this isn't too confusing, but i'll let ya know if i make any worthwhile progress on the month roll over bug in my script. if anyone sees this and has an idea, i'd love to see it.
lastly, while the 30 day trial would be in effect...if it's a download, all they have to do is redownload it and it will create a new EXE with a new EXEdate. as of yet, i haven't come up with a good way to combat this easily without writing to a file.
if you'd like the code i have so far, i can post it, but i'd like to work on it a little more before i do that...but i won't mind posting it if anyone wants to play with it. |
|
| Back to top |
|
 |
Firewolf91
Joined: 19 Oct 2007 Posts: 127 Location: PA
|
Posted: Thu Feb 14, 2008 10:15 pm Post subject: |
|
|
| oh, i just realized i didn't specify...when i say current date, i mean check on the web. local time is too easy to change around. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|