2019-04-13 03:11:58 +00:00
|
|
|
// this tool decodes first input byte feed to OSS fuzz, that encodes arch+mode
|
|
|
|
// by Nguyen Anh Quynh, 2019
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
|
|
|
#include <capstone/capstone.h>
|
|
|
|
|
|
|
|
#include "platform.h"
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2019-04-13 07:22:20 +00:00
|
|
|
unsigned char data;
|
2019-04-13 03:11:58 +00:00
|
|
|
|
2019-04-13 07:22:20 +00:00
|
|
|
if (argc != 2) {
|
|
|
|
printf("Decoding OSS fuzz platform\n");
|
|
|
|
printf("Syntax: %s <hex-byte>\n", argv[0]);
|
|
|
|
return -1;
|
|
|
|
}
|
2019-04-13 03:11:58 +00:00
|
|
|
|
2019-04-13 07:22:20 +00:00
|
|
|
data = (unsigned int)strtol(argv[1], NULL, 16);
|
2019-04-13 03:11:58 +00:00
|
|
|
|
2019-04-13 07:22:20 +00:00
|
|
|
printf("cstool arch+mode = %s\n", get_platform_cstoolname(data));
|
2019-04-13 03:11:58 +00:00
|
|
|
|
2019-04-13 07:22:20 +00:00
|
|
|
return 0;
|
2019-04-13 03:11:58 +00:00
|
|
|
}
|
|
|
|
|