Skip to content

Commit

Permalink
Land #4161, "stop" NilClass fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wvu committed Nov 10, 2014
2 parents bc55293 + 8f3b1e7 commit 0e772cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/rex/exploitation/cmdstager/tftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ def initialize(exe)
end

def setup(mod)
tftp = Rex::Proto::TFTP::Server.new
tftp.register_file(Rex::Text.rand_text_alphanumeric(8), exe)
tftp.start
mod.add_socket(tftp) # Hating myself for doing it... but it's just a first demo
self.tftp = Rex::Proto::TFTP::Server.new
self.tftp.register_file(Rex::Text.rand_text_alphanumeric(8), exe)
self.tftp.start
mod.add_socket(self.tftp) # Hating myself for doing it... but it's just a first demo
end

def teardown(mod = nil)
tftp.stop
self.tftp.stop
end

#
Expand Down
3 changes: 2 additions & 1 deletion modules/exploits/multi/http/struts_code_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote

include Msf::Exploit::CmdStager
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::EXE

def initialize(info = {})
super(update_info(info,
Expand Down Expand Up @@ -91,7 +92,7 @@ def execute_command(cmd, opts = {})
def windows_stager
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
execute_cmdstager({ :temp => '.' })
@payload_exe = payload_exe
@payload_exe = generate_payload_exe

print_status("Attempting to execute the payload...")
execute_command(@payload_exe)
Expand Down

2 comments on commit 0e772cc

@wchen-r7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct PR should be: #4160

@wvu
Copy link
Contributor Author

@wvu wvu commented on 0e772cc Nov 10, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @wchen-r7.

Please sign in to comment.