Class: SymbolsLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/node-marshal.rb

Overview

Designed for the logging of symbols table changes. When an example of SymbolsLogger is created the current global table of symbols is saved inside it. The created example can be used for finding new symbols in the global table. This is useful for code obfuscation.

Instance Method Summary collapse

Constructor Details

#initializeSymbolsLogger

Returns a new instance of SymbolsLogger.



207
208
209
# File 'lib/node-marshal.rb', line 207

def initialize
	@symtbl_old = Symbol.all_symbols
end

Instance Method Details

#new_symbolsObject



211
212
213
214
# File 'lib/node-marshal.rb', line 211

def new_symbols
	symtbl_new = Symbol.all_symbols
	symtbl_new - @symtbl_old
end

#updateObject



216
217
218
# File 'lib/node-marshal.rb', line 216

def update
	@symtbl_old = Symbol.all_symbols
end