Make a CD run once
Asked15 years ago
Viewed1184 times
1
Question Body:

We're doing an "Amazing Race" kind of event, and thought it would be cool to have CDs that could only play once... like a "this message will self destruct in 5 seconds..."

Any thoughts on how to do this? I was thinking it could be a compiled HTML website that would write a cookie and only play once. I don't want to write to the registry (don't want to depend on windows, don't want to install anything, etc).

I also don't care if it's hackable... This is a one-time fun event, and I don't really care too much if people could remove the cookie or something.

Any other ideas?

Edit
avatar
asked15 years ago

    Leave a Comment

    [named hyperlinks] (https://example.com)
    **bold**
    _italic_

    10 Answer

    0

    If the content is HTML and run inside a normal browser window, then a cookie may work but there are caveats:

    • User runs the CD once when IE is the default browser. User runs at a later time, when Firefox is the default browser so cookie cannot be checked.
    • The browser's security settings may be locked down to prevent use of script so the cookie cannot be set (more of an IE problem).

    An alternative might be Flash's equivalent of cookies, but if script was locked down then the same may be true for Flash.

    Edit
    avatar
    answered15 years ago
    0

    Not quite what you're looking for, but you could put in on re-writable media and have an executable over-write itself (or part of itself).

    I don't know if a CD-RW could do that automatically, or if you would have to look at cheap USB sticks.

    Edit
    avatar
    answered15 years ago
    0

    Will the computers this is run on have internet access? You can easily load up a remote url (execute 'start http://yoururl.com' from autorun.inf), store the cookie and prevent it from being loaded again if the cookie exists.

    Edit
    avatar
    answered15 years ago
    0

    I would say encrypt (part of) the contents of the disc with a unique one time pad, that you request from a server that does a read directly followed by a delete of the decryption key. You could write an identifier on each disk so you can use multiple disks, each with a unique key.

    This requires network access and some encryption tools, but a very simple implementation would do what you want it to do, is feasible, and it would be 'unbreakable' unless the one time pad is captured and stored.

    If just for fun, this should be secure enough.

    Edit
    avatar
    answered15 years ago
    0

    If you used Flash to create the content, you could then use a wrapper program such as Zinc to produce cross-platform executables of the content.

    Then, the Flash could use its version of cookies (local shared objects) to determine when the content has been displayed - write to the LSO the first time and read from it thereafter.

    Edit
    avatar
    answered15 years ago
    0

    If it's allowed to be hackable, then I'd just go with a simple solution of HTML + JavaScript, requiring (say) a GUID to enter, with some silly obfuscation in the code to validate the GUID.

    What I mean by silly obfuscated validation is something like putting together a big array of ROT13'ed GUIDs, then adding code to only accept the Math.floor(PI * E + 32/(new DateTime()).getYear())'th GUID in the array, and ROT13 it again using sufficiently uncommented/unclear code, then check the user input against the result. Do it all in one line for kicks, or generate the GUIDs in some pseudo-random manner using a known seed... you get the idea :).

    The only snag might be if IE doesn't allow local JavaScript? Hmm, looks like they'd need to deal with the InfoBar thing :(.

    Edit
    avatar
    answered15 years ago
    0

    You could also set a registry key that would prevent playing, though this could be bypassed.

    Edit
    avatar
    answered15 years ago
    0

    I think your best bet is to use Rewritable media for this. You can create your application easily, like HTML site or something like that, and after the last link or last page, however you decide to do you could execute a script with some command-line burner that would erase the rewritable media, or even write an ISO that you keep in CD with a text file or a flash that explains that the CD is lost forever.

    Give a look at some Command Line Burners. Linux have several, that isn't worth to mention here, for windows you can use Cheetah CommandLine Burner among several others.

    If you wish to do a CD without depending on the installed OS you should give a look at LIVE CDs. FreeDOS is a choice for "DOS Compatible applications" or my suggestioon you use a Linux live CD.

    Also you will have several options for small HTTP servers, like lighthttpd and even browsers in several flavors from text interfaces to the graphical ones.

    Good luck on the race :D. Great idea BTW!

    Edit
    avatar
    answered15 years ago
    0

    Make a Java Swing application. That will not require Internet and it runs on Mac, Windows, and Linux. You can write to the file system for the lock. System.getProperty("user.home") gives you the home equivalent for the platform. You might have to include a jre in your CD.

    Edit
    avatar
    answered15 years ago
    0

    You can create a volatile registry entry. It will only exist untill the computer is restarted. This solution is very much "hackable", but it is simple and may suffice for what you want to do.

    Take a look at the REG_OPTION_VOLATILE here.

    Edit
    avatar
    answered15 years ago

    Your Answer

    Drop files here or click to upload.
    undraw-questions

    Disilab for your Teams

    – Collaborate and share knowledge with a private group.

    Create a free Team