这里主要就是记录一下wp吧
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdint.h> uint8_t my_uint8_variable; int main() { srand(1400333646); uint8_t enc[100] = { 0xE8, 0x80, 0x84, 0x8, 0x18, 0x3C, 0x78, 0x68, 0x0, 0x70, 0x7C, 0x94, 0xC8, 0xE0, 0x10, 0xEC, 0xB4, 0xAC, 0x68, 0xA8, 0xC, 0x1C, 0x90, 0xCC, 0x54, 0x3C, 0x14, 0xDC, 0x30 }; char key[] = "NewStarCTF"; for (int i = 0; i < 29; i++) { for (uint8_t j = 32; j <= 127; j++) { uint8_t temp = j; if (j >= 'A' && j <= 'Z') { j = (j - 52) % 26 + 65; } else if (j >= '0' && j <= '9') { j = (j - 45) % 10 + 48; } else if (j >= 'a' && j <= 'z') { j = (j - 89) % 26 + 97; } j += key[i % 10]; j = ~j; j *= 52; if (j == enc[i]) { if (temp >= 'A' && temp <= 'Z' || temp >= 'a' && temp <= 'z') { printf("%c", temp); } } j = temp; } } return 0; }
|
这里主要就是用
#include <stdint.h> uint8_t my_uint8_variable;
这俩句就能模仿到IDApro中:unsigned_int8