{"record":{"id":"7545a929f31b58a4","repo":"projectdiscovery/nuclei","slug":"not-a-oracle-service","errorCode":null,"errorMessage":"not a oracle service","messagePattern":"not a oracle service","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/js/libs/oracle/oracle.go","lineNumber":209,"sourceCode":"// It returns the results of the query or an error if something goes wrong.\n// @example\n// ```javascript\n// const oracle = require('nuclei/oracle');\n// const client = new oracle.OracleClient;\n// const result = client.ExecuteQuery('acme.com', 1521, 'username', 'password', 'XE', 'SELECT @@version');\n// log(to_json(result));\n// ```\nfunc (c *OracleClient) ExecuteQuery(ctx context.Context, host string, port int, username, password, dbName, query string) (*utils.SQLResult, error) {\n\tif host == \"\" || port <= 0 {\n\t\treturn nil, fmt.Errorf(\"invalid host or port\")\n\t}\n\n\tisOracleResp, err := c.IsOracle(ctx, host, port)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !isOracleResp.IsOracle {\n\t\treturn nil, fmt.Errorf(\"not a oracle service\")\n\t}\n\n\tconnStr := goora.BuildUrl(host, port, dbName, username, password, nil)\n\n\treturn c.ExecuteQueryWithDSN(ctx, connStr, query)\n}\n\n// ExecuteQueryWithDSN executes a query on an Oracle database using a DSN\n// @example\n// ```javascript\n// const oracle = require('nuclei/oracle');\n// const client = new oracle.OracleClient;\n// const result = client.ExecuteQueryWithDSN('oracle://user:password@host:port/service', 'SELECT @@version');\n// log(to_json(result));\n// ```\nfunc (c *OracleClient) ExecuteQueryWithDSN(ctx context.Context, dsn string, query string) (*utils.SQLResult, error) {\n\texecutionId := ctx.Value(\"executionId\").(string)\n","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/oracle/oracle.go#L191-L227","documentation":"Returned by OracleClient.ExecuteQuery when the preliminary IsOracle probe completes but reports the service is not Oracle (isOracleResp.IsOracle == false). The TNS probe (via fingerprintx's ORACLEPlugin) read the listener's banner and it did not match Oracle, so the query is refused rather than sending Oracle wire traffic to a foreign service. Probe errors (dial failure, timeouts, dialer init) surface as their own errors instead of this one.","triggerScenarios":"Calling client.ExecuteQuery against a port that is not an Oracle listener: wrong port, another database or TCP service, or an Oracle listener with a banner the fingerprinter does not recognize. Host policy denial surfaces earlier as ErrHostDenied, and missing dialers as the dialer init error.","commonSituations":"Cred-check templates sweeping port ranges; containers where 1521 is mapped to another app; Oracle setups (e.g. behind a connection manager or non-default listener) whose greeting defeats detection; hardcoded 1521 against renamed ports.","solutions":["Branch on oracle.IsOracle(host, port).IsOracle before running queries","Verify the listener: `tnsping` / lsnrctl status on the target, or confirm the port with a port scan","Treat this as 'skip target' in template logic, not a scan failure","For Oracle-compatible services the probe rejects, use the code protocol with a raw go-ora driver via DSN"],"exampleFix":"// before\nconst res = client.ExecuteQuery('acme.com', 1521, 'user', 'pass', 'XE', 'SELECT @@version');\n\n// after\nconst probe = oracle.IsOracle('acme.com', 1521);\nif (probe.IsOracle) {\n  const res = client.ExecuteQuery('acme.com', 1521, 'user', 'pass', 'XE', 'SELECT @@version');\n} else {\n  log('not oracle: ' + probe.Banner);\n}","handlingStrategy":"validation","validationCode":"const probe = oracle.IsOracle(host, port);\nif (probe && probe.IsOracle) {\n  client.ExecuteQuery(host, port, user, pass, dbName, query);\n} else {\n  log('not oracle (banner: ' + (probe && probe.Banner) + ')');\n}","typeGuard":null,"tryCatchPattern":"try { client.ExecuteQuery(host, port, user, pass, dbName, query); } catch (e) { if (String(e) === 'not a oracle service') { /* skip target */ } else { throw e; } }","preventionTips":["Gate queries with oracle.IsOracle once per host:port","Confirm the listener port (1521 default) via service discovery","Treat negative probes as skip-logic in sweep templates","For undetected-but-real Oracle services, fall back to code protocol with go-ora DSN"],"tags":["oracle","service-detection","network"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}