mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c921c375b | ||
|
|
6bb8ccd490 |
@@ -243,6 +243,9 @@ func (p *SMTPPlugin) testAnonymousAccess(ctx context.Context, info *common.HostI
|
|||||||
}
|
}
|
||||||
defer func() { _ = conn.Close() }()
|
defer func() { _ = conn.Close() }()
|
||||||
|
|
||||||
|
// 修复: 设置读写超时, 防止对只accept不发送banner的服务器(tarpit)永久阻塞
|
||||||
|
_ = conn.SetDeadline(time.Now().Add(session.Config.ModuleTimeout()))
|
||||||
|
|
||||||
client, err := smtp.NewClient(conn, info.Host)
|
client, err := smtp.NewClient(conn, info.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resultChan <- nil
|
resultChan <- nil
|
||||||
@@ -295,6 +298,9 @@ func (p *SMTPPlugin) testOpenRelay(ctx context.Context, info *common.HostInfo, s
|
|||||||
}
|
}
|
||||||
defer func() { _ = conn.Close() }()
|
defer func() { _ = conn.Close() }()
|
||||||
|
|
||||||
|
// 修复: 设置读写超时, 防止对只accept不发送banner的服务器(tarpit)永久阻塞
|
||||||
|
_ = conn.SetDeadline(time.Now().Add(session.Config.ModuleTimeout()))
|
||||||
|
|
||||||
client, err := smtp.NewClient(conn, info.Host)
|
client, err := smtp.NewClient(conn, info.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resultChan <- nil
|
resultChan <- nil
|
||||||
|
|||||||
Reference in New Issue
Block a user