@@ -12,7 +12,7 @@ class RespError < Error; end
1212# http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.drda/db2z_excsat.htm
1313class MGRLVLLS_PARAM < Struct . new ( :length , :codepoint , :payload )
1414 def initialize ( args = { } )
15- self [ :codepoint ] = Constants ::MGRLVLLS
15+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::MGRLVLLS
1616 self [ :payload ] = "\x14 \x03 \x00 \x0a \x24 \x07 \x00 \x0a " +
1717 "\x14 \x74 \x00 \x05 \x24 \x0f \x00 \x08 " +
1818 "\x14 \x40 \x00 \x09 \x1c \x08 \x04 \xb8 "
@@ -32,7 +32,7 @@ def initialize(args={})
3232 self [ :magic ] = 0xd0
3333 self [ :format ] = 0x41
3434 self [ :correlid ] = 1
35- self [ :codepoint ] = Constants ::EXCSAT
35+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::EXCSAT
3636 self [ :mgrlvlls ] = args [ :mgrlvlls ] || MGRLVLLS_PARAM . new . to_s
3737 self [ :length ] = ( 10 + self [ :mgrlvlls ] . to_s . size )
3838 self [ :length2 ] = self [ :length ] -6
@@ -50,7 +50,7 @@ def to_s
5050class SECMEC_PARAM < Struct . new ( :length , :codepoint , :payload )
5151 def initialize ( args = { } )
5252 self [ :length ] = 6
53- self [ :codepoint ] = Constants ::SECMEC
53+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::SECMEC
5454 self [ :payload ] = 3 # Plaintext username and password.
5555 end
5656 def to_s
@@ -62,7 +62,7 @@ def to_s
6262class RDBNAM_PARAM < Struct . new ( :length , :codepoint , :payload )
6363 def initialize ( args = { } )
6464 self [ :length ] = 22 # Since the database name is padded out.
65- self [ :codepoint ] = Constants ::RDBNAM
65+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::RDBNAM
6666 self [ :payload ] = encode ( args [ :payload ] . to_s )
6767 end
6868
@@ -90,7 +90,7 @@ def initialize(args={})
9090 self [ :magic ] = 0xd0
9191 self [ :format ] = args [ :format ] || 0x01
9292 self [ :correlid ] = 2
93- self [ :codepoint ] = Constants ::ACCSEC
93+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::ACCSEC
9494 self [ :secmec ] = SECMEC_PARAM . new . to_s
9595 if args [ :dbname ] # Include a database name if we're given one.
9696 self [ :rdbnam ] = RDBNAM_PARAM . new ( :payload => args [ :dbname ] ) . to_s
@@ -144,7 +144,7 @@ def read(str="")
144144 rest = str [ 10 , self [ :length2 ] -4 ]
145145 i = 0
146146 while ( i < rest . size )
147- if self [ :codepoint ] == Constants ::SQLCARD # These aren't DDM's.
147+ if self [ :codepoint ] == Rex :: Proto :: DRDA :: Constants ::SQLCARD # These aren't DDM's.
148148 this_param = rest [ i , self [ :length ] -10 ]
149149 else
150150 this_param = DDM_PARAM . new . read ( rest [ i , rest . size ] )
@@ -193,7 +193,7 @@ def sz; self.to_s.size; end
193193
194194class PASSWORD_PARAM < Struct . new ( :length , :codepoint , :payload )
195195 def initialize ( args = { } )
196- self [ :codepoint ] = Constants ::PASSWORD
196+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::PASSWORD
197197 self [ :payload ] = Rex ::Text . to_ebcdic ( args [ :payload ] . to_s )
198198 self [ :length ] = self [ :payload ] . size + 4
199199 end
@@ -207,7 +207,7 @@ def to_s
207207
208208class USERID_PARAM < Struct . new ( :length , :codepoint , :payload )
209209 def initialize ( args = { } )
210- self [ :codepoint ] = Constants ::USERID
210+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::USERID
211211 self [ :payload ] = Rex ::Text . to_ebcdic ( args [ :payload ] . to_s )
212212 self [ :length ] = self [ :payload ] . size + 4
213213 end
@@ -225,7 +225,7 @@ def initialize(args={}) # Takes :dbname, :dbpass, :dbuser
225225 self [ :magic ] = 0xd0
226226 self [ :format ] = 0x01
227227 self [ :correlid ] = 2
228- self [ :codepoint ] = Constants ::SECCHK
228+ self [ :codepoint ] = Rex :: Proto :: DRDA :: Constants ::SECCHK
229229 self [ :secmec ] = SECMEC_PARAM . new . to_s
230230 if args [ :dbname ] # Include a database name if we're given one.
231231 self [ :rdbnam ] = RDBNAM_PARAM . new ( :payload => args [ :dbname ] ) . to_s
0 commit comments