Namespace: redis

Table of contents

Functions

Functions

Connect

Connect(host, port, password): boolean | null

Connect tries to connect redis server with password

Parameters

NameType
hoststring
portnumber
passwordstring

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

NameType
hoststring
portnumber

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

NameType
hoststring
portnumber
passwordstring

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

NameType
hoststring
portnumber

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

NameType
hoststring
portnumber
passwordstring
scriptstring

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