1 2 3 4 5 6 7 8 9 10 11 12 13
#include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main() { std::ifstream ifs("t.cpp"); std::cout << ifs.rdbuf() << std::flush; system("cpp ./t.cpp"); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "prelude.h" #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int main() { std::ifstream ifs("t.cpp"); std::cout << ifs.rdbuf() << std::flush; system("cpp ./t.cpp"); } Disallowed system call: SYS_fork