NOTE: The prequel to my question has been answered before here

In the case of the question linked above, the author's code was available. But I would like to know if it is possible to reveal the code from a demo when the source code is not made available.

Example demonstration file can be found here.


How to release MMA demo files (NB or CDF) for distribution among class, and make sure that the user will not be able to see the back-end code by employing the technique as shown in this post answered by Jonathan

UPDATE: A comment from @Szabolcs

@Szabolcs "Select the manipulate, copy to another notebook, convert to input form there. But what's the point of this if the author code is available already?"

How do I restrict this? I do not want to reveal the code at all for my Manipulate. I just want to publish the demonstration alone using a notebook file.



closed as unclear what you're asking by Daniel Lichtblau, MarcoB, user6014, José Antonio Díaz Navas, bbgodfrey Feb 18 at 21:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Select Source -> Download Author Code... I see the source code immediately. $\endgroup$ – user6014 Feb 14 at 15:12
  • 1
    $\begingroup$ It seems that OP intends to crack a code that is not shown by its author by intention, is it not? $\endgroup$ – Alexei Boulbitch Feb 14 at 15:57
  • 2
    $\begingroup$ Select the manipulate, copy to another notebook, convert to input form there. But what's the point of this if the author code is available already? $\endgroup$ – Szabolcs Feb 14 at 19:31
  • 4
    $\begingroup$ Please do not change the question. Open a new thread for a new question. Now the existing answers do not fit. $\endgroup$ – Szabolcs Feb 15 at 15:13
  • 1
    $\begingroup$ BTW look up Encode and be aware that Mathematica is not terribly secure. A determined person may still be able to unlock your code. Example: With[{str = StringToStream[ "(*!1N!*)mcm\naZQzYV \ j/%/5#f$s@#K6cMR2?v\\ttttx`jv3._KTTV[VBmahZpd_!a8k!l+#+B'?kP,,>2\n\ nfplO6uDiA1Qpsg<h.E!oKc?\";(\\0 Yyhf(, "]}, Get[str]; Close[str]; ]. It defines fun upon evaluation. $\endgroup$ – Szabolcs Feb 15 at 15:14

One method that I think works is to highlight the demonstration, copy it to a new Mathematica notebook, and then click "Convert to Input Form" on the cell.

Convert to input form.

The result of convert to input form.

  • $\begingroup$ Yes, so this is exactly what I want to restrict the user from doing so. Most Wolfram Demo have source code available, I want to release my own demo files to my peers without them able to do something like what you showed. Is it possible? If so how is basically my question. $\endgroup$ – Rene Duchamp Feb 15 at 14:26
  • $\begingroup$ @abhilashsukumari if you wanted to ask about how to restrict access to the source code you should have asked about how to restrict access to the source code. Try asking that as a separate question. $\endgroup$ – b3m2a1 Feb 17 at 1:50

In the very end of the CDF document there find a button "Download source code". By clicking that you will have a Mathematica 11.2 notebook with the source code.

enter image description here

  • $\begingroup$ Read the NOTE in my question. I am specifically trying to see if it is possible to retrieve code when there is no explicit source code provided. $\endgroup$ – Rene Duchamp Feb 14 at 15:42
  • 2
    $\begingroup$ It would be easier to respond if given an actual example of such a Demonstration. $\endgroup$ – Daniel Lichtblau Feb 14 at 20:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.