Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/js/generated/ts/vnc.ts
2851 views
1
2
3
/**
4
* IsVNC checks if a host is running a VNC server.
5
* It returns a boolean indicating if the host is running a VNC server
6
* and the banner of the VNC server.
7
* @example
8
* ```javascript
9
* const vnc = require('nuclei/vnc');
10
* const isVNC = vnc.IsVNC('acme.com', 5900);
11
* log(toJSON(isVNC));
12
* ```
13
*/
14
export function IsVNC(host: string, port: number): IsVNCResponse | null {
15
return null;
16
}
17
18
19
20
/**
21
* IsVNCResponse is the response from the IsVNC function.
22
* @example
23
* ```javascript
24
* const vnc = require('nuclei/vnc');
25
* const isVNC = vnc.IsVNC('acme.com', 5900);
26
* log(toJSON(isVNC));
27
* ```
28
*/
29
export interface IsVNCResponse {
30
31
IsVNC?: boolean,
32
33
Banner?: string,
34
}
35
36
/**
37
* VNCClient is a client for VNC servers.
38
* @example
39
* ```javascript
40
* const vnc = require('nuclei/vnc');
41
* const client = new vnc.VNCClient();
42
* ```
43
*/
44
export class VNCClient {
45
46
47
// Constructor of VNCClient
48
constructor() {}
49
50
/**
51
* Connect connects to VNC server using given password.
52
* If connection and authentication is successful, it returns true.
53
* If connection or authentication is unsuccessful, it returns false and error.
54
* The connection is closed after the function returns.
55
* @example
56
* ```javascript
57
* const vnc = require('nuclei/vnc');
58
* const client = new vnc.VNCClient();
59
* const connected = client.Connect('acme.com', 5900, 'password');
60
* ```
61
*/
62
public Connect(host: string, port: number, password: string): boolean | null {
63
return null;
64
}
65
}
66
67
68