Railsbin – The vulnerable pastebin service!

User:

Title: bof

Content:

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv)
{
        printf("Welcome to 'Simon Says'!\n");
        char who[32];
        char what[32];
        char format[96];
        while (1) {
                printf("Who is saying it? (q for quit): ");
                scanf("%s", who);
                if ((who[0]=='q') && (who[1]=='\0')) {
                        printf("OK FINE!\n");
                        exit(0);
                }
                printf("What did they say?!: ");
                scanf("%s", what);
                sprintf(format, "%s says: %%s\n", who);
                printf(format, what);
                printf("AGAIN!!!\n");
        }

}

Edit | Back