Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4156, cmdstager NoMethodError undefined method `stop' #4160

Merged
merged 2 commits into from
Nov 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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