-5

I'm creating custom a licence module for my java application Every licence have start date and end date, And I validate if the end date is >= the current date I want to avoid that the client may change his system date by getting a global date even if the client machine have no internet connection

I've tried Joda API, nanoTime with no lick

Is that doable ?

Thanks,

  • 1
    From where do you expect to get that date if there is no internet and the system date has been changed? – Tom May 04 '17 at 23:11
  • 1
    You're asking how to retrieve information from the Internet while not connected to the Internet? – Dawood ibn Kareem May 04 '17 at 23:14
  • the user should scan the front page of a newspaper every day to unlock the software. you can use ocr to get the date string. a user might find a stack of old papers in the garage and cheat a little. but surely within days they'll run out. you could probably even arrange kickbacks from local papers if your users are concentrated in certain locales. – djeikyb May 04 '17 at 23:18
  • See also [get current date without caring of the system date.](http://stackoverflow.com/q/39199544/642706) and [How can I ensure in Java that the current local time is correct?](http://stackoverflow.com/q/32194245/642706) – Basil Bourque May 05 '17 at 01:48

2 Answers2

0

What you are asking is not possible. But You can try something else to achieve your goal.

1- Make internet conneciton mandatory for you software to run or check date whenever internet connection is on.

2- Save current date to db or a file securily whenever your software exit. And check this date when your software start. If systems current date is before your saved date, you can understand system date is changed. At this point you can un-licence the software or ask for internet connection. It could still be fooled but this can give you some ideas.

3- Use dongle for licencing. You can find information here

barbakini
  • 3,024
  • 2
  • 19
  • 25
0

there is no way to prevent drm circumvention via clock tampering, unless you are willing to lock down your application if it can't phone home to verify that the license is still valid. see How to prevent usage of expired license through system clock tampering?

Community
  • 1
  • 1