Created
June 16, 2019 14:26
-
-
Save saru2017/6688fcc43ed80c95a88797579d8a08b5 to your computer and use it in GitHub Desktop.
CTF: pwn03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
char pass[32]; | |
setvbuf(stdout, NULL, _IONBF, 0); | |
setvbuf(stdin, NULL, _IONBF, 0); | |
puts("Welcome to Pwn03!!!"); | |
puts("We removed /bin/sh"); | |
puts("for security reason."); | |
puts("password? "); | |
gets(pass); | |
if(strcmp(pass, "watalab") == 0){ | |
puts("login success!!!"); | |
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