Library nrpc
A minimalistic library to support Domino RPC
Summary ------- The library currently only supports user enumeration and uses chunks of captured data to do so.
Overview -------- The library contains the following classes:
o DominoPacket - The packet class holding the packets sent between the client and the IBM Lotus Domino server
o Helper - A helper class that provides easy access to the rest of the library
o DominoSocket - This is a copy of the DB2Socket class which provides fundamental buffering
Example ------- The following sample code illustrates how scripts can use the Helper class to interface the library:
helper = nrpc.Helper:new(host, port)
status, err = nrpc:Connect()
status, res = nrpc:isValidUser("Patrik Karlsson")
status, err = nrpc:Close()
Author:
| "Patrik Karlsson <patrik@cqure.net>" |
Copyright© Same as Nmap--See http://nmap.org/book/man-legal.html
Source: http://nmap.org/svn/nselib/nrpc.lua
Functions
| __tostring (self) |
converts the packet to a string |
| close (self) |
Closes an open connection. |
| connect (self) |
Connects the socket to the Domino server |
| connect (self) |
Connects the socket to the Domino server |
| disconnect (self) |
Disconnects from the Lotus Domino Server |
| isValidUser (self, username) |
Attempt to check whether the user exists in Domino or not |
| new (self, host, port) |
Creates a new Helper instance |
| new (self, host, port) |
Creates a new Helper instance |
| read (self, domsock) |
Reads a packet from the DominoSocket |
| recv (self, count) |
Opposed to the |
| send (self, data) |
Sends data over the socket |
Functions
- __tostring (self)
-
converts the packet to a string
Parameters
- self:
- close (self)
-
Closes an open connection.
Parameters
- self:
Return values:
- Status (true or false).
- Error code (if status is false).
- connect (self)
-
Connects the socket to the Domino server
Parameters
- self:
Return values:
- status true on success, false on failure
- err error message if status is false
- connect (self)
-
Connects the socket to the Domino server
Parameters
- self:
Return values:
- status true on success, false on failure
- err error message if status is false
- disconnect (self)
-
Disconnects from the Lotus Domino Server
Parameters
- self:
Return values:
- status true on success, false on failure
- err error message if status is false
- isValidUser (self, username)
-
Attempt to check whether the user exists in Domino or not
Parameters
- self:
- username: string containing the user name to guess
Return values:
- status true on success false on failure
- domino_id if it exists and status is true err if status is false
- new (self, host, port)
-
Creates a new Helper instance
Parameters
- self:
- host: table as recieved by the script action method
- port: table as recieved by the script action method
- new (self, host, port)
-
Creates a new Helper instance
Parameters
- self:
- host: table as recieved by the script action method
- port: table as recieved by the script action method
- read (self, domsock)
-
Reads a packet from the DominoSocket
Parameters
- self:
- domsock: DominoSocket connected to the server
Return values:
- Status (true or false).
- Error code (if status is false).
- recv (self, count)
-
Opposed to the
socket:receive_bytesfunction, that returns at least x bytes, this function returns the amount of bytes requested.Parameters
- self:
- count: of bytes to read
Return values:
- true on success, false on failure
- 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:
- Status (true or false).
- Error code (if status is false).


