retdec
Public Member Functions | List of all members
retdec::cpdetect::MachOHeuristics Class Reference

#include <macho_heuristics.h>

Inheritance diagram for retdec::cpdetect::MachOHeuristics:
Inheritance graph
[legend]
Collaboration diagram for retdec::cpdetect::MachOHeuristics:
Collaboration graph
[legend]

Public Member Functions

 MachOHeuristics (retdec::fileformat::MachOFormat &parser, Search &searcher, ToolInformation &toolInfo)
 
- Public Member Functions inherited from retdec::cpdetect::Heuristics
 Heuristics (retdec::fileformat::FileFormat &parser, Search &searcher, ToolInformation &toolInfo)
 
virtual ~Heuristics ()=default
 
void getAllHeuristics ()
 

Protected Member Functions

Virtual methods
virtual void getFormatSpecificCompilerHeuristics () override
 
- Protected Member Functions inherited from retdec::cpdetect::Heuristics
std::string getUpxVersion ()
 
const DetectResultisDetected (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 &sectionName) const
 
std::size_t findSectionNameStart (const std::string &sectionName) const
 

Private Member Functions

Detection methods
void getUpxHeuristic ()
 
void getGoHeuristic ()
 
void getSectionTableHeuristic ()
 
void getImportTableHeuristic ()
 

Additional Inherited Members

- Protected Attributes inherited from retdec::cpdetect::Heuristics
retdec::fileformat::FileFormatfileParser
 input file parser More...
 
Searchsearch
 signature search engine More...
 
bool canSearch
 true if we can use search engine More...
 
ToolInformationtoolInfo
 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
 

Detailed Description

Mach-O-specific heuristics

Constructor & Destructor Documentation

◆ MachOHeuristics()

retdec::cpdetect::MachOHeuristics::MachOHeuristics ( retdec::fileformat::MachOFormat parser,
Search searcher,
ToolInformation toolInfo 
)

Constructor

Parameters
parserParser of input file
searcherSignature search engine
toolInfoStructure for information about detected tools

Member Function Documentation

◆ getFormatSpecificCompilerHeuristics()

void retdec::cpdetect::MachOHeuristics::getFormatSpecificCompilerHeuristics ( )
overrideprotectedvirtual

Get all compiler heuristics which are specific for one file format

Reimplemented from retdec::cpdetect::Heuristics.

◆ getGoHeuristic()

void retdec::cpdetect::MachOHeuristics::getGoHeuristic ( )
private

Try to detect Go compiler

◆ getImportTableHeuristic()

void retdec::cpdetect::MachOHeuristics::getImportTableHeuristic ( )
private

Try to detect tools by import table

◆ getSectionTableHeuristic()

void retdec::cpdetect::MachOHeuristics::getSectionTableHeuristic ( )
private

Try to detect tools by section table

◆ getUpxHeuristic()

void retdec::cpdetect::MachOHeuristics::getUpxHeuristic ( )
private

Try to detect UPX


The documentation for this class was generated from the following files: