module RubySMB::Dcerpc::Srvsvc

Constants

NET_SHARE_ENUM_ALL

Operation numbers

UUID
VER_MAJOR
VER_MINOR

Public Instance Methods

net_share_enum_all(host) click to toggle source
# File lib/ruby_smb/dcerpc/srvsvc.rb, line 14
def net_share_enum_all(host)
  bind(endpoint: RubySMB::Dcerpc::Srvsvc)

  net_share_enum_all_request_packet = RubySMB::Dcerpc::Srvsvc::NetShareEnumAll.new(host: host)
  response = dcerpc_request(net_share_enum_all_request_packet)

  shares = RubySMB::Dcerpc::Srvsvc::NetShareEnumAll.parse_response(response)
  shares.map{|s|{name: s[0], type: s[1], comment: s[2]}}
end