Skip to content

Commit

Permalink
Land #18377, add support for HELO to smtp_relay auxiliary module in c…
Browse files Browse the repository at this point in the history
…ase EHLO is not supported
  • Loading branch information
adfoster-r7 authored Sep 18, 2023
2 parents 0fc88a8 + e5c9226 commit 4dd18d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/auxiliary/scanner/smtp/smtp_relay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ def do_test_relay(testnumber, mailfrom, mailto)

res = raw_send_recv("EHLO X\r\n")
vprint_status("#{res.inspect}")
# check if the EHLO is actually supported. In case it's not, try the HELO command instead
if res.to_s =~ /^5\d\d/
res = raw_send_recv("HELO X\r\n")
vprint_status("#{res.inspect}")
end

res = raw_send_recv("#{mailfrom}\r\n")
vprint_status("#{res.inspect}")
Expand Down

0 comments on commit 4dd18d8

Please sign in to comment.