Struct.new(:length, :magic, :format, :correlid, :length2, :codepoint, :secmec, :rdbnam, :password, :userid)
# File lib/rex/proto/drda/packet.rb, line 223 def initialize(args={}) # Takes :dbname, :dbpass, :dbuser self[:magic] = 0xd0 self[:format] = 0x01 self[:correlid] = 2 self[:codepoint] = Constants::SECCHK self[:secmec] = SECMEC_PARAM.new.to_s if args[:dbname] # Include a database name if we're given one. self[:rdbnam] = RDBNAM_PARAM.new(:payload => args[:dbname]).to_s end self[:password] = PASSWORD_PARAM.new(:payload => args[:dbpass]).to_s self[:userid] = USERID_PARAM.new(:payload => args[:dbuser]).to_s self[:length] = ( 10 + self[:secmec].to_s.size + self[:rdbnam].to_s.size + self[:password].to_s.size + self[:userid].to_s.size ) self[:length2] = self[:length]-6 end
Generated with the Darkfish Rdoc Generator 2.