projectdiscovery/nuclei · error
smb path is a directory, not a file: %s
Error message
smb path is a directory, not a file: %s
What it means
Error "smb path is a directory, not a file: %s" thrown in projectdiscovery/nuclei.
Source
Thrown at pkg/protocols/file/smb_bridge.go:124
}
for _, e := range entries {
if e.IsDir {
continue
}
child := *target
child.Path = e.Name
callback(child.Display())
}
return nil
}
func (request *Request) readSMBFile(ctx context.Context, displayPath string) (string, error) {
target, err := ParseSMBTarget(displayPath)
if err != nil {
return "", err
}
if target.Path == "." || isDirectorySMBTarget(displayPath) {
return "", fmt.Errorf("smb path is a directory, not a file: %s", displayPath)
}
execID := request.executionID()
if execID == "" {
return "", fmt.Errorf("smb file target requires an initialized execution id")
}
sess, err := smbsession.Dial(ctx, execID, target.Host, request.smbPort(target), request.resolveSMBCreds(target))
if err != nil {
return "", err
}
defer sess.Close()
maxBytes := request.maxSize
if maxBytes <= 0 {
maxBytes = smbsession.DefaultMaxReadBytes
}
return sess.ReadFile(target.Share, target.Path, maxBytes)
}
// isDirectorySMBTarget reports whether the path refers to a share root / dir listing.View on GitHub (pinned to 265b3a3dec)
When it happens
Trigger: Thrown at pkg/protocols/file/smb_bridge.go:124 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/61b41c94f315b390.
Report an issue: GitHub.