From 03004645f0a89fa9326436dc8397db8db9749e61 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sun, 10 Jun 2012 13:19:22 -0500 Subject: [PATCH] Make the description clear that it only reads 4k, default datastore['FD'] to 1 --- modules/payloads/singles/linux/x86/read_file.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/payloads/singles/linux/x86/read_file.rb b/modules/payloads/singles/linux/x86/read_file.rb index cfcd09c71f..57f23d36b3 100644 --- a/modules/payloads/singles/linux/x86/read_file.rb +++ b/modules/payloads/singles/linux/x86/read_file.rb @@ -16,7 +16,7 @@ module Metasploit3 super(merge_info(info, 'Name' => 'Linux Read File', 'Version' => '', - 'Description' => 'Read a file from the local file system, and write it back out to the specified file descriptor', + 'Description' => 'Read up to 4096 bytes from the local file system and write it back out to the specified file descriptor', 'Author' => 'hal', 'License' => MSF_LICENSE, 'Platform' => 'linux', @@ -25,13 +25,13 @@ module Metasploit3 # Register exec options register_options( [ - OptString.new('FILE', [ true, "The file to read" ]), - OptString.new('FD', [ false, "The file descriptor to write output to" ]), + OptString.new('PATH', [ true, "The file path to read" ]), + OptString.new('FD', [ true, "The file descriptor to write output to", 1 ]), ], self.class) end def generate_stage - fd = datastore['FD'] || 1 + fd = datastore['FD'] payload_data =<<-EOS jmp file @@ -63,7 +63,7 @@ module Metasploit3 file: call open - db "#{datastore['FILE']}", 0x00 + db "#{datastore['PATH']}", 0x00 EOS Metasm::Shellcode.assemble(Metasm::Ia32.new, payload_data).encode_string