{"record":{"id":"5acc970d1ce81b7b","repo":"projectdiscovery/nuclei","slug":"failed-to-read-response-w","errorCode":null,"errorMessage":"failed to read response: %w","messagePattern":"failed to read response: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/telnet/telnet.go","lineNumber":260,"sourceCode":"\n\t// Set timeout\n\t_ = conn.SetDeadline(time.Now().Add(10 * time.Second))\n\n\t// Use the MS-TNAP packet crafting functions from our telnetmini library\n\t// Create MS-TNAP Login Packet (Option Command IS) as per Nmap script\n\ttnapLoginPacket := telnetmini.CreateTNAPLoginPacket()\n\n\t// Send the MS-TNAP login packet\n\t_, err = conn.Write(tnapLoginPacket)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to send MS-TNAP login packet: %w\", err)\n\t}\n\n\t// Read response data\n\tbuffer := make([]byte, 4096)\n\tn, err := conn.Read(buffer)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read response: %w\", err)\n\t}\n\n\tif n == 0 {\n\t\treturn nil, fmt.Errorf(\"no response received\")\n\t}\n\n\t// Parse NTLM response using our telnetmini library functions\n\tresponse := buffer[:n]\n\n\t// Use the parsing functions from our library instead of reimplementing\n\t// This should use the NTLM parsing functions we added to telnetmini\n\tntlmInfo, err := telnetmini.ParseNTLMResponse(response)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse NTLM response: %w\", err)\n\t}\n\n\treturn ntlmInfo, nil\n}","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/telnet/telnet.go#L242-L278","documentation":"Returned by telnet.DetectNTLM when reading the server's response fails after the MS-TNAP login packet was sent successfully. The read runs under a hardcoded 10-second deadline set on the connection just before the exchange, so the common cause is an i/o timeout — the server sent nothing within 10s — or a connection reset/EOF while waiting.","triggerScenarios":"Server receives the TNAP packet but never answers (non-Windows telnet, or NTLM not enabled and the server waits for plain telnet negotiation); connection reset mid-read; slow or lossy network exceeding the 10s deadline.","commonSituations":"Probing Linux telnetd or embedded devices that ignore MS-TNAP; high-latency targets; IDS terminating the session after seeing the NTLM probe.","solutions":["Confirm the target is a Windows telnet service with NTLM authentication enabled","Treat timeout as 'no NTLM info' and continue the scan rather than failing the template","Retry once for flaky links; check egress filtering if reads always time out"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { client.DetectNTLM(host, port) } catch (e) { if (String(e).includes('failed to read response')) { /* 10s deadline hit or reset: treat as no NTLM */ } else { throw e; } }","preventionTips":["Assume 10s hardcoded read deadline when choosing targets","Treat read timeouts as negative results, not failures","Pre-filter to likely-Windows hosts to cut wasted probes"],"tags":["telnet","javascript","nuclei","network","timeout"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}