shadow1ng/fscan · error
close
Error message
close
What it means
Synthetic error created inside the RDP 'close' event handler: the PDU layer reported the session closed (server dropped the connection) without a preceding 'success' or explicit 'error' event, so a generic error is fabricated to signal the connection ended prematurely.
Source
Thrown at libs/grdp/login/screen.go:237
info["reconn"] = protocol
g.pdu.Emit("close")
exitFlag <- true
})
err = g.x224.Connect()
if err != nil {
info["err"] = err.Error()
return
}
glog.Info("wait connect ok")
g.pdu.On("error", func(e error) {
err = e
glog.Error("error", e)
g.pdu.Emit("done")
})
g.pdu.On("close", func() {
err = errors.New("close")
glog.Info("on close")
g.pdu.Emit("done")
})
g.pdu.On("success", func() {
glog.Debugf("===============login success %s===============", ip)
err = nil
g.pdu.Emit("done")
})
g.pdu.On("ready", func() {
err = nil
glog.Debug("on ready")
})
g.pdu.On("bitmap", func(rectangles []pdu.BitmapData) {
})
g.pdu.On("done", func() {
glog.Debug("done signal triggered")
exitFlag <- true
})View on GitHub (pinned to 95cc12e753)
Solutions
- Retry the RDP connection once; transient closes are common
- Check network reachability and whether the server limits concurrent sessions
- Distinguish this from real errors by treating a bare close as 'incomplete', not failure with credentials
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at libs/grdp/login/screen.go:237 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/7de1b683503b143d.
Report an issue: GitHub.