Class: Nasl::CommandTokenize

Inherits:
Command
  • Object
show all
Defined in:
lib/nasl/commands/tokenize.rb

Class Method Summary collapse

Methods inherited from Command

all, banner, find, inherited, initialize!, run

Class Method Details

.analyze(cfg, path, args) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/nasl/commands/tokenize.rb', line 33

def self.analyze(cfg, path, args)
  contents = File.open(path, "rb").read

  begin
    Tokenizer.new(contents).get_tokens
  rescue TokenException => e
    puts "The tokenizer raised the following exceptions when processing #{path}:"
    puts e.message
    puts e.backtrace
    puts
  end
end

.bindingObject



29
30
31
# File 'lib/nasl/commands/tokenize.rb', line 29

def self.binding
  'tokenize'
end