| Class | Msf::Encoder |
| In: |
lib/msf/core/encoder.rb
|
| Parent: | Module |
This class is the base class that all encoders inherit from.
Returns the size of each logical encoding block, in bytes. This is typically the same as decoder_key_size.
Performs the actual encoding operation after the encoder state has been initialized and is ready to go.
This method generates an encoded version of the supplied buffer in buf using the bad characters as guides. On success, an encoded and functional version of the supplied buffer will be returned. Otherwise, an exception will be thrown if an error is encountered during the encoding process.
This callback allows a derived class to finalize a stub after a key have been selected. The finalized stub should be returned.
Returns a string that should be prepended to the encoded version of the buffer before returning it to callers.
Provides the encoder with an opportunity to return the native format (as in the format the code will be in when it executes on the target). In general, the same buffer is returned to the caller. However, for things like unicode, the buffer is unicod encoded and then returned.
This method finds a compatible key for the supplied buffer based also on the supplied bad characters list. This is meant to make encoders more reliable and less prone to bad character failure by doing a fairly complete key search before giving up on an encoder.
Initializes the encoding state supplied as an argument to the attributes that have been defined for this decoder stub, such as key offset, size, and pack.
Convert an integer into the individual key bytes based on the decoder‘s key size and packing requirements
Convert individual key bytes into a single integer based on the decoder‘s key size and packing requirements