retdec
|
#include <macho_heuristics.h>
Public Member Functions | |
MachOHeuristics (retdec::fileformat::MachOFormat &parser, Search &searcher, ToolInformation &toolInfo) | |
![]() | |
Heuristics (retdec::fileformat::FileFormat &parser, Search &searcher, ToolInformation &toolInfo) | |
virtual | ~Heuristics ()=default |
void | getAllHeuristics () |
Protected Member Functions | |
Virtual methods | |
virtual void | getFormatSpecificCompilerHeuristics () override |
![]() | |
std::string | getUpxVersion () |
const DetectResult * | isDetected (const std::string &name, const DetectionStrength minStrength=DetectionStrength::LOW) |
virtual void | getFormatSpecificLanguageHeuristics () |
void | addCompiler (DetectionMethod source, DetectionStrength strength, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addLinker (DetectionMethod source, DetectionStrength strength, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addInstaller (DetectionMethod source, DetectionStrength strength, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addPacker (DetectionMethod source, DetectionStrength strength, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addCompiler (std::size_t matchNibbles, std::size_t totalNibbles, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addPacker (std::size_t matchNibbles, std::size_t totalNibbles, const std::string &name, const std::string &version="", const std::string &extra="") |
void | addLanguage (const std::string &name, const std::string &extraInfo="", bool isBytecode=false) |
void | addPriorityLanguage (const std::string &name, const std::string &extraInfo="", bool isBytecode=false) |
std::size_t | findSectionName (const std::string §ionName) const |
std::size_t | findSectionNameStart (const std::string §ionName) const |
Private Member Functions | |
Detection methods | |
void | getUpxHeuristic () |
void | getGoHeuristic () |
void | getSectionTableHeuristic () |
void | getImportTableHeuristic () |
Additional Inherited Members | |
![]() | |
retdec::fileformat::FileFormat & | fileParser |
input file parser More... | |
Search & | search |
signature search engine More... | |
bool | canSearch |
true if we can use search engine More... | |
ToolInformation & | toolInfo |
results - detected tools More... | |
std::vector< const retdec::fileformat::Section * > | sections |
section information More... | |
std::map< std::string, std::size_t > | sectionNameMap |
section name counts More... | |
std::size_t | noOfSections |
section count More... | |
bool | priorityLanguageIsSet = false |
Mach-O-specific heuristics
retdec::cpdetect::MachOHeuristics::MachOHeuristics | ( | retdec::fileformat::MachOFormat & | parser, |
Search & | searcher, | ||
ToolInformation & | toolInfo | ||
) |
Constructor
parser | Parser of input file |
searcher | Signature search engine |
toolInfo | Structure for information about detected tools |
|
overrideprotectedvirtual |
Get all compiler heuristics which are specific for one file format
Reimplemented from retdec::cpdetect::Heuristics.
|
private |
Try to detect Go compiler
|
private |
Try to detect tools by import table
|
private |
Try to detect tools by section table
|
private |
Try to detect UPX