CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/script/meterpreter.rb
Views: 1904
1
# -*- coding: binary -*-
2
3
module Rex
4
module Script
5
class Meterpreter < Base
6
7
begin
8
include Msf::Post::Windows::Priv
9
include Msf::Post::Windows::Eventlog
10
include Msf::Post::Common
11
include Msf::Post::Windows::Registry
12
include Msf::Post::File
13
include Msf::Post::Windows::Services
14
include Msf::Post::Windows::Accounts
15
rescue ::LoadError
16
end
17
18
def initialize(client, path)
19
# The mixins for `Msf::Post::*` now assume a single info argument is present,
20
# whilst `::Rex::Script::Base` assumes client and path are provided. Directly call
21
# the `::Rex::Script::Base` initialize method for now. In the future Rex scripts
22
# will need to be migrated to use post modules
23
::Rex::Script::Base.instance_method(:initialize).bind(self).call(client, path)
24
end
25
end
26
end
27
end
28
29
30