Class: Ronin::PostEx::Sessions::RemoteShellSession

Inherits:
ShellSession show all
Defined in:
lib/ronin/post_ex/sessions/remote_shell_session.rb

Overview

Session base class for all other remote shell sessions.

Direct Known Subclasses

BindShell, ReverseShell

Constant Summary

Constants inherited from ShellSession

ShellSession::DELIMINATOR

Instance Attribute Summary

Attributes inherited from ShellSession

#io

Instance Method Summary collapse

Methods inherited from ShellSession

#close, #command_exec, #command_join, #fs_chdir, #fs_chgrp, #fs_chmod, #fs_chown, #fs_copy, #fs_getcwd, #fs_glob, #fs_link, #fs_mkdir, #fs_mktemp, #fs_move, #fs_readdir, #fs_readfile, #fs_readlink, #fs_rmdir, #fs_stat, #fs_unlink, #process_environ, #process_exit, #process_getenv, #process_getgid, #process_getpid, #process_getppid, #process_getuid, #process_kill, #process_setenv, #process_spawn, #process_unsetenv, #shell_exec, #shell_gets, #shell_puts, #sys_hostname, #sys_time

Methods inherited from Session

#close, #name, #system, #to_s

Constructor Details

#initialize(socket) ⇒ RemoteShellSession

Initializes the remote shell session.

Parameters:

  • socket (TCPSocket, UDPSocket)

    The underlying socket for the remote shell session.



37
38
39
40
41
42
43
# File 'lib/ronin/post_ex/sessions/remote_shell_session.rb', line 37

def initialize(socket)
  super(socket)

  addrinfo = socket.remote_address

  @name = "#{addrinfo.ip_address}:#{addrinfo.ip_port}"
end