class RevenServer(object):
A reven server. This is the root api object.
e.g: >>> import reven2 as rvn2
>>> reven_server = rvn2.RevenServer("localhost", 13370) >>> reven_server Reven server (localhost:13370) [connected]
>>> reven_server.host localhost
>>> reven_server.port 13370
>>> reven_server.is_connected() True
>>> reven_server.disconnect() >>> reven_server.status() disconnected
>>> reven_server.connect() >>> reven_server.status() connected
Method | __init__ |
Connect to a Reven server. |
Method | __repr__ |
Undocumented |
Method | connect |
Connect to the reven host. |
Method | disconnect |
Disconnect from the reven host. |
Method | is |
Check the current connection status. |
Method | status |
Get the connection status string. |
Property | bookmarks |
Property: Get a reven2.bookmark.Bookmarks instance, which is the entry point for handling the bookmarks of this scenario. |
Property | host |
Property: The reven host. |
Property | ossi |
Property: Get a reven2.ossi.Ossi instance, which is the entry point for information related to OSSI (OS Semantic Information) such as executed binaries. |
Property | port |
Property: The reven port. |
Property | scenario |
Property: The name of the scenario this server is running. |
Property | sessions |
Property: Get a reven2.session.Sessions instance, which is the entry point for handling the tracked sessions or manually publishing events. |
Property | trace |
Property: Get a reven2.trace.Trace instance, which is the entry point for information related to a trace, mostly transitions & contexts. |
Instance Variable | _bookmarks |
Undocumented |
Instance Variable | _host |
Undocumented |
Instance Variable | _ossi |
Undocumented |
Instance Variable | _port |
Undocumented |
Instance Variable | _rvn |
Undocumented |
Instance Variable | _server |
Undocumented |
Instance Variable | _sessions |
Undocumented |
Instance Variable | _stack |
Undocumented |
Instance Variable | _trace |
Undocumented |
Connect to a Reven server.
Parameters | |
host:str | The reven host. |
port:int | The reven port. |
sessions:_Union[ | The reven2.session.Sessions to track when publishing events (such as transitions). Set a string to track a single named session, or pass a generator of strings to track all sessions in that generator. |
Connect to the reven host.
Use this method after having called disconnect
to renew a connection to the server.
Information
Parameters | |
sessions:_Union[ | The reven2.session.Sessions to track when publishing events (such as transitions). Set a string to track a single named session, or pass a generator of strings to track all sessions in that generator. |
Raises | |
RuntimeError | If the connection is lost, in case of bad input, or in case of internal service error. |
Disconnect from the reven host.
This method immediately closes the connection to the server. Use this method to avoid locking a licence token by keeping connections longer than wanted.
Note | |
Closing the last connection to a Reven server releases its licence token. After calling this method, the After calling this method on a project, objects obtained from the server should not be used anymore. Calls to some of their methods may then raise RuntimeError exceptions. |
Check the current connection status.
Information
Returns | |
bool | True, if the connection with the server is currently open. Otherwise, False. |
Get the connection status string.
Information
Returns | |
str | "connected" if currently connected, "disconnected" otherwise. |
Property: Get a reven2.bookmark.Bookmarks
instance, which is the entry point for handling the bookmarks of this scenario.
Property: Get a reven2.ossi.Ossi
instance, which is the entry point for information related to OSSI (OS Semantic Information) such as executed binaries.
Information
Raises | |
Exception | If the server status is disconnected. |
Property: Get a reven2.session.Sessions
instance, which is the entry point for handling the tracked sessions or manually publishing events.
Information
Raises | |
Exception | If the server status is disconnected. |
trace:
trace.Trace
=
Property: Get a reven2.trace.Trace
instance, which is the entry point for information related to a trace, mostly transitions & contexts.
Information
Raises | |
Exception | If the server status is disconnected. |