Ol' School bypass trick for system time

MattK23

Registered User.
Local time
Today, 11:47
Joined
Mar 3, 2009
Messages
13
I have a form that has a button that I would like to disable once the time passes 4pm on a certain date. In the ol' days there was a hack where you could simply change the system time to several years back and it would bypass an application's serial code's validation. I believe someone could do this as well for the button since the only way I know how to implement this is to set it to check against the system time. i.e. They could change the system time to an advanced date/time so that the button is enabled.

1. I do not have time to waste to implement this, so I was wondering if anyone knew this to be true.

2. Does anyone know an alternative solution to disabling the button against a certain date/time?
 
TBQH, I'm not sure what is your goal with this. At first I thought you wanted it to disable after a certain time of the day perhaps to restrict data entry for the end of day but now it sounds more like you want to disable a button as a part of trial software packaging... Knowing the intention would certainly help us provide accurate & helpful advice.

But here's my guess:

Assuming the former, it's simple as using Current event of the form in question to do a check:

Code:
If Time > #04:00:00 PM# Then
   Me.Mybutton.Enabled = False
Else
   Me.Mybutton.Enabled = True
End If


But if it's for trial packaging, then the reliable & foolproof (?) way would be to retrieve time from a site that gives out time (e.g. time.gov for instance) and read the time from there so there's no way for user to fool the expiry date by setting system time back, though it's possible that they can spoof the site, but that require considerable more expertise than merely knowing where the Date/Time properties are.
 
Thanks for the quick reply. The form that the button belongs to is a timesheet that an employee will fill out. The button would serve as an Approval of their timesheet because it would export a PDF report with timestamp of this timesheet to a folder. The last part is just hypothetical right now but the logic is that the button would only be active until 4pm on the date that the timesheet is due. My issue is that the user could possibly alter the system time so that the button is enabled when it shouldn't be.

Your suggestion on retrieving the time from a website is intriguing. Any idea on how to even start? I will research in the mean time.
 
i would be inclined to store the time/date you are checking in a registry key (or a hidden text file) - maybe use some simple encryption on it, to change it to a different figure.

even if a user realised what you were doing, he would be unlikely to crack your encryption when he only has 4 bytes to work with
 
Another thought is to create a file using the File System object. Don't put it in an obvious place. If you have a method of hashing or checksumming or something else, build a checksum of the date and time string as ASCII and store that as the only entry in the file. Next time you try to run your program, if the file exists and this test passes, delete and rebuild the file. (It doesn't have to have much in it, really.)

When you want to see if the clock has been wonkered, use the File System object to find the creation date of the file. Then look at the contents of the file. If you compute a checksum for the creation date and something is hinkey about it, abort the process. In particular, if the date has been set back, the creation date on the fill will be in the future.

That's the SIMPLE way to do it. More complex ways existing using SSL or OpenSSH hashing algorithms to generate a digest of the time string so you can validate it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom