13

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?

Nathan DeWitt
  • 6,511
  • 8
  • 46
  • 66
  • We currently don't have any content at all. My other thought was a Silverlight/Flash application on a USB drive, but CDs are a ton cheaper. – Nathan DeWitt Apr 18 '11 at 20:13
  • This could be exactly what you want if your participants have internet access. [http://www.destructingmessage.com](http://www.destructingmessage.com/) – qwertyuu Sep 08 '08 at 01:02

10 Answers10

4

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.

Brian Lyttle
  • 14,558
  • 15
  • 68
  • 104
4

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.

Raleigh Buckner
  • 8,343
  • 2
  • 31
  • 38
  • Zinc is $350. I'm looking for easy and cheap. Sorry I didn't mention it earlier. If I make a Flash app, can't I also include a runtime or something on the CD for OS X, Win, & Linux? – Nathan DeWitt Apr 18 '11 at 20:11
3

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.

Kamiel Wanrooij
  • 12,164
  • 6
  • 37
  • 43
  • that's a good idea, but I don't think people will have internet connections. This is like a scavenger hunt... they'll be outside and walking around. – Nathan DeWitt Apr 18 '11 at 20:14
3

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.

Nick Zalutskiy
  • 14,952
  • 7
  • 53
  • 50
  • I can't control the platform this will run on, so it might be OSX, Vista, Linux, etc. I might not be up to the task of writing a multi-platform application like this (would Java be able to do this?) – Nathan DeWitt Apr 18 '11 at 20:15
2

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.

John Sheehan
  • 77,456
  • 30
  • 160
  • 194
  • probably no internet access. I'll confirm that though. If they have internet, then I can just make a website and control who can see it that way, maybe by giving them a unique code or something. This is a puzzle-ish activity, so I could totally generate some GUIDs and then have them enter that to view the content. On the server-side I can only allow a GUID to view the content once. – Nathan DeWitt Apr 18 '11 at 20:10
2

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 :(.

Domenic
  • 110,262
  • 41
  • 219
  • 271
2

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

UnkwnTech
  • 88,102
  • 65
  • 184
  • 229
  • setting a registry flag limits this to Windows. I suspect there will be a good number of Mac users out there, though probably no Linux laptop users for this event. – Nathan DeWitt Apr 18 '11 at 20:11
2

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!

Fernando Barrocal
  • 12,584
  • 9
  • 44
  • 51
  • A self-destructive executable on a CD-RW would be awesome! Can an application automatically access the CD burner like that? – Nathan DeWitt Apr 18 '11 at 20:12
2

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.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319
1

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.

pc1oad1etter
  • 8,549
  • 10
  • 49
  • 64
  • We currently don't have any content at all. My other thought was a Silverlight/Flash application on a USB drive, but CDs are a ton cheaper. A self-destructive executable on a CD-RW would be awesome! Can an application automatically access the CD burner like that? – Nathan DeWitt Apr 18 '11 at 20:15