13 #define BINLEX_EXPORT __declspec(dllexport)
24 using std::stringstream;
34 #define BINARY_MAX_SECTIONS 256
37 typedef unsigned int uint;
38 typedef uint useconds_t;
44 #define PRINT_DEBUG(...) {if (g_args.options.debug) fprintf(stderr, __VA_ARGS__); }
45 #define PRINT_ERROR_AND_EXIT(...) { fprintf(stderr, __VA_ARGS__); exit(EXIT_FAILURE); }
46 void print_data(
string title,
void *data, uint32_t size);
47 #define PRINT_DATA(title, data, size) { print_data(title, data, size); }
61 BINLEX_EXPORT
static string GetTLSH(
const uint8_t *data,
size_t len);
68 BINLEX_EXPORT
static string GetFileTLSH(
const char *file_path);
74 BINLEX_EXPORT
static string SHA256(
char *trait);
89 BINLEX_EXPORT
static string GetSHA256(
const uint8_t *data,
size_t len);
95 BINLEX_EXPORT
static vector<char>
TraitToChar(
string trait);
120 BINLEX_EXPORT
static string WildcardTrait(
string trait,
string bytes);
126 BINLEX_EXPORT
static string TrimRight(
const std::string &s);
133 BINLEX_EXPORT
static string HexdumpBE(
const void *data,
size_t size);
139 BINLEX_EXPORT
static string Wildcards(uint count);
140 BINLEX_EXPORT
static string HexdumpMemDisp(uint64_t disp);
141 BINLEX_EXPORT
static float Entropy(
string trait);
148 BINLEX_EXPORT
static void Hexdump(
const char * desc,
const void * addr,
const int len);
static BINLEX_EXPORT string GetFileTLSH(const char *file_path)
static BINLEX_EXPORT string RemoveSpaces(string s)
static BINLEX_EXPORT string SHA256(char *trait)
static BINLEX_EXPORT string GetFileSHA256(char *file_path)
static BINLEX_EXPORT void Hexdump(const char *desc, const void *addr, const int len)
static BINLEX_EXPORT string RemoveWildcards(string trait)
static BINLEX_EXPORT string GetTLSH(const uint8_t *data, size_t len)
static BINLEX_EXPORT string TrimRight(const std::string &s)
static BINLEX_EXPORT string WildcardTrait(string trait, string bytes)
static BINLEX_EXPORT uint GetByteSize(string s)
static BINLEX_EXPORT vector< char > TraitToChar(string trait)
static BINLEX_EXPORT string Wildcards(uint count)
static BINLEX_EXPORT string HexdumpBE(const void *data, size_t size)
static BINLEX_EXPORT string GetSHA256(const uint8_t *data, size_t len)