I made a quick little console app with a password that would display two outcomes: Welcome or Get out. After completing application mission 3, I tried to bypass the password in my console app and well...it was as easy as looking through the hex...Hopefully I'll learn some ways on how to make code more secure
Here's something that I coded up :
- Code: Select all
#include <stdio.h>
int main()
{
char arr[50];
scanf("%s", arr);
char password[]="moonbeam";
if(!strcmp(arr, password))
printf("\nwelcome");
else
printf("\nget out\n");
}
I'm confused, are you claiming to inject something into this even? I don't see how this is possible. I might be wrong, however, show me what you're doing to get past this (if this is even applicable to C++, I don't know shit about C++, only as much of it can be applied directly in C).