News for hackers. Stuff that matters.
Re:C code that can be “compiled” by sha384 by glandium on Monday September 15, 2014 @07:13AM (#8318174)
"sha384 was chosen because it is possible to fit an ELF binary into sha384 digest"

Except none of the sources have a sha384 that ends up being an ELF binary.

In the first example, the important thing is that the sha384 digest starts with 0a23, so "\n#" so that this essentially "compiles" to an empty shell script.

In the second example, the digest starts with 2e202a0a, which is ". * \n", so it only really works because the source, 0.c, is the first file in the directory, and is both a sourceable shell script and a C source file. Remove it, and the trick doesn't work anymore.

In the final one, the trick is similar, but the digest starts with "sh * \n" instead.

EDIT: asterisks are inconveniently turned into italic formatting. Consider all asterisks in this post as not followed by a whitespace.

Re:C code that can be “compiled” by sha384 by aardshark on Monday September 15, 2014 @10:07AM (#8318942)
Thank you, I was wondering how this could possibly work.