
Description
Aren't you tired of rust? I found the perfect solution for you! Welcome to Rugină. Since there is no compiler for it yet, I made one for you.
Solve
The compiler replaces principal { ... } with a fn main { ... } function and then runs rustc.
All compiler errors are shown back to us in the browser.
That means we can abuse Rust compile-time macros:
include_str!("/path")reads a file at compile timecompile_error!(...)stops compilation and prints a message
So if we wrap the flag file in compile_error!(include_str!(...)), the compiler error will literally contain the file contents.
Final payload:
principal { compile_error!(include_str!("/flag.txt")); }
