| 1 | // this tool decodes first input byte feed to OSS fuzz, that encodes arch+mode |
| 2 | // by Nguyen Anh Quynh, 2019 |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <inttypes.h> |
| 6 | |
| 7 | #include <capstone/capstone.h> |
| 8 | |
| 9 | #include "platform.h" |
| 10 | |
| 11 | int main(int argc, char **argv) |
| 12 | { |
| 13 | unsigned char data; |
| 14 | |
| 15 | if (argc != 2) { |
| 16 | printf("Decoding OSS fuzz platform\n"); |
| 17 | printf("Syntax: %s <hex-byte>\n", argv[0]); |
| 18 | return -1; |
| 19 | } |
| 20 | |
| 21 | data = (unsigned int)strtol(argv[1], NULL, 16); |
| 22 | |
| 23 | printf("cstool arch+mode = %s\n", get_platform_cstoolname(data)); |
| 24 | |
| 25 | return 0; |
| 26 | } |
| 27 |