5 ms·
C code that can be “compiled” by sha384
- glandium 12y ago"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.
- aardshark 12y agoThank you, I was wondering how this could possibly work.