{"record":{"id":"bfe4e13347287e6b","repo":"shadow1ng/fscan","slug":"oracle-connection-refused","errorCode":null,"errorMessage":"oracle connection refused","messagePattern":"oracle connection refused","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/oracle_raw.go","lineNumber":1818,"sourceCode":"\nfunc (s *oracleSession) hasError() bool {\n\treturn s.summary != nil && s.summary.retCode != 0 && s.summary.retCode != 1403\n}\n\nfunc (s *oracleSession) oracleError() error {\n\tif s.summary == nil {\n\t\treturn errors.New(\"oracle error\")\n\t}\n\tmsg := string(s.summary.errorMessage)\n\tif msg == \"\" {\n\t\tmsg = fmt.Sprintf(\"ORA-%05d\", s.summary.retCode)\n\t}\n\treturn fmt.Errorf(\"%s\", msg)\n}\n\nfunc oracleRefuseError(raw []byte) error {\n\tif len(raw) < 12 {\n\t\treturn errors.New(\"oracle connection refused\")\n\t}\n\tdataLen := int(binary.BigEndian.Uint16(raw[10:12]))\n\tif len(raw) < 12+dataLen {\n\t\treturn errors.New(\"oracle connection refused\")\n\t}\n\tmsg := string(raw[12 : 12+dataLen])\n\tcode := oracleExtractCode(msg)\n\tif code == 0 {\n\t\treturn fmt.Errorf(\"oracle connection refused: %s\", msg)\n\t}\n\treturn fmt.Errorf(\"ORA-%05d: %s\", code, msg)\n}\n\nfunc oracleExtractCode(msg string) int {\n\tupper := strings.ToUpper(msg)\n\tfor _, marker := range []string{\"ERR=\", \"CODE=\"} {\n\t\tidx := strings.Index(upper, marker)\n\t\tif idx < 0 {","sourceCodeStart":1800,"sourceCodeEnd":1836,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/oracle_raw.go#L1800-L1836","documentation":"Raised by oracleRefuseError when the raw TNS response is shorter than the 12-byte fixed header, so a proper refusal reason cannot be parsed — the port answered but did not speak a valid Oracle TNS response.","triggerScenarios":"Thrown at plugins/services/oracle_raw.go:1818 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Mark the service as not-oracle rather than retrying; the banner is not TNS","Re-probe the service banner to identify the real protocol","Check for a firewall/proxy mangling the response"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}