-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from smcintyre-r7/pr/collab/269
Add DsrGetDcNameEx2Response
- Loading branch information
Showing
4 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'ruby_smb/dcerpc/ndr' | ||
|
||
module RubySMB | ||
module Dcerpc | ||
module Netlogon | ||
|
||
# [2.2.1.2.1 DOMAIN_CONTROLLER_INFOW](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrpc/9b85a7a4-8d34-4b9e-9500-bf8644ebfc06) | ||
class DomainControllerInfoW < Ndr::NdrStruct | ||
default_parameters byte_align: 4 | ||
endian :little | ||
|
||
ndr_wide_stringz_ptr :domain_controller_name | ||
ndr_wide_stringz_ptr :domain_controller_address | ||
ndr_uint32 :domain_controller_address_type | ||
uuid :domain_guid | ||
ndr_wide_stringz_ptr :domain_name | ||
ndr_wide_stringz_ptr :dns_forest_name | ||
ndr_uint32 :flags | ||
ndr_wide_stringz_ptr :dc_site_name | ||
ndr_wide_stringz_ptr :client_site_name | ||
end | ||
|
||
class DomainControllerInfoWPtr < DomainControllerInfoW | ||
extend Ndr::PointerClassPlugin | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
lib/ruby_smb/dcerpc/netlogon/dsr_get_dc_name_ex2_response.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'ruby_smb/dcerpc/ndr' | ||
require 'ruby_smb/dcerpc/netlogon/domain_controller_infow' | ||
|
||
module RubySMB | ||
module Dcerpc | ||
module Netlogon | ||
|
||
# [3.5.4.3.1 DsrGetDcNameEx2 (Opnum 34)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrpc/fb8e1146-a045-4c31-98d1-c68507ad5620) | ||
class DsrGetDcNameEx2Response < BinData::Record | ||
attr_reader :opnum | ||
|
||
endian :little | ||
|
||
domain_controller_info_w_ptr :domain_controller_info | ||
ndr_uint32 :error_status | ||
|
||
def initialize_instance | ||
super | ||
@opnum = DSR_GET_DC_NAME_EX2 | ||
end | ||
end | ||
end | ||
end | ||
end |