Class: Ronin::PostEx::Sessions::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/ronin/post_ex/sessions/session.rb

Overview

Base class for all post-exploitation session classes.

Direct Known Subclasses

RPCSession, ShellSession

Instance Method Summary collapse

Instance Method Details

#closeObject

This method is abstract.

Closes the session.



57
58
# File 'lib/ronin/post_ex/sessions/session.rb', line 57

def close
end

#nameString

The session name.

Returns:

  • (String)

Raises:

  • (NotImplementedError)

    The session class did not set @name.



39
40
41
# File 'lib/ronin/post_ex/sessions/session.rb', line 39

def name
  @name || raise(NotImplementedError,"#{self.class}#name was not set")
end

#systemSystem

The remote system connected to the session.

Returns:



48
49
50
# File 'lib/ronin/post_ex/sessions/session.rb', line 48

def system
  @system ||= System.new(self)
end

#to_sString

Converts the session to a String.

Returns:

  • (String)

    The session's #name.



66
67
68
# File 'lib/ronin/post_ex/sessions/session.rb', line 66

def to_s
  name
end