If this is meant to prove authorship, then it won't work: anyone can add anything into a text-file.
|
I really hope that the “voodoo code” isn’t intended to be executeble. That would be a security nightmare.
|
the code that is added to other code is intended to have no effect. this can be achieved as strictly being comments. the contents of these comments will be keys and the like or marker to source in a way that if no effort is made to remove what is added it can still be used as if nothing was added. for instance this can be a certificate marking the code as a licensed copy.
|
Then the point stands that you can just do a "find -exec echo >>" operation for each file extension.
The point that "If this is meant to prove authorship, then it won't work" also stands. |
to have a reliable mechanism to validate the files you need to do much more, inserting a voodoo line is not enough.
google for certified archives (if you wish) |
if the files are valid (instances of that language) they should still be valid after adding the lines. insertion in the middle is not a requirement. adding in the front or back (one of) is all that is needed. once the code is extracted, then it "proves" whatever it was meant to "prove". that may, for example, prove the identity of whoever added those lines (by means of the lines containing something particular that is encrypted by that entity using some PKC).
|
Quote:
As stated above: Quote:
|
Quote:
You need a shell script that does the >> for each filename. You can -exec an embedded shell code: Code:
find . -type f -exec /bin/bash -c ' |
Quote:
The problem is that you don't know who added those voodoo lines to the file, when, and if the file was actually intact otherwise. You cannot verify that the voodoo code is actually valid. So you should make sure that any [illegal] changes to the files will automatically invalidate the certificate (otherwise the method is useless). |
Quote:
And let’s be clear: “I need to add stuff to files and check that stuff later” is not a use case. “I need to prove authorship of a file” is. https://www.techrepublic.com/article...inux-with-gpg/ |
Quote:
|
Look, I don’t really know why you’re still posting. If you just wanted a quick, foolproof way to add comments to source code files, we’ve given you that.
|
Quote:
|
Quote:
the idea is to be able to attach a small amount of data to a file that in the context of the file, does not affect the file, but can still be recognized as being there, extracted, decoded, (if needed), etc. my desire at this point is to explore ways to look like comments in a large scope of programming languages. for example, one can begin a line with "#" in Bash or Python (and other languages) to make a comment. |
Quote:
Now... Are you being deliberately vague (to avoid revealing proprietary information, or because you don't want your idea stolen, or whatever), or is this actually how well-formed and specific your idea actually is? (Earlier, I actually stopped myself from wondering out loud if you this was a scheme to hide your porn collection). |
All times are GMT -5. The time now is 06:34 PM. |