some documentation and code cleanups
git-svn-id: file:///home/svn/incoming/trunk@2670 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
832a97d3e3
commit
3911bacc34
|
@ -21,21 +21,19 @@ class Client
|
|||
checksig()
|
||||
end
|
||||
|
||||
def brand(klass)
|
||||
klass = klass.dup
|
||||
klass.client = self
|
||||
return klass
|
||||
end
|
||||
|
||||
# Get a File-like class
|
||||
def file
|
||||
brand(Rex::Post::DispatchNinja::File)
|
||||
end
|
||||
# Get a File::Stat-like class
|
||||
def filestat
|
||||
brand(Rex::Post::DispatchNinja::FileStat)
|
||||
end
|
||||
# Get a Process-like class
|
||||
def process
|
||||
brand(Rex::Post::DispatchNinja::Process)
|
||||
end
|
||||
# Get a Dir-like class
|
||||
def dir
|
||||
brand(Rex::Post::DispatchNinja::Dir)
|
||||
end
|
||||
|
@ -74,6 +72,13 @@ class Client
|
|||
return sock.read(len)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def brand(klass)
|
||||
klass = klass.dup
|
||||
klass.client = self
|
||||
return klass
|
||||
end
|
||||
end
|
||||
|
||||
end; end; end # DispatchNinja/Post/Rex
|
||||
|
|
|
@ -12,6 +12,8 @@ class Dir < Rex::Post::Dir
|
|||
attr_accessor :client
|
||||
end
|
||||
|
||||
#--
|
||||
|
||||
def Dir.entries(name)
|
||||
|
||||
client.sendmodule('ls')
|
||||
|
@ -37,6 +39,7 @@ class Dir < Rex::Post::Dir
|
|||
return files
|
||||
end
|
||||
|
||||
#++
|
||||
end
|
||||
|
||||
end; end; end # DispatchNinja/Post/Rex
|
||||
|
|
Loading…
Reference in New Issue