Forums > MaxMSP

protection / stop a standalone from working after a certain date

January 13, 2014 | 6:54 am

Hello all,

I know there is alot of discussion on the forums regarding the security of max standalones, but I was wondering if anybody had any ideas of ways to stop a max patch from working after a certain date / after a certain amount of use?

I was trying to use the "date" object to control a dac (which would not switch on after a certain date – however the date object reports the computer clock – which can be easily altered.)

Any ideas?

Any help is much appreciated!

Andy


January 13, 2014 | 7:16 am

You could code a ntp client in mxj.
-> http://support.ntp.org/bin/view/Support/JavaSntpClient

p


January 13, 2014 | 7:56 am

That looks way above my head!

Andy


January 14, 2014 | 3:25 am

I don’t know much about Java, but maybe the attached files will work for you (put the folder somewhere in the search path). It surprisingly does for me (Max 6.1 under MacOSX.9.1)!

I didn’t spend time changing the format returned by the Java class, but it’s easy to do within Max. Don’t forget you need an internet connection if you want to use this technique.

Good luck,

p

Attachments:
  1. NTP.zip

January 14, 2014 | 10:38 am

Thanks so much Patrick, this is perfect!

Do you know if it will also work on Windows too?

Andy


January 14, 2014 | 11:40 am

I suppose it should work (that’s what’s nice with Java) but I can’t test it.


January 16, 2014 | 6:25 am

Off the top of my head: why don’t you simply loadbang a [time] object and compare the output with some fixed value? If [time]‘s output is past your best-by date, then send a ‘;max quit’ message. Bob’s your uncle.

I really don’t see a need Java for this. But don’t let that stop you.


January 16, 2014 | 6:48 am

Hi Peter.

A time object? Do you mean date?
Andy was afraid his users would change the OS’ system date (don’t tell me you don’t know this old trick :-), that’s why I proposed ntp. Or did I miss something?


February 17, 2014 | 12:09 am

Hi again Patrick, thanks again for your help with this!

The NTP object works perfectly, just one question though, it seems to work in patchers and collectives but not when its part of a standalone – any idea why?

Andy


February 17, 2014 | 3:13 am

If you want to build a standalone with some Java, you need to include a couple of files in your standalone, Max won’t do it for you. If you’re on a Mac, ctrl-click your standalone and open the package.
Then go to Contents/Resources and there copy the following files from your /Cycling ’74/java folder:
max.java.config.txt ;
the lib folder (keep only the max.jar file);
the classes folder (all the stuff there is probably useless in your case) where you’ll also have to copy NtpMessage.class and sntpMaxClient.class
It should look like the inluded screenshot.

Attachments:
  1. Screen-Shot-2014-02-17-at-12.11.19

February 17, 2014 | 3:32 am

Thanks again Patrick, really appreciate it,

I wonder if anyone knows how to do the same for Windows…………………

Andy



February 18, 2014 | 4:34 am

Sorry for the confusion earlier, yes, of course, I meant [date].

Yes, I know that users can change the date/time setting on a computer, but this has become much more of a pain-in-the-arse for users than it was thirty years go. Nowadays it means turning off automatic time check (which most people rely on for any number of things, not least among them the automatic handling of the change between Summer and Winter Time). What I was suggesting was a simple method that will discourage about, oh, 99.44% of users from using the patch after the best-by date.

An NTP-based solution may catch the other 0.56% of users. But it also requires a network connection and a compatible Java install (do not get me started on the problems of Java incompatibilities).

Choose your poison.



dtr
February 18, 2014 | 6:13 am

Diablodale implemented a time limit in his dp.kinect external. Not sure how it works but you could ask him.


February 18, 2014 | 10:32 am

What message would you send a standalone so that it only runs one time?

e.g sfplay~ –> fadeout –> bang message to cripple standalone


June 17, 2014 | 1:01 am

Hi Guys.

I managed to get the system working using the NTP idea.

The only thing that I can’t figure out is the fact that the external (NTP) will not work when built into a standalone, but will work in a collective – any ideas?

Thanks,

Andy


Viewing 16 posts - 1 through 16 (of 16 total)