|
static BINLEX_EXPORT string | GetTLSH (const uint8_t *data, size_t len) |
|
static BINLEX_EXPORT string | GetFileTLSH (const char *file_path) |
|
static BINLEX_EXPORT string | SHA256 (char *trait) |
|
static BINLEX_EXPORT string | GetFileSHA256 (char *file_path) |
|
static BINLEX_EXPORT string | GetSHA256 (const uint8_t *data, size_t len) |
|
static BINLEX_EXPORT vector< char > | TraitToChar (string trait) |
|
static BINLEX_EXPORT string | RemoveWildcards (string trait) |
|
static BINLEX_EXPORT uint | GetByteSize (string s) |
|
static BINLEX_EXPORT string | RemoveSpaces (string s) |
|
static BINLEX_EXPORT string | WildcardTrait (string trait, string bytes) |
|
static BINLEX_EXPORT string | TrimRight (const std::string &s) |
|
static BINLEX_EXPORT string | HexdumpBE (const void *data, size_t size) |
|
static BINLEX_EXPORT string | Wildcards (uint count) |
|
static BINLEX_EXPORT string | HexdumpMemDisp (uint64_t disp) |
|
static BINLEX_EXPORT float | Entropy (string trait) |
|
static BINLEX_EXPORT void | Hexdump (const char *desc, const void *addr, const int len) |
|
◆ GetByteSize()
static BINLEX_EXPORT uint binlex::Common::GetByteSize |
( |
string |
s | ) |
|
|
static |
This method gets the size in bytes of a trait string (includes wildcards).
- Parameters
-
- Returns
- Returns uint size of bytes
◆ GetFileSHA256()
static BINLEX_EXPORT string binlex::Common::GetFileSHA256 |
( |
char * |
file_path | ) |
|
|
static |
This method reads a file returns its sha256 hash.
- Parameters
-
file_path | path to the file to read |
- Returns
- Returns the sha256 hash of the file
- Exceptions
-
std::runtime_error | if file operation fails |
◆ GetFileTLSH()
static BINLEX_EXPORT string binlex::Common::GetFileTLSH |
( |
const char * |
file_path | ) |
|
|
static |
This method reads a file returns its tlsh hash.
- Parameters
-
file_path | path to the file to read |
- Returns
- Returns the tlsh hash of the file
- Exceptions
-
std::runtime_error | if file operation fails |
◆ GetSHA256()
static BINLEX_EXPORT string binlex::Common::GetSHA256 |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
This method reads a file returns its sha256 hash.
- Parameters
-
data | input string |
len | length of data |
- Returns
- Returns the sha256 hash of the file
- Exceptions
-
std::runtime_error | if file operation fails |
◆ GetTLSH()
static BINLEX_EXPORT string binlex::Common::GetTLSH |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
This class contains methods common to binlex. This method takes a (binary) input string and returns its tlsh hash.
- Parameters
-
data | input string |
len | length of data |
- Returns
- Returns the tlsh hash of the trait string
◆ Hexdump()
static BINLEX_EXPORT void binlex::Common::Hexdump |
( |
const char * |
desc, |
|
|
const void * |
addr, |
|
|
const int |
len |
|
) |
| |
|
static |
This method prints hexdump to stdout.
- Parameters
-
desc | A description of the data. |
data | A pointer to the data |
size | The size of the data to collect |
◆ HexdumpBE()
static BINLEX_EXPORT string binlex::Common::HexdumpBE |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| |
|
static |
This method creates a byte string based on a pointer and its size.
- Parameters
-
data | A pointer to the data |
size | The size of the data to collect |
- Returns
- Returns a byte string of the selected data
◆ RemoveSpaces()
static BINLEX_EXPORT string binlex::Common::RemoveSpaces |
( |
string |
s | ) |
|
|
static |
This method removes spaces from a string.
- Parameters
-
- Returns
- Returns string without spaces
◆ RemoveWildcards()
static BINLEX_EXPORT string binlex::Common::RemoveWildcards |
( |
string |
trait | ) |
|
|
static |
This method removes wildcards from a trait string.
- Parameters
-
- Returns
- Returns trait without wildcards
◆ SHA256()
static BINLEX_EXPORT string binlex::Common::SHA256 |
( |
char * |
trait | ) |
|
|
static |
This method takes an input string and returns its sha256 hash.
- Parameters
-
- Returns
- Returns the sha256 hash of the trait string
◆ TraitToChar()
static BINLEX_EXPORT vector<char> binlex::Common::TraitToChar |
( |
string |
trait | ) |
|
|
static |
This method takes an input trait string and returns a char vector of bytes (ignores wildcards).
- Parameters
-
- Returns
- Returns char vector of bytes
◆ TrimRight()
static BINLEX_EXPORT string binlex::Common::TrimRight |
( |
const std::string & |
s | ) |
|
|
static |
This method removes whitespace on the right.
- Parameters
-
- Returns
- Returns string with whitespace on right trimmed
◆ Wildcards()
static BINLEX_EXPORT string binlex::Common::Wildcards |
( |
uint |
count | ) |
|
|
static |
Generate Number of Wildcards
- Parameters
-
count | number of wildcard bytes to create |
- Returns
- string
◆ WildcardTrait()
static BINLEX_EXPORT string binlex::Common::WildcardTrait |
( |
string |
trait, |
|
|
string |
bytes |
|
) |
| |
|
static |
This method wildcards byte strings for traits.
- Parameters
-
trait | input trait string |
bytes | byte string to wildcard |
- Returns
- Returns wildcarded trait string
The documentation for this class was generated from the following file: