retdec
|
#include <cptypes.h>
Public Member Functions | |
Adding result methods | |
void | addTool (DetectionMethod source, DetectionStrength strength, ToolType toolType, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addTool (std::size_t matchNibbles, std::size_t totalNibbles, ToolType toolType, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addLanguage (const std::string &name, const std::string &extra="", bool bytecode=false) |
Query methods | |
bool | isReliableResult (std::size_t resultIndex) const |
bool | hasReliableResult () const |
Packed | isPacked () const |
Public Attributes | |
std::vector< std::string > | errorMessages |
error and warning messages More... | |
std::vector< DetectResult > | detectedTools |
detected tools (compilers, packers...) More... | |
std::vector< DetectLanguage > | detectedLanguages |
detected programming language(s) More... | |
bool | entryPointOffset = false |
false if file has no has no or invalid EP offset More... | |
long long unsigned int | epOffset |
entry point offset More... | |
bool | entryPointAddress = false |
false if file has no has no or invalid EP address More... | |
long long unsigned int | epAddress |
entry point address More... | |
long long unsigned int | imageBase |
image base address More... | |
uint64_t | overlayOffset = 0 |
offset of the file overlay. 0 if no overlay More... | |
size_t | overlaySize = 0 |
length of the file overlay. 0 if no overlay More... | |
bool | entryPointSection = false |
false if file has no or invalid EP section More... | |
retdec::fileformat::Section | epSection |
entry point section More... | |
std::string | epBytes |
hexadecimal representation of entry point bytes More... | |
All information about used tools
If entryPointOffset is false
, value of epOffset is undefined. If entryPointSection is false
, values of epSection are undefined. If entryPointAddress is false
, values of epAddress and imageBase are undefined.
Value std::numeric_limits<long long unsigned int>::max() mean unspecified value or error for unsigned integer types.
void retdec::cpdetect::ToolInformation::addLanguage | ( | const std::string & | name, |
const std::string & | extra = "" , |
||
bool | bytecode = false |
||
) |
Save all information about detected language
name | Name of detected language |
extra | Extra information about detected language |
bytecode | Whether language uses byte-code |
void retdec::cpdetect::ToolInformation::addTool | ( | DetectionMethod | source, |
DetectionStrength | strength, | ||
ToolType | toolType, | ||
const std::string & | name, | ||
const std::string & | version = "" , |
||
const std::string & | extra = "" |
||
) |
Add detected tool
source | Used detection method |
strength | Strength of detection method |
toolType | Type of detected tool |
name | Name of detected compiler |
version | Version of detected compiler |
extra | Extra information about compiler |
void retdec::cpdetect::ToolInformation::addTool | ( | std::size_t | matchNibbles, |
std::size_t | totalNibbles, | ||
ToolType | toolType, | ||
const std::string & | name, | ||
const std::string & | version = "" , |
||
const std::string & | extra = "" |
||
) |
Save all information about detected compiler
matchNibbles | Number of significant nibbles agreeing with file content |
totalNibbles | Total number of significant nibbles of signature |
toolType | Type of detected tool |
name | Name of detected compiler |
version | Version of detected compiler |
extra | Extra information about compiler |
This method implies DetectionMethod::SIGNATURE. Strength is computed.
bool retdec::cpdetect::ToolInformation::hasReliableResult | ( | ) | const |
Check if at least one reliable result was detected
true
if at least one reliable result was detected, false
otherwise Packed retdec::cpdetect::ToolInformation::isPacked | ( | ) | const |
bool retdec::cpdetect::ToolInformation::isReliableResult | ( | std::size_t | resultIndex | ) | const |
Check out if detected result is reliable
resultIndex | Index of selected result |
true
if selected result is detected based on reliable source, false
otherwise std::vector<DetectLanguage> retdec::cpdetect::ToolInformation::detectedLanguages |
detected programming language(s)
std::vector<DetectResult> retdec::cpdetect::ToolInformation::detectedTools |
detected tools (compilers, packers...)
bool retdec::cpdetect::ToolInformation::entryPointAddress = false |
false
if file has no has no or invalid EP address
bool retdec::cpdetect::ToolInformation::entryPointOffset = false |
false
if file has no has no or invalid EP offset
bool retdec::cpdetect::ToolInformation::entryPointSection = false |
false
if file has no or invalid EP section
long long unsigned int retdec::cpdetect::ToolInformation::epAddress |
entry point address
std::string retdec::cpdetect::ToolInformation::epBytes |
hexadecimal representation of entry point bytes
long long unsigned int retdec::cpdetect::ToolInformation::epOffset |
entry point offset
retdec::fileformat::Section retdec::cpdetect::ToolInformation::epSection |
entry point section
std::vector<std::string> retdec::cpdetect::ToolInformation::errorMessages |
error and warning messages
long long unsigned int retdec::cpdetect::ToolInformation::imageBase |
image base address
uint64_t retdec::cpdetect::ToolInformation::overlayOffset = 0 |
offset of the file overlay. 0 if no overlay
size_t retdec::cpdetect::ToolInformation::overlaySize = 0 |
length of the file overlay. 0 if no overlay