Rating:

Go to the given website, and see that it is an online c-code compiler.

Run the given sample code and see that it actually tries to compile code.

Take advantage of the pre-processor by trying to include a common flag file name, "flag.txt":


#include </home/ctf/flag.txt>


And then click the compile/submit button. It spits out the file contents as it's not valid c code, and we get the flag in the process. Note, the < and > are required for this specifc implementation.