Package IDAscope :: Package idascope :: Package core :: Module PatternManager :: Class PatternManager
[hide private]
[frames] | no frames]

Class PatternManager

source code

This class stores patterns for crypto detection and allows manipulations on them, such as tokenizing into certain bytes lengths in order to increase detection robustness.

Instance Methods [hide private]
 
__init__(self) source code
 
get_tokenized_signatures(self, pattern_length)
Get the full collection of signature, but with each signature tokenized in byte-strings of maximum length pattern_length.
source code
 
_is_zero_token(self, token)
Check if the given token consists only of zero bytes
source code
 
print_signatures(self)
Used for informational purposes only, prints all names of signatures defined in the PatternManager
source code
Class Variables [hide private]
  signatures = {'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0...
Method Details [hide private]

get_tokenized_signatures(self, pattern_length)

source code 

Get the full collection of signature, but with each signature tokenized in byte-strings of maximum length pattern_length. The storage format is almost the same as the signature storage, a dictionary of key/value ("byte_signature", ["signature_name"])

Parameters:
  • pattern_length (int)

_is_zero_token(self, token)

source code 

Check if the given token consists only of zero bytes

Parameters:
  • token (str) - a token to check for zero bytes

Class Variable Details [hide private]

signatures

Value:
{'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x\
01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x02\x00\
\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x\
00\x03\x00\x00\x00\x03\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x04\
\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x05\x00\x\
00\x00\x05\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00': 'zinflate_len\
gthExtraBits',
...