Categories
programming

Main is usually a function. So then when is it not?

A break from the usual cybersecurity stories. Here’s a nice one on obfuscated C, if you can call it that.

$ cat test.c
const int main[] = {
-443987883, 440, 113408, -1922629632,
4149, 899584, 84869120, 15544,
266023168, 1818576901, 1461743468, 1684828783,
-1017312735
};
$ gcc test.c -o a.out
$ ./a.out
Hello World!

Yes I tested and it works. Want to know how it works? Here’s the link:
Main is usually a function. So then when is it not?.