Fix check for TrueClass, plus other small changes

bug/bundler_fix
sinn3r 2015-02-28 14:11:15 -06:00
parent 6f4259f2de
commit 5f8c14c958
3 changed files with 5 additions and 5 deletions

View File

@ -72,7 +72,7 @@ class Client
if res && [200, 401, 403, 500].include?(res.code)
resp = MessagePack.unpack(res.body)
if resp && resp.kind_of?(::Hash) && resp['error']
if resp && resp.kind_of?(::Hash) && resp['error'] == true
raise Msf::RPC::ServerException.new(resp['error_code'] || res.code, resp['error_message'] || resp['error_string'], resp['error_class'], resp['error_backtrace'])
end

6
msfrpc
View File

@ -41,7 +41,7 @@ opts = {
}
# Parse command line arguments.
arguments.parse(ARGV) do |opt, idx, val|
arguments.parse(ARGV) { |opt, idx, val|
case opt
when "-a"
opts['ServerHost'] = val
@ -57,7 +57,7 @@ arguments.parse(ARGV) do |opt, idx, val|
print("\nUsage: #{File.basename(__FILE__)} <options>\n" + arguments.usage)
exit
end
end
}
unless opts['ServerHost']
@ -87,7 +87,7 @@ rpc.login(opts['User'], opts['Pass'])
puts "[*] The 'rpc' object holds the RPC client interface"
puts "[*] Use rpc.call('group.command') to make RPC calls"
puts
puts ''
while(ARGV.shift)
end

View File

@ -63,7 +63,7 @@ class Plugin::MSGRPC < Msf::Plugin
# If the run in foreground flag is not specified, then go ahead and fire
# it off in a worker thread.
unless opts['RunInForeground']
if (opts['RunInForeground'] != true)
# Store a handle to the thread so we can kill it during
# cleanup when we get unloaded.
self.thread = Thread.new { run }