Library giop
GIOP Library supporting a very limited subset of operations
Summary ------- The library currently provides functionality to connect and query the CORBA naming service for a list of available objects.
Overview -------- The library contains the following classes:
o Packet.* - The Packet classes contain specific packets and function to serialize them to strings that can be sent over the wire. Each class may also contain a function to parse the servers response.
o Comm - Implements a number of functions to handle communication over the the socket.
o Helper - A helper class that provides easy access to the rest of the library
Example ------- The following sample code illustrates how scripts can use the Helper class to interface the library:
helper = giop.Helper:new(host, port) status, err = helper:Connect() status, ctx = helper:GetNamingContext() status, objs = helper:ListObjects(ctx)
Additional information ---------------------- The implementation is based on packet dumps and the decoding Wireshark provides.
This implementation is tested and known to work against: x Sun's JAVA orbd
Author:
Copyright © Same as Nmap--See https://nmap.org/book/man-legal.html
Source: https://svn.nmap.org/nmap/nselib/giop.lua
Functions
- ["_is_a"] (packet)
Decodes a _is_a response (not implemented)
- ["get"] (packet)
Decodes a get response
- ["list"] (packet)
Decodes a list response
- __tostring (self)
Converts the class to a string suitable to send over the socket
- __tostring (self)
Converts the class to a string suitable to send over the socket
- __tostring (self)
Converts the class to a string suitable to send over the socket
- __tostring (self)
Converts the class to a string suitable to send over the socket
- __tostring (self)
Converts the class to a string suitable to send over the socket
- __tostring (self)
Converts the class to a string suitable to send over the socket
- addServiceContext (self, id, data, pad)
Creates and adds a service context to the packet
- addServiceContext (self, id, data, pad)
Creates and adds a service context to the packet
- addServiceContext (self, id, data, pad)
Creates and adds a service context to the packet
- Connect (self)
Connects and performs protocol negotiation with the Oracle server
- exchGIOPPacket (self, packet)
Sends and receives a GIOP packet
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- new (self, socket)
Creates a new Comm instance
- recv (self, socket)
Receives a Packet.GIOP.reply from the socket
- recv (self, socket)
Receives a Packet.GIOP.reply from the socket
- setVersion (self, version)
Sets the packet version
Functions
- ["_is_a"] (packet)
-
Decodes a _is_a response (not implemented)
Parameters
- packet
- the GIOP packet as received by the comm
exchGIOPPacket
function
Return value:
status, always true - ["get"] (packet)
-
Decodes a get response
Parameters
- packet
- the GIOP packet as received by the comm
exchGIOPPacket
function
Return values:
- status true on success, false on failure
- table containing
ip
andctx
- ["list"] (packet)
-
Decodes a list response
Parameters
- packet
- the GIOP packet as received by the comm
exchGIOPPacket
function
Return values:
- status true on success, false on failure
- table containing
id
,kind
andenum
or error message if status is false
- __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - __tostring (self)
-
Converts the class to a string suitable to send over the socket
Parameters
- self
Return value:
string containing the packet data - addServiceContext (self, id, data, pad)
-
Creates and adds a service context to the packet
Parameters
- self
- id
- number containing the context id
- data
- the service context data
- pad
- [optional] number used to pad after the service context
- addServiceContext (self, id, data, pad)
-
Creates and adds a service context to the packet
Parameters
- self
- id
- number containing the context id
- data
- the service context data
- pad
- [optional] number used to pad after the service context
- addServiceContext (self, id, data, pad)
-
Creates and adds a service context to the packet
Parameters
- self
- id
- number containing the context id
- data
- the service context data
- pad
- [optional] number used to pad after the service context
- Connect (self)
-
Connects and performs protocol negotiation with the Oracle server
Parameters
- self
Return values:
- true on success, false on failure
- err containing error message when status is false
- exchGIOPPacket (self, packet)
-
Sends and receives a GIOP packet
Parameters
- self
- packet
- containing a Packet.* object, the object must implement the __tostring meta method
Return values:
- status true on success, false on failure
- data decoder specific data, see the corresponding MessageDecoder for more information.
- new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - new (self, socket)
-
Creates a new Comm instance
Parameters
- self
- socket
- containing a buffered socket connected to the server
Return value:
a new Comm instance - recv (self, socket)
-
Receives a Packet.GIOP.reply from the socket
Parameters
- self
- socket
- already connected to the server
Return values:
- status true on success, false on failure
- err error message if status is false
- recv (self, socket)
-
Receives a Packet.GIOP.reply from the socket
Parameters
- self
- socket
- already connected to the server
Return values:
- status true on success, false on failure
- err error message if status is false
- setVersion (self, version)
-
Sets the packet version
Parameters
- self
- version
- number containing the version to use