{"record":{"id":"f84688032b6da0ef","repo":"shadow1ng/fscan","slug":"s","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/activemq.go","lineNumber":180,"sourceCode":"\t\treturn false, err\n\t}\n\n\tstompConnect := fmt.Sprintf(\"CONNECT\\naccept-version:1.0,1.1,1.2\\nhost:/\\nlogin:%s\\npasscode:%s\\n\\n\\x00\",\n\t\tusername, password)\n\n\t_ = conn.SetWriteDeadline(time.Now().Add(timeout))\n\tif _, err := conn.Write([]byte(stompConnect)); err != nil {\n\t\treturn false, fmt.Errorf(\"%s: %w\", i18n.GetText(\"activemq_stomp_send_failed\"), err)\n\t}\n\n\t_ = conn.SetReadDeadline(time.Now().Add(timeout))\n\tresponse := make([]byte, 1024)\n\tn, err := conn.Read(response)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"%s: %w\", i18n.GetText(\"activemq_stomp_read_failed\"), err)\n\t}\n\tif n == 0 {\n\t\treturn false, fmt.Errorf(\"%s\", i18n.GetText(\"activemq_stomp_empty_response\"))\n\t}\n\n\tresponseStr := string(response[:n])\n\n\tif strings.Contains(responseStr, \"CONNECTED\") {\n\t\treturn true, nil\n\t} else if strings.Contains(responseStr, \"ERROR\") {\n\t\terrorMsg := i18n.GetText(\"activemq_stomp_auth_error\")\n\t\tif strings.Contains(responseStr, \"Authentication failed\") {\n\t\t\terrorMsg = \"Authentication failed\"\n\t\t} else if strings.Contains(responseStr, \"Access denied\") {\n\t\t\terrorMsg = \"Access denied\"\n\t\t} else if strings.Contains(responseStr, \"Invalid credentials\") {\n\t\t\terrorMsg = \"Invalid credentials\"\n\t\t}\n\t\treturn false, fmt.Errorf(\"%s\", errorMsg)\n\t}\n","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/activemq.go#L162-L198","documentation":"Generic wrapper in ActiveMQ authenticateSTOMP for an empty STOMP response: the read succeeded but returned 0 bytes (n == 0), so there is no server frame to classify and authentication cannot be judged; the underlying message comes from the i18n sentinel for this case.","triggerScenarios":"conn.Read returns n==0 with no error, meaning an immediate EOF: the peer accepted TCP then closed before answering the STOMP handshake.","commonSituations":"Pointing the probe at a non-STOMP port that drops unknown protocols, ActiveMQ with the STOMP transport disabled, a TCP proxy/LB health-check closing idle connections, or the broker rejecting the client at TCP level (max connections).","solutions":["Verify the target port hosts a STOMP transport (default 61613)","Enable the STOMP connector in activemq.xml if missing","Check broker limits (maxConnections) and proxy idle-close behavior","Retest with telnet/nc to confirm the port answers"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// confirm the endpoint speaks STOMP before deep probing\nbanner, _ := quickProbe(addr)\nif banner == \"\" { log.Println(\"port closes connections silently; not STOMP\") }","typeGuard":null,"tryCatchPattern":"if _, err := authSTOMP(conn); err != nil {\n    if strings.Contains(err.Error(), \"empty_response\") {\n        // treat as non-STOMP service, skip\n    }\n}","preventionTips":["Only probe ports known to run STOMP (default 61613)","Enable the STOMP connector before scanning","Account for proxies that close idle/unknown connections","Mark empty-response hosts as unidentified rather than retrying aggressively"],"tags":["network","stomp","activemq","empty-response"],"backgroundTag":"empty-response-body","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}