Created
January 20, 2016 23:04
-
-
Save oxagast/08a19115d70f0ed33109 to your computer and use it in GitHub Desktop.
nose candy
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 "string.h" | |
void test_op(unsigned char was, unsigned char expected) { | |
printf("%c", was); | |
} | |
int main(int argc, char *argv[]) { | |
if ((argc > 1) && (argc < 3)) { | |
char ui[10]; | |
for (int uia=0; uia<6; uia++) { | |
ui[uia] = argv[1][uia]; | |
} | |
const unsigned char expect_a[7] = {'o', 'x', 'a', 'g', 'a', 's', 't'}; | |
const unsigned char ox[7] = {0x0c, 0x17, 0x02, 0x06, 0x08, 0x1d, 0x65}; | |
int i; | |
for (i = 0; i <= 6; i++) { | |
test_op(ox[i] ^ ui[i], expect_a[i]); | |
} | |
printf ( "\n", NULL); | |
return (0); | |
} | |
else { | |
printf ("Feed me something\n", NULL); return (1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment