0

I want to create some simple copy protection for my program, I want my program could be run only from original read-only optical disc (CD/DVD), my question is:

  1. is there any unique number for each optical media that I could check against my program?
  2. is there a simple way (or C++ snippets) to programatically check whether my program was launched from optical disc instead of writable disk?
  3. is there any copy protection scheme that you know i could use, but i prefer end-user doesn't need to input any serial number, need internet access or use some usb-dongle.
uray
  • 11,254
  • 13
  • 54
  • 74
  • Voted to migrate to Programmers.SE, but I think it is a duplicate there and the outcome was, that it's just not worth it as everything that someone *wants* to be cracked *will* be cracked. – Xeo Jul 02 '11 at 20:14
  • 2
    I think the sourcecode for CSS is publically available, which is a successful copy protection and revenue assurance mechanism for DVD content. You should just implement that! – Kerrek SB Jul 02 '11 at 20:15
  • it doesn't need to and i don't want to make un-crackable software, it's just a form of formality to our requirement spec from customer. – uray Jul 02 '11 at 20:18
  • 1
    Just because you do not like DRM does not mean this is a bad question. I think this is a valid question that has potential real answers that can point to libraries to do forms of DRM (I personally do not know any but I would like to). +1 to offset the -1 – Scott Chamberlain Jul 02 '11 at 20:20
  • that CSS is too heavy, I just need light protection to protect it from "non-computer literate user" – uray Jul 02 '11 at 20:34
  • 1
    uray, the real answer is [Content Scramble System](http://en.wikipedia.org/wiki/Content_Scramble_System) it is the DVD copy protection that has been broken open and is fairly useless today. – Scott Chamberlain Jul 02 '11 at 20:34
  • @scott: well it doesn't need to be useful, what i need is it has copy protection, even if it is just a dumb protection. I don't really need it to be a burden to user. – uray Jul 02 '11 at 20:39

2 Answers2

2

No. You didn't specify an operating system, but I know of no operating system in common use that ties the state of your code in virtual memory back to the medium it was launched from. Once your program is running, the whole concept of 'where was it launched from' is generally not well-defined.

You tagged 'dongle'. Requiring a USB key, or some particular media, is possible, but you can't guarantee that the code launched from it.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
  • 2
    Wow, there is no way at all to detect if the CD is present? Man somone should tell the guys at [SecureRom](http://en.wikipedia.org/wiki/SecuROM) – Scott Chamberlain Jul 02 '11 at 20:31
  • I don't want to use dongle, so is there any information on dvd, such as volume id, media serial that i could check? – uray Jul 02 '11 at 20:32
  • @scott: that mechanism to detect if the CD is present would be useful, do know how to do that in C++ or is there any library for it? – uray Jul 02 '11 at 20:43
  • @Scott: I think the guys from DaemonTools already told them :-) – Kerrek SB Jul 02 '11 at 20:53
  • @scott. Read what I wrote. 'some particular media' includes a CD. – bmargulies Jul 02 '11 at 23:36
1

Short answer: "No", Longer answer, In order to be able to run your program the computer must read it all. There is no simple effective way you can tie the program to that physical disk.

IanNorton
  • 7,145
  • 2
  • 25
  • 28
  • yes of course it need to be read, but my program doesn't need to write to disk, this is why i need to check whether my program was run from read-only media – uray Jul 02 '11 at 20:22
  • Yes, you can do that, but you can't tell they've just copied the CD or are running from an ISO image. There is little point in worrying about this, massive games companies either require users to authenticate with thier servers when they start the program (starcraft2, steam etc) or just don't bother. – IanNorton Jul 03 '11 at 08:02