initial
This commit is contained in:
23
2/Basics2/test.c
Normal file
23
2/Basics2/test.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
//aufg1
|
||||
//uint8_t token[] = { 0x7e, 0xb1, 0x4d, 0x7d, 0xbc, 0x4f, 0x74, 0xab, 0x42, 0x25, 0xe7, 0x5d, 0x49, 0xa3, 0x5a, 0x22, 0xa2, 0x5a, 0x49, 0xb7, 0x40, 0x27, 0xa3, 0x5c, 0x25, 0xa6, 0x1d, 0x64, 0x8f, 0x16, 0x50, 0xbf, 0x5e, 0x42, 0xaa, 0x5f, 0x2f, 0xad };
|
||||
//uint8_t key[] = { 0x16, 0xd0, 0x2e};
|
||||
|
||||
|
||||
char test[] = "hacklab{ ";
|
||||
uint8_t token[] = {0x0b, 0xb6, 0xd5, 0x04, 0xc3, 0xab, 0x0d, 0xd0, 0x86, 0x0f, 0xcb, 0x9b, 0x01, 0xcc, 0xa9, 0x1c, 0x98, 0xd5, 0x1e, 0xd9, 0x9b, 0x1f, 0xde, 0xa9, 0x7d, 0xdd, 0xab, 0x09, 0xdd, 0xc4, 0x08, 0xbc, 0xcf, 0x00};
|
||||
uint8_t key[] = {0x4d, 0x89, 0x94, 0x00};
|
||||
|
||||
|
||||
int main(int argc, char** args){
|
||||
for(uint8_t i=0; i<sizeof(token); i++){
|
||||
uint8_t c=token[i];
|
||||
c = c ^ key[i%3];
|
||||
c += 0x22;
|
||||
putc(c, stdout);
|
||||
//printf("%x ", c);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user