diff options
author | Nicholas Hall <ngh@grandcare.com> | 2017-09-14 16:42:29 -0500 |
---|---|---|
committer | Nicholas Hall <ngh@grandcare.com> | 2017-09-14 16:42:29 -0500 |
commit | 52e3ab594b34bf309b8669fcaa855c295a00e114 (patch) | |
tree | 464216f7987f6df92d7c2c85bf3d398ef32189ea /src/secret.c | |
download | hooking_strcmp-52e3ab594b34bf309b8669fcaa855c295a00e114.tar.xz hooking_strcmp-52e3ab594b34bf309b8669fcaa855c295a00e114.zip |
Diffstat (limited to 'src/secret.c')
-rw-r--r-- | src/secret.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/secret.c b/src/secret.c new file mode 100644 index 0000000..d4113b2 --- /dev/null +++ b/src/secret.c @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <string.h> +#include "secret.h" + +int main(int argc, char* argv[]){ + if(argc <2){ + printf("Usage: %s <secret_password>\n", argv[0]); + return 1; + } + + UNHIDE_STR(pass); + + if(! strcmp(pass, argv[1])) + printf("Access granted\n"); + else + printf("Access denied\n"); + + return 0; +} |