Class: Rex::Poly::Machine::SymbolicPermutation

Inherits:
Permutation
  • Object
show all
Defined in:
lib/rex/poly/machine/machine.rb

Overview

A symbolic permutation to mark locations like the begining and end of a group of blocks. Used to calculate usefull offsets.

Instance Attribute Summary

Attributes inherited from Permutation

#active, #args, #length, #name, #offset, #primitive

Instance Method Summary collapse

Methods inherited from Permutation

#add_child, #has_children?, #is_valid?, #remove_children, #render, #solve

Constructor Details

#initialize(name, machine, initial_offset = 0) ⇒ SymbolicPermutation

Returns a new instance of SymbolicPermutation.



184
185
186
187
188
189
190
191
192
# File 'lib/rex/poly/machine/machine.rb', line 184

def initialize( name, machine, initial_offset=0 )
  super( name, '', machine, '' )
  # fudge the initial symbolic offset with a default (it gets patched correctly later),
  # helps with the end symbolic block to not be 0 (as its a forward reference it really
  # slows things down if we leave it 0)
  @offset = initial_offset
  # A symbolic block is allways active!
  @active = true
end

Instance Method Details

#active=(value) ⇒ Object

We block all attempts to set the active state of this permutation so as it is always true. This lets us always address the offset.



198
199
# File 'lib/rex/poly/machine/machine.rb', line 198

def active=( value )
end