Skip to content

Commit

Permalink
New files
Browse files Browse the repository at this point in the history
  • Loading branch information
smashery committed Nov 20, 2024
1 parent 10e4fb0 commit b8d54d6
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/ruby_smb/dcerpc/samr/samr_change_password_user_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module RubySMB
module Dcerpc
module Samr

# [3.1.5.10.1 SamrChangePasswordUser (Opnum 38)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/9699d8ca-e1a4-433c-a8c3-d7bebeb01476)
class SamrChangePasswordUserRequest < BinData::Record
attr_reader :opnum

endian :little

sampr_handle :user_handle
ndr_uint8 :lm_present
pencrypted_nt_owf_password :old_lm_encrypted_with_new_lm
pencrypted_nt_owf_password :new_lm_encrypted_with_old_lm
ndr_uint8 :nt_present
pencrypted_nt_owf_password :old_nt_encrypted_with_new_nt
pencrypted_nt_owf_password :new_nt_encrypted_with_old_nt
ndr_uint8 :nt_cross_encryption_present
pencrypted_nt_owf_password :new_nt_encrypted_with_new_nt
ndr_uint8 :lm_cross_encryption_present
pencrypted_nt_owf_password :new_lm_encrypted_with_new_nt

def initialize_instance
super
@opnum = SAMR_CHANGE_PASSWORD_USER
end
end

end
end
end
21 changes: 21 additions & 0 deletions lib/ruby_smb/dcerpc/samr/samr_change_password_user_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module RubySMB
module Dcerpc
module Samr

# [3.1.5.10.1 SamrChangePasswordUser (Opnum 38)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/9699d8ca-e1a4-433c-a8c3-d7bebeb01476)
class SamrChangePasswordUserResponse < BinData::Record
attr_reader :opnum

endian :little

ndr_uint32 :error_status

def initialize_instance
super
@opnum = SAMR_CHANGE_PASSWORD_USER
end
end

end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module RubySMB
module Dcerpc
module Samr

# [3.1.5.10.3 SamrUnicodeChangePasswordUser2 (Opnum 55)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/acb3204a-da8b-478e-9139-1ea589edb880)
class SamrUnicodeChangePasswordUser2Request < BinData::Record
attr_reader :opnum

endian :little

prpc_unicode_string :server_name
rpc_unicode_string :user_name
psampr_encrypted_user_password :new_password_encrypted_with_old_nt
pencrypted_nt_owf_password :old_nt_owf_password_encrypted_with_new_nt
ndr_uint8 :lm_present
psampr_encrypted_user_password :new_password_encrypted_with_old_lm
pencrypted_nt_owf_password :old_lm_owf_password_encrypted_with_new_nt

def initialize_instance
super
@opnum = SAMR_UNICODE_CHANGE_PASSWORD_USER2
end
end

end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module RubySMB
module Dcerpc
module Samr

# [3.1.5.10.3 SamrUnicodeChangePasswordUser2 (Opnum 55)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/acb3204a-da8b-478e-9139-1ea589edb880)
class SamrUnicodeChangePasswordUser2Response < BinData::Record
attr_reader :opnum

endian :little

ndr_uint32 :error_status

def initialize_instance
super
@opnum = SAMR_UNICODE_CHANGE_PASSWORD_USER2
end
end

end
end
end

0 comments on commit b8d54d6

Please sign in to comment.