Class: Ronin::PostEx::Sessions::ReverseShell
- Inherits:
-
RemoteShellSession
- Object
- Session
- ShellSession
- RemoteShellSession
- Ronin::PostEx::Sessions::ReverseShell
- Defined in:
- lib/ronin/post_ex/sessions/reverse_shell.rb
Overview
Constant Summary
Constants inherited from ShellSession
Instance Attribute Summary
Attributes inherited from ShellSession
Class Method Summary collapse
-
.listen(host = nil, port) ⇒ ReverseShell
Listens for and accepts a reverse shell connection.
Methods inherited from RemoteShellSession
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, #initialize, #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
Constructor Details
This class inherits a constructor from Ronin::PostEx::Sessions::RemoteShellSession
Class Method Details
.listen(host = nil, port) ⇒ ReverseShell
Listens for and accepts a reverse shell connection.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/ronin/post_ex/sessions/reverse_shell.rb', line 53 def self.listen(host=nil,port) server_socket = TCPServer.new(port,host) server_socket.listen(1) begin new(server_socket.accept) ensure server_socket.close end end |