1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-28 00:59:04 +00:00

Use smtp.get_domain instead of example.com for STARTTLS. Closes #1258

This commit is contained in:
dmiller
2018-07-11 04:12:00 +00:00
parent baed30beed
commit 33f0f050cf
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
#Nmap Changelog ($Id$); -*-text-*-
o [NSE][GH#1258] Use smtp.domain script arg or target's domain name instead of
"example.com" in EHLO command used for STARTTLS. [gwire]
o [NSE][GH#1233] Fix brute.lua's BruteSocket wrapper, which was crashing Nmap
with an assertion failure due to socket mixup [Daniel Miller]:
nmap: nse_nsock.cc:672: int receive_buf(lua_State*, int, lua_KContext): Assertion `lua_gettop(L) == 7' failed.

View File

@@ -346,7 +346,7 @@ StartTLS = {
end
local status
status, result = smtp.query(s, "LHLO", "example.com")
status, result = smtp.query(s, "LHLO", smtp.get_domain(host))
if not status then
stdnse.debug1("LHLO with errors or timeout. Enable --script-trace to see what is happening.")
return false, string.format("Failed to LHLO: %s", result)
@@ -468,7 +468,7 @@ StartTLS = {
end
local status
status, result = smtp.ehlo(s, "example.com")
status, result = smtp.ehlo(s, smtp.get_domain(host))
if not status then
stdnse.debug1("EHLO with errors or timeout. Enable --script-trace to see what is happening.")
return false, string.format("Failed to connect to SMTP server: %s", result)