Skip to content

Instantly share code, notes, and snippets.

@KarthikNayak
Last active October 23, 2017 16:38
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 KarthikNayak/d36df62c72e5dc435afb53d2b58b9d78 to your computer and use it in GitHub Desktop.
Save KarthikNayak/d36df62c72e5dc435afb53d2b58b9d78 to your computer and use it in GitHub Desktop.
Medium: 30days of hacking: Day1
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc != 2) {
printf("Improper input\nUsage: ./simple_keygen <KEY>\n");
return -1;
}
if (!strcmp("WhatASimpleKey", argv[1])) {
printf("Correct key. Congrats!\n");
return 0;
}
printf("Incorrect key\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment