Skip to content

Commit

Permalink
Add in debug printing of LookupSidsResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed May 2, 2024
1 parent e519c7b commit 2d42220
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ruby_smb/dcerpc/lsarpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ class LsaprReferencedDomainList < Ndr::NdrStruct
endian :little

ndr_uint32 :num_entries
lsapr_trust_information_array_ptr :domains
array :domains, type: :lsapr_trust_information, :initial_length => :num_entries, byte_align: 4
# lsapr_trust_information_array_ptr :domains
ndr_uint32 :max_entries
end

Expand Down Expand Up @@ -614,7 +615,6 @@ def lsar_close_handle(policy_handle:)
end

def lsar_lookup_sids(policy_handle:, sid_enum_buffer:, lookup_level:)
require 'pry-byebug'; binding.pry;
lsar_request = LsarLookupSidsRequest.new(
policy_handle: policy_handle,
sid_enum_buffer: sid_enum_buffer,
Expand All @@ -625,7 +625,9 @@ def lsar_lookup_sids(policy_handle:, sid_enum_buffer:, lookup_level:)
response = dcerpc_request(lsar_request)
begin
require 'pry-byebug'; binding.pry;
lsar_response = LsarLookupSidsResponse.read(response)
BinData::trace_reading(STDERR) do
lsar_response = LsarLookupSidsResponse.read(response)
end
rescue IOError
raise RubySMB::Dcerpc::Error::InvalidPacket, 'Error reading LsarLookupSidsResponse'
end
Expand Down

0 comments on commit 2d42220

Please sign in to comment.