retdec
|
#include <tool_info.h>
Public Member Functions | |
bool | operator== (const ToolInfo &val) const |
Tool query methods. | |
bool | isUnknown () const |
bool | isKnown () const |
bool | isBorland () const |
bool | isGcc () const |
bool | isIntel () const |
bool | isOpenWatcom () const |
bool | isMsvc (const std::string &version="") const |
bool | isTool (const std::string &n) const |
bool | isToolVersion (const std::string &v) const |
bool | isCompiler () const |
bool | isLinker () const |
bool | isInstaller () const |
bool | isPacker () const |
bool | isUnknownType () const |
bool | isKnownType () const |
Tool set methods. | |
void | setType (const std::string &t) |
void | setName (const std::string &n) |
void | setVersion (const std::string &n) |
void | setMajorVersion (unsigned int v) |
void | setMinorVersion (unsigned int v) |
void | setPatchVersion (unsigned int v) |
void | setAdditionalInfo (const std::string &i) |
void | setPercentage (double p) |
void | setIdenticalSignificantNibbles (unsigned i) |
void | setTotalSignificantNibbles (unsigned i) |
void | setIsFromHeuristics (bool h) |
void | setIsUnknown () |
void | setIsBorland () |
void | setIsGcc () |
void | setIsIntel () |
void | setIsOpenWatcom () |
void | setIsVisualStudio () |
Tool get methods. | |
std::string | getType () const |
std::string | getName () const |
std::string | getVersion () const |
std::string | getAdditionalInfo () const |
unsigned int | getMajorVersion () const |
unsigned int | getMinorVersion () const |
unsigned int | getPatchVersion () const |
double | getPercentage () const |
unsigned | getIdenticalSignificantNibbles () const |
unsigned | getTotalSignificantNibbles () const |
bool | isFromHeuristics () const |
Private Attributes | |
std::string | _type |
std::string | _name |
std::string | _additionalInfo |
std::string | _version |
unsigned int | _majorVersion = 0 |
unsigned int | _minorVersion = 0 |
unsigned int | _patchVersion = 0 |
double | _percentage = 0.0 |
unsigned | _totalSignificantNibbles = 0 |
unsigned | _identicalSignificantNibbles = 0 |
Number of significant nibbles that were actually found. More... | |
bool | _heuristics = false |
Were heuristics used to detect usage of this tool? More... | |
Represents tools used to create/manipulate input binary (i.e compiler, packer).
std::string retdec::common::ToolInfo::getAdditionalInfo | ( | ) | const |
unsigned retdec::common::ToolInfo::getIdenticalSignificantNibbles | ( | ) | const |
unsigned int retdec::common::ToolInfo::getMajorVersion | ( | ) | const |
unsigned int retdec::common::ToolInfo::getMinorVersion | ( | ) | const |
std::string retdec::common::ToolInfo::getName | ( | ) | const |
unsigned int retdec::common::ToolInfo::getPatchVersion | ( | ) | const |
double retdec::common::ToolInfo::getPercentage | ( | ) | const |
unsigned retdec::common::ToolInfo::getTotalSignificantNibbles | ( | ) | const |
std::string retdec::common::ToolInfo::getType | ( | ) | const |
std::string retdec::common::ToolInfo::getVersion | ( | ) | const |
version
string if it was set by setVersion()
. Otherwise constructs and returns string in the following format: "majorVersion.minorVersionc.patchVersion" bool retdec::common::ToolInfo::isBorland | ( | ) | const |
bool retdec::common::ToolInfo::isCompiler | ( | ) | const |
bool retdec::common::ToolInfo::isFromHeuristics | ( | ) | const |
bool retdec::common::ToolInfo::isGcc | ( | ) | const |
bool retdec::common::ToolInfo::isInstaller | ( | ) | const |
bool retdec::common::ToolInfo::isIntel | ( | ) | const |
bool retdec::common::ToolInfo::isKnown | ( | ) | const |
bool retdec::common::ToolInfo::isKnownType | ( | ) | const |
bool retdec::common::ToolInfo::isLinker | ( | ) | const |
bool retdec::common::ToolInfo::isMsvc | ( | const std::string & | version = "" | ) | const |
version | Any additional string which must be contained in tool name. If empty string is provided, any MSVC version is matched. |
bool retdec::common::ToolInfo::isOpenWatcom | ( | ) | const |
bool retdec::common::ToolInfo::isPacker | ( | ) | const |
bool retdec::common::ToolInfo::isTool | ( | const std::string & | n | ) | const |
Checks if this tool instance matches with the provided tool name. Matching is successful if instance's name contains (case insensitive) the provided name.
n | Name to match with. |
True
if matching successful, false
otherwise. bool retdec::common::ToolInfo::isToolVersion | ( | const std::string & | v | ) | const |
Checks if this tool version matches with the provided tool version. Matching is successful if instance's version contains (case insensitive) the provided version.
v | Version to match with. |
True
if matching successful, false
otherwise. bool retdec::common::ToolInfo::isUnknown | ( | ) | const |
bool retdec::common::ToolInfo::isUnknownType | ( | ) | const |
bool retdec::common::ToolInfo::operator== | ( | const ToolInfo & | val | ) | const |
void retdec::common::ToolInfo::setAdditionalInfo | ( | const std::string & | i | ) |
void retdec::common::ToolInfo::setIdenticalSignificantNibbles | ( | unsigned | i | ) |
void retdec::common::ToolInfo::setIsBorland | ( | ) |
void retdec::common::ToolInfo::setIsFromHeuristics | ( | bool | h | ) |
void retdec::common::ToolInfo::setIsGcc | ( | ) |
void retdec::common::ToolInfo::setIsIntel | ( | ) |
void retdec::common::ToolInfo::setIsOpenWatcom | ( | ) |
void retdec::common::ToolInfo::setIsUnknown | ( | ) |
void retdec::common::ToolInfo::setIsVisualStudio | ( | ) |
void retdec::common::ToolInfo::setMajorVersion | ( | unsigned int | v | ) |
void retdec::common::ToolInfo::setMinorVersion | ( | unsigned int | v | ) |
void retdec::common::ToolInfo::setName | ( | const std::string & | n | ) |
void retdec::common::ToolInfo::setPatchVersion | ( | unsigned int | v | ) |
void retdec::common::ToolInfo::setPercentage | ( | double | p | ) |
void retdec::common::ToolInfo::setTotalSignificantNibbles | ( | unsigned | i | ) |
void retdec::common::ToolInfo::setType | ( | const std::string & | t | ) |
void retdec::common::ToolInfo::setVersion | ( | const std::string & | n | ) |
Set provided string into version
and try to parse it into its components: majorVersion
minorVersionc
and patchVersion
. Parsing is successful only if string has the following format: "majorVersion.minorVersionc.patchVersion"
n | Version string. |
|
private |
|
private |
Were heuristics used to detect usage of this tool?
|
private |
Number of significant nibbles that were actually found.
|
private |
|
private |
|
private |
|
private |
|
private |
Probability that the tool was actually used. This does not have to be set. It is significant only if the value is not 0.0.
|
private |
Total number of significant nibbles in signature recognizing this tool.
|
private |
|
private |
Entire tool version string. If it has an expected format it may be parsed into its components majorVersion
minorVersion
and patchVersion
.