Skip to content

Instantly share code, notes, and snippets.

@oxagast
Created January 20, 2016 23:04
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 oxagast/08a19115d70f0ed33109 to your computer and use it in GitHub Desktop.
Save oxagast/08a19115d70f0ed33109 to your computer and use it in GitHub Desktop.
nose candy
#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