retdec
|
#include <pattern.h>
Public Member Functions | |
Query methods | |
bool | isLittle () const |
bool | isBig () const |
Getters | |
std::string | getName () const |
std::string | getDescription () const |
std::string | getYaraRuleName () const |
std::size_t | getNumberOfMatches () const |
const PatternMatch * | getMatch (std::size_t index) const |
const std::vector< PatternMatch > & | getMatches () const |
Iterators | |
patternMatchConstIterator | begin () const |
patternMatchConstIterator | end () const |
patternMatchIterator | begin () |
patternMatchIterator | end () |
Setters | |
void | setName (std::string sName) |
void | setDescription (std::string sDescription) |
void | setYaraRuleName (std::string sYaraRuleName) |
void | setLittle () |
void | setBig () |
Other methods | |
void | addMatch (PatternMatch &match) |
Private Types | |
using | patternMatchConstIterator = std::vector< PatternMatch >::const_iterator |
using | patternMatchIterator = std::vector< PatternMatch >::iterator |
Private Attributes | |
std::string | name |
name of pattern More... | |
std::string | description |
description of pattern More... | |
std::string | yaraRuleName |
set name of YARA rule More... | |
bool | little = false |
true if pattern is little endian More... | |
bool | big = false |
true if pattern is big endian More... | |
std::vector< PatternMatch > | matches |
all matches of pattern More... | |
Class for information about detected pattern
|
private |
|
private |
void retdec::fileinfo::Pattern::addMatch | ( | PatternMatch & | match | ) |
Add detected match
match | Detected match |
Pattern::patternMatchIterator retdec::fileinfo::Pattern::begin | ( | ) |
Get begin matches iterator
Pattern::patternMatchConstIterator retdec::fileinfo::Pattern::begin | ( | ) | const |
Get const begin matches iterator
Pattern::patternMatchIterator retdec::fileinfo::Pattern::end | ( | ) |
Get end matches iterator
Pattern::patternMatchConstIterator retdec::fileinfo::Pattern::end | ( | ) | const |
Get const end matches iterator
std::string retdec::fileinfo::Pattern::getDescription | ( | ) | const |
Get description of pattern
const PatternMatch * retdec::fileinfo::Pattern::getMatch | ( | std::size_t | index | ) | const |
Get selected pattern match
index | Index of selected match (0..x) |
nullptr
if index is out of range const std::vector< PatternMatch > & retdec::fileinfo::Pattern::getMatches | ( | ) | const |
Get all matches
std::string retdec::fileinfo::Pattern::getName | ( | ) | const |
Get name of pattern
std::size_t retdec::fileinfo::Pattern::getNumberOfMatches | ( | ) | const |
Get number of detected matches
std::string retdec::fileinfo::Pattern::getYaraRuleName | ( | ) | const |
Get name of YARA rule
bool retdec::fileinfo::Pattern::isBig | ( | ) | const |
Check if detected pattern is in big endian
true
if detected pattern is in big endian, false
otherwise bool retdec::fileinfo::Pattern::isLittle | ( | ) | const |
Check if detected pattern is in little endian
true
if detected pattern is in little endian, false
otherwise void retdec::fileinfo::Pattern::setBig | ( | ) |
Set little endian
void retdec::fileinfo::Pattern::setDescription | ( | std::string | sDescription | ) |
Set description of pattern
sDescription | Description of pattern |
void retdec::fileinfo::Pattern::setLittle | ( | ) |
Set little endian
void retdec::fileinfo::Pattern::setName | ( | std::string | sName | ) |
Set name of pattern
sName | Name of pattern |
void retdec::fileinfo::Pattern::setYaraRuleName | ( | std::string | sYaraRuleName | ) |
Set name of YARA rule
sYaraRuleName | Name of YARA rule |
|
private |
true
if pattern is big endian
|
private |
description of pattern
|
private |
true
if pattern is little endian
|
private |
all matches of pattern
|
private |
name of pattern
|
private |
set name of YARA rule