bug/bundler_fix
jvazquez-r7 2013-07-11 12:37:16 -05:00
commit 80c4f99132
4 changed files with 22 additions and 10 deletions

View File

@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Rapid7 LLC nor the names of its contributors
* Neither the name of Rapid7, Inc. nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
@ -30,7 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The Metasploit Framework is provided under the 3-clause BSD license above.
The copyright on this package is held by Rapid7 LLC.
The copyright on this package is held by Rapid7, Inc.
This license does not apply to several components within the Metasploit
Framework source tree. For more details see the LICENSE file.

View File

@ -1881,7 +1881,7 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
'C'+ # Short File Name Length
'C' # Reserved
)
name = resp_data[didx + 70 + 24, info[15]].sub!(/\x00+$/, '')
name = resp_data[didx + 70 + 24, info[15]].sub(/\x00+$/, '')
files[name] =
{
'type' => ((info[14] & 0x10)==0x10) ? 'D' : 'F',
@ -1916,7 +1916,7 @@ NTLM_UTILS = Rex::Proto::NTLM::Utils
260, # Level of interest
resume_key, # Resume key from previous (Last name offset)
6, # Close search if end of search
].pack('vvvVv') + last_filename + "\x00" # Last filename returned from find_first or find_next
].pack('vvvVv') + last_filename.to_s + "\x00" # Last filename returned from find_first or find_next
resp = trans2(CONST::TRANS2_FIND_NEXT2, parm, '')
return resp # Returns the FIND_NEXT2 response packet for parsing by the find_first function
end

15
msfcli
View File

@ -141,8 +141,12 @@ exploit.init_ui(
mode = ARGV.pop || 'h'
# Import options
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
begin
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
rescue Rex::ArgumentParseError => e
puts "[!] Error: #{e.message}\n\n"
exit
end
# Initialize associated modules
payload = nil
@ -152,21 +156,21 @@ nop = nil
if (exploit.datastore['PAYLOAD'])
payload = $framework.payloads.create(exploit.datastore['PAYLOAD'])
if (payload != nil)
payload.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
payload.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
end
end
if (exploit.datastore['ENCODER'])
encoder = $framework.encoders.create(exploit.datastore['ENCODER'])
if (encoder != nil)
encoder.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
encoder.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
end
end
if (exploit.datastore['NOP'])
nop = $framework.nops.create(exploit.datastore['NOP'])
if (nop != nil)
nop.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
nop.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
end
end
@ -178,7 +182,6 @@ case mode.downcase
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(payload, Indent)) if payload
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(encoder, Indent)) if encoder
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(nop, Indent)) if nop
when "o"
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(exploit, Indent))
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(payload, Indent)) if payload

View File

@ -97,6 +97,10 @@ def parse_args
opts[:list_options] = true
end
opt.on('-d', '--advance', 'List the payload\'s advance options') do
opts[:list_advance] = true
end
opt.on_tail('-h', '--help', 'Show this message') do
$stderr.puts opt
exit(1)
@ -338,6 +342,11 @@ if opts[:list_options]
exit
end
if opts[:list_advance]
puts Msf::Serializer::ReadableText.dump_advanced_options(payload)
exit
end
if payload_raw.nil? or payload_raw.empty?
begin
payload_raw = payload.generate_simple(