mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
fix: resolve recent service scan regressions
This commit is contained in:
@@ -477,6 +477,13 @@ func (t *TPKT) recvFastPath(s []byte, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// NLA-only authentication can receive a Fast-Path packet before the PDU
|
||||
// layer installs a listener. Treat it as an ignorable early packet instead
|
||||
// of dereferencing a nil interface and crashing the whole scan.
|
||||
if t.fastPathListener == nil {
|
||||
return
|
||||
}
|
||||
|
||||
t.fastPathListener.RecvFastPath(t.secFlag, s)
|
||||
core.StartReadBytes(2, t.Conn, t.recvHeader)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package tpkt
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/shadow1ng/fscan/libs/grdp/glog"
|
||||
)
|
||||
|
||||
func TestRecvFastPathWithoutListenerDoesNotPanic(t *testing.T) {
|
||||
glog.SetLevel(glog.NONE)
|
||||
tpkt := &TPKT{}
|
||||
tpkt.recvFastPath([]byte{0x00}, nil)
|
||||
}
|
||||
Reference in New Issue
Block a user