If the flag is not found locally, it must be on the remote server.
Press enter or click to view image in full size
python3 -c 'print("A" * 200)' > api
Press enter or click to view image in full size
it works fine.
char *user_buf = malloc(300 + 1); //Allocates memory printf("What is your API token?\n"); //Prints input prompt scanf("%300s", user_buf); //Reads in the user input and stores in user_buf printf("Buying stonks with token:\n"); //Prints info printf(user_buf); //Outputs user_buff [VULNERABLE!!]
As we can see, the function type is not specified.
printf(user_buf) Will be affected by the format string.