diff --git a/pwnshop/challenge.py b/pwnshop/challenge.py index 522163b..06de57f 100644 --- a/pwnshop/challenge.py +++ b/pwnshop/challenge.py @@ -63,7 +63,7 @@ class Challenge: vbuf_in_constructor = False print_greeting = True constant_goodbye = True - win_message = "You win! Here is your flag:\n" + win_message = "You win! Here is your flag:" static_win_function_variables = True build_image = None diff --git a/pwnshop/templates/base/base.c b/pwnshop/templates/base/base.c index 09da611..515e9f2 100644 --- a/pwnshop/templates/base/base.c +++ b/pwnshop/templates/base/base.c @@ -72,7 +72,7 @@ if (token != 0x1337) return; {% endif %} - {% if challenge.win_message %}printf({{win_message}});{% endif %} + {% if challenge.win_message %}puts("{{challenge.win_message}}");{% endif %} flag_fd = open("/flag", 0); if (flag_fd < 0) { printf("\n ERROR: Failed to open the flag -- %s!\n", strerror(errno));