public class

BinaryPattern

extends Object
implements IBinaryPattern
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.analyzer.BinaryPattern

Class Overview

Basic implementation of a binary pattern. The checks are bytes+mask only; The custom verification method simply returns true.

Summary

Public Constructors
BinaryPattern(byte[] binary)
BinaryPattern(byte[] binary, byte[] mask)
BinaryPattern(byte[] binary, byte[] mask, int realStartOffset)
BinaryPattern(byte[] binary, byte[] mask, int realStartOffset, int processorMode)
Public Methods
byte[] getBinary()
Binary bytes.
Object getExtra()
Get some extra data associated to this pattern.
byte[] getMask()
Binary mask.
int getProcessorMode()
Valid processor mode for this Binary Pattern.
int getRealStartOffset()
The real start offset.
String toString()
boolean validate(INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd)
Final validation.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.code.asm.analyzer.IBinaryPattern

Public Constructors

public BinaryPattern (byte[] binary)

public BinaryPattern (byte[] binary, byte[] mask)

public BinaryPattern (byte[] binary, byte[] mask, int realStartOffset)

public BinaryPattern (byte[] binary, byte[] mask, int realStartOffset, int processorMode)

Public Methods

public byte[] getBinary ()

Binary bytes. Mandatory.

public Object getExtra ()

Get some extra data associated to this pattern. Client specific.

Returns
  • optional data

public byte[] getMask ()

Binary mask. Optional. If present, must have same length as getBinary().

public int getProcessorMode ()

Valid processor mode for this Binary Pattern. Can be MODE_DEFAULT if valid in any mode.

public int getRealStartOffset ()

The real start offset.

public String toString ()

public boolean validate (INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd)

Final validation. Optional method.