Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/msf/base/sessions/custom.rb
Views: 11784
# -*- coding: binary -*-12module Msf3module Sessions45###6#7# This class provides the ability to receive a custom stage callback8#9###10class Custom1112#13# This interface supports basic interaction.14#15include Msf::Session16include Msf::Session::Basic1718attr_accessor :arch19attr_accessor :platform2021#22# Returns the type of session.23#24def self.type25"custom"26end2728def initialize(rstream, opts = {})29super30self.platform ||= ""31self.arch ||= ""32datastore = opts[:datastore]33end3435def self.create_session(rstream, opts = {})36Msf::Sessions::Custom.new(rstream, opts)37end3839def process_autoruns(datastore)40cleanup41end4243def cleanup44print_good("Custom stage sent; session has been closed")45if rstream46# this is also a best-effort47rstream.close rescue nil48rstream = nil49end50end5152#53# Returns the session description.54#55def desc56"Custom"57end5859def self.can_cleanup_files60false61end6263#64# Calls the class method65#66def type67self.class.type68end69end70end71end727374