#include #include #include #include using namespace std; signed main(){ FILE * fp = fopen("./catch.o","r"); //assert(fp != nullptr); string s; char c; while((c = getc(fp)) != EOF) s += c; auto pos = s.find("FLAG"); //assert(pos != string::npos); //dump(pos); string flag; while(pos < s.size() && isprint(s[pos])){ flag += s[pos]; pos++; } cout << flag << endl; }