CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/post/meterpreter/extensions/lanattacks/lanattacks.rb
Views: 11791
1
# -*- coding: binary -*-
2
3
require 'rex/post/meterpreter/extensions/lanattacks/tlv'
4
require 'rex/post/meterpreter/extensions/lanattacks/command_ids'
5
require 'rex/post/meterpreter/extensions/lanattacks/dhcp/dhcp'
6
require 'rex/post/meterpreter/extensions/lanattacks/tftp/tftp'
7
8
module Rex
9
module Post
10
module Meterpreter
11
module Extensions
12
module Lanattacks
13
14
###
15
#
16
# This meterpreter extension can currently run DHCP and TFTP servers
17
#
18
###
19
class Lanattacks < Extension
20
21
def self.extension_id
22
EXTENSION_ID_LANATTACKS
23
end
24
25
#
26
# Initializes an instance of the lanattacks extension.
27
#
28
def initialize(client)
29
super(client, 'lanattacks')
30
31
# Alias the following things on the client object so that they
32
# can be directly referenced
33
client.register_extension_aliases(
34
[
35
{
36
'name' => 'lanattacks',
37
'ext' => ObjectAliases.new(
38
{
39
'dhcp' => Rex::Post::Meterpreter::Extensions::Lanattacks::Dhcp::Dhcp.new(client),
40
'tftp' => Rex::Post::Meterpreter::Extensions::Lanattacks::Tftp::Tftp.new(client)
41
}),
42
}
43
])
44
end
45
46
end
47
48
end; end; end; end; end
49
50