Skip to content

Instantly share code, notes, and snippets.

@saru2017
Last active June 16, 2019 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saru2017/8dc8cd8450c08b35ffa45306ef29241a to your computer and use it in GitHub Desktop.
Save saru2017/8dc8cd8450c08b35ffa45306ef29241a to your computer and use it in GitHub Desktop.
CTF: pwn04
#include <stdio.h>
#include <stdlib.h>
int main()
{
char pass[32];
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
puts("Welcome to Pwn04!!!");
puts("password? ");
gets(pass);
if(strcmp(pass, "watalab") == 0){
puts("login success!!!");
puts("out of service.");
// system("/usr/bin/uptime");
}else{
puts("login failed\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment