mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 20:15:27 +00:00
67 lines
1.5 KiB
TypeScript
Executable File
67 lines
1.5 KiB
TypeScript
Executable File
|
|
|
|
/**
|
|
* IsVNC checks if a host is running a VNC server.
|
|
* It returns a boolean indicating if the host is running a VNC server
|
|
* and the banner of the VNC server.
|
|
* @example
|
|
* ```javascript
|
|
* const vnc = require('nuclei/vnc');
|
|
* const isVNC = vnc.IsVNC('acme.com', 5900);
|
|
* log(toJSON(isVNC));
|
|
* ```
|
|
*/
|
|
export function IsVNC(host: string, port: number): IsVNCResponse | null {
|
|
return null;
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* IsVNCResponse is the response from the IsVNC function.
|
|
* @example
|
|
* ```javascript
|
|
* const vnc = require('nuclei/vnc');
|
|
* const isVNC = vnc.IsVNC('acme.com', 5900);
|
|
* log(toJSON(isVNC));
|
|
* ```
|
|
*/
|
|
export interface IsVNCResponse {
|
|
|
|
IsVNC?: boolean,
|
|
|
|
Banner?: string,
|
|
}
|
|
|
|
/**
|
|
* VNCClient is a client for VNC servers.
|
|
* @example
|
|
* ```javascript
|
|
* const vnc = require('nuclei/vnc');
|
|
* const client = new vnc.VNCClient();
|
|
* ```
|
|
*/
|
|
export class VNCClient {
|
|
|
|
|
|
// Constructor of VNCClient
|
|
constructor() {}
|
|
|
|
/**
|
|
* Connect connects to VNC server using given password.
|
|
* If connection and authentication is successful, it returns true.
|
|
* If connection or authentication is unsuccessful, it returns false and error.
|
|
* The connection is closed after the function returns.
|
|
* @example
|
|
* ```javascript
|
|
* const vnc = require('nuclei/vnc');
|
|
* const client = new vnc.VNCClient();
|
|
* const connected = client.Connect('acme.com', 5900, 'password');
|
|
* ```
|
|
*/
|
|
public Connect(host: string, port: number, password: string): boolean | null {
|
|
return null;
|
|
}
|
|
}
|
|
|