1

I'm developing a simple software for a professor of mine. Nothing special, it just takes some data from some sites and merge them into a text file that will be analyzed from an R program.

Anyway, he asked me a "particularity": this software will be used by his students but he wants for it to be useless after this weeks of lessons. How can I achieve that? They are not computer science students, so something "simple" should be fine, but anyway I need some suggestions. I was thinking to create a web service, but I'm hoping for something else. I've searched and I could not find something useful for me.

c0der
  • 18,467
  • 6
  • 33
  • 65
Pikappa
  • 181
  • 1
  • 2
  • 11
  • 2
    You can get the date and then stop the program from running/display an error message if the current date matches or exceeds the 'expiry' date – Nick Parsons Oct 16 '18 at 11:03
  • 1
    @NickParsons Pretty easy to bypass if you're relying on the system date. Depends on how secure the OP wants to make it. Pikappa, what would happen if the students work around your solution and do carry on using the application? Will there be ramifications? – Draken Oct 16 '18 at 11:05
  • 1
    @Draken Yeah, I agree. This would be a simple way of doing it. Perhaps if security is an issue this post may help https://stackoverflow.com/a/2817511/5648954 – Nick Parsons Oct 16 '18 at 11:10
  • @Draken they are not cs students. I mean, I think that they barely can use a pc (they re environmental sciences students) but the professor won't to share the sw with others (his is own research). He wants for it to be utilized for the exercises and then to remove it from their pc. Web service is an option but the sw has already be written and there is no time to modify it into a web app and I think that free hosting service is not an option (too limited for simultaneous connections). – Pikappa Oct 16 '18 at 11:17
  • 1
    Just because they are not CS students, does not mean they are not computer saavy. That's why you need to understand what's the worst scenario if the students do carry on using the software after the kill date. The worse the ramifications, the more secure you need to make the app. But you'll need to make a risk analysis and check – Draken Oct 16 '18 at 11:26
  • Good point, but I'm taking it easy because I think that is not a special thing what i've done. The sites where take the data are public, the software just prevents to take them manually, but still nothing special. Just a csv reader and some string comparison to create the txt response file. – Pikappa Oct 16 '18 at 11:36

1 Answers1

2

I had done this for one of my projects.

Created a file on S3 with restricted access. Every time the app is executed, i request for this file. If it exists, i allow them to use the app else System.exit(1).

In your case, you can use this strategy with one file containing the end date, being the date of last class. Fetch current date time from some public API. Everytime the app is launched, fetch this file from S3, parse the end date and check for expiry.

Drawback: In case of No internet, the app will not be usable.

CodeShadow
  • 3,503
  • 1
  • 17
  • 16
  • Good solution! And maybe i can use not a date but a "keyword" decided from the professor, so when he will change that, the sw will not works anymore. Really thanks. – Pikappa Oct 16 '18 at 11:22