Home page logo
/
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News

Sponsors

SolarWinds makes easy-to-use enterprise IT management software to help IT pros solve problems every day and help to enable efficient and effective management of networks and IT environments.

Join our online community of over 100,000 IT professionals talking shop. Get involved. Gain insights. Share tips and tricks. Visit thwack today!


Library vnc

The VNC library provides some basic functionality needed in order to communicate with VNC servers, and derivates such as Tight- or Ultra- VNC.

Summary ------- The library currently supports the VNC Authentication security type only. This security type is supported by default in VNC, TightVNC and "Remote Desktop Sharing" in eg. Ubuntu. For servers that do not support this authentication security type the login method will fail.

Overview -------- The library contains the following classes:

o VNC - This class contains the core functions needed to communicate with VNC

o VNCSocket - This is a copy of the DB2Socket class which provides fundamental buffering

Source: http://nmap.org/svn/nselib/vnc.lua

Functions

close (self)

Closes an open connection.

connect (self, hostid, port, protocol)

Establishes a connection.

connect (self, hostid, port, protocol)

Establishes a connection.

createVNCDESKey (self, password)

Creates the password bit-flip needed before DES encryption

disconnect (self)

Disconnects the VNC socket

getProtocolVersion (self, version)

Returns the protocol version reported by the server

getSecTypesAsStringTable (self)

Returns all supported security types as a table of strings

handshake (self)

Performs the VNC handshake and determines o The RFB Protocol to use o The supported authentication security types

login (self, username, password)

Attempts to login to the VNC service Currently the only supported auth sectype is VNC Authentication

recv (self, count)

Opposed to the socket:receive_bytes function, that returns at least x bytes, this function returns the amount of bytes requested.

send (self, data)

Sends data over the socket

supportsSecType (self, sectype)

Checks if the supplied security type is supported or not



Functions

close (self)

Closes an open connection.

Parameters

  • self:

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
connect (self, hostid, port, protocol)

Establishes a connection.

Parameters

  • self:
  • hostid: Hostname or IP address.
  • port: Port number.
  • protocol: "tcp", "udp", or

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
connect (self, hostid, port, protocol)

Establishes a connection.

Parameters

  • self:
  • hostid: Hostname or IP address.
  • port: Port number.
  • protocol: "tcp", "udp", or

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
createVNCDESKey (self, password)

Creates the password bit-flip needed before DES encryption

Parameters

  • self:
  • password: string containing the password to process

Return value:

password string containing the processed password
disconnect (self)

Disconnects the VNC socket

Parameters

  • self:
getProtocolVersion (self, version)

Returns the protocol version reported by the server

Parameters

  • self:
  • version: string containing the version number
getSecTypesAsStringTable (self)

Returns all supported security types as a table of strings

Parameters

  • self:

Return value:

table containing a string entry for each security type
handshake (self)

Performs the VNC handshake and determines o The RFB Protocol to use o The supported authentication security types

Parameters

  • self:

Return values:

  1. status, true on success, false on failure
  2. error string containing error message if status is false
login (self, username, password)

Attempts to login to the VNC service Currently the only supported auth sectype is VNC Authentication

Parameters

  • self:
  • username: string, could be anything when VNCAuth is used
  • password: string containing the password to use for authentication

Return values:

  1. status true on success, false on failure
  2. err string containing error message when status is false
recv (self, count)

Opposed to the socket:receive_bytes function, that returns at least x bytes, this function returns the amount of bytes requested.

Parameters

  • self:
  • count: of bytes to read

Return values:

  1. true on success, false on failure
  2. data containing bytes read from the socket err containing error message if status is false
send (self, data)

Sends data over the socket

Parameters

  • self:
  • data:

Return values:

  1. Status (true or false).
  2. Error code (if status is false).
supportsSecType (self, sectype)

Checks if the supplied security type is supported or not

Parameters

  • self:
  • sectype: number containing the security type to check for

Return value:

status true if supported, false if not supported

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]