Module: RubySMB::Dcerpc::Wkssvc
- Defined in:
- lib/ruby_smb/dcerpc/wkssvc.rb,
lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_request.rb,
lib/ruby_smb/dcerpc/wkssvc/netr_wksta_get_info_response.rb
Defined Under Namespace
Classes: LpwkstaInfo, NetrWkstaGetInfoRequest, NetrWkstaGetInfoResponse, PwkstaInfo100, PwkstaInfo101, PwkstaInfo102, WkssvcIdentifyHandle, WkstaInfo100, WkstaInfo101, WkstaInfo102
Constant Summary collapse
- UUID =
'6BFFD098-A112-3610-9833-46C3F87E345A'
- VER_MAJOR =
1
- VER_MINOR =
0
- NETR_WKSTA_GET_INFO =
Operation numbers
0x0000
- PLATFORM_ID =
{ 0x0000012C => "DOS", 0x00000190 => "OS2", 0x000001F4 => "Win", 0x00000258 => "OSF", 0x000002BC => "VMS" }
- WKSTA_INFO_100 =
Information Level
0x00000064
- WKSTA_INFO_101 =
0x00000065
- WKSTA_INFO_102 =
0x00000066
Instance Method Summary collapse
-
#netr_wksta_get_info(server_name: "\x00", level: WKSTA_INFO_100) ⇒ RubySMB::Dcerpc::Wkssvc::WkstaInfo100, ...
Returns details about a computer environment, including platform-specific information, the names of the domain and local computer, and the operating system version.
Instance Method Details
#netr_wksta_get_info(server_name: "\x00", level: WKSTA_INFO_100) ⇒ RubySMB::Dcerpc::Wkssvc::WkstaInfo100, ...
Returns details about a computer environment, including platform-specific information, the names of the domain and local computer, and the operating system version.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/ruby_smb/dcerpc/wkssvc.rb', line 43 def netr_wksta_get_info(server_name: "\x00", level: WKSTA_INFO_100) wkst_netr_wksta_get_info_request = NetrWkstaGetInfoRequest.new( server_name: server_name, level: level ) response = dcerpc_request(wkst_netr_wksta_get_info_request) begin wkst_netr_wksta_get_info_response = NetrWkstaGetInfoResponse.read(response) rescue IOError raise RubySMB::Dcerpc::Error::InvalidPacket, 'Error reading WkstNetrWkstaGetInfoResponse' end unless wkst_netr_wksta_get_info_response.error_status == WindowsError::NTStatus::STATUS_SUCCESS raise RubySMB::Dcerpc::Error::WkssvcError, "Error returned with netr_wksta_get_info: "\ "#{WindowsError::NTStatus.find_by_retval(wkst_netr_wksta_get_info_response.error_status.value).join(',')}" end wkst_netr_wksta_get_info_response.wksta_info.info end |