Documentation Index
Fetch the complete documentation index at: https://projectdiscovery-new-js-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Namespace: redis
Table of contents
Functions
Functions
Connect
▸ Connect(host, port, password): boolean | null
Connect tries to connect redis server with password
Parameters
| Name | Type |
|---|
host | string |
port | number |
password | string |
Returns
boolean | null
Example
const redis = require('nuclei/redis');
const connected = redis.Connect('acme.com', 6379, 'password');
Defined in
redis.ts:11
GetServerInfo
▸ GetServerInfo(host, port): string | null
GetServerInfo returns the server info for a redis server
Parameters
| Name | Type |
|---|
host | string |
port | number |
Returns
string | null
Example
const redis = require('nuclei/redis');
const info = redis.GetServerInfo('acme.com', 6379);
Defined in
redis.ts:25
GetServerInfoAuth
▸ GetServerInfoAuth(host, port, password): string | null
GetServerInfoAuth returns the server info for a redis server
Parameters
| Name | Type |
|---|
host | string |
port | number |
password | string |
Returns
string | null
Example
const redis = require('nuclei/redis');
const info = redis.GetServerInfoAuth('acme.com', 6379, 'password');
Defined in
redis.ts:39
IsAuthenticated
▸ IsAuthenticated(host, port): boolean | null
IsAuthenticated checks if the redis server requires authentication
Parameters
| Name | Type |
|---|
host | string |
port | number |
Returns
boolean | null
Example
const redis = require('nuclei/redis');
const isAuthenticated = redis.IsAuthenticated('acme.com', 6379);
Defined in
redis.ts:53
RunLuaScript
▸ RunLuaScript(host, port, password, script): any | null
RunLuaScript runs a lua script on the redis server
Parameters
| Name | Type |
|---|
host | string |
port | number |
password | string |
script | string |
Returns
any | null
Example
const redis = require('nuclei/redis');
const result = redis.RunLuaScript('acme.com', 6379, 'password', 'return redis.call("get", KEYS[1])');
Defined in
redis.ts:67