Method: Rex::Proto::NTLM::Message.parse

Defined in:
lib/rex/proto/ntlm/message.rb

.parse(str) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/rex/proto/ntlm/message.rb', line 62

def parse(str)
  m = Type0.new
  m.parse(str)
  case m.type
  when 1
    t = Type1.parse(str)
  when 2
    t = Type2.parse(str)
  when 3
    t = Type3.parse(str)
  else
    raise ArgumentError, "unknown type: #{m.type}"
  end
  t
end