Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/beefbind/shellcode_sources/msf/beef_bind-handler.rb
1154 views
1
##
2
# $Id: beef_bind-handler.rb 121018 Ty Miller @ Threat Intelligence$
3
##
4
5
module Msf
6
module Handler
7
###
8
#
9
# This module implements the Bind TCP handler placeholder only.
10
#
11
###
12
module BeefBind
13
include Msf::Handler
14
15
#
16
# Returns the handler specific string representation
17
#
18
def self.handler_type
19
'beef_bind'
20
end
21
22
#
23
# Returns the connection oriented general handler type
24
#
25
def self.general_handler_type
26
'bind'
27
end
28
29
#
30
# Initializes a bind handler and adds the options common to all bind
31
# payloads, such as local port.
32
#
33
def initialize(info = {})
34
super
35
register_options(
36
[
37
Opt::LPORT(4444)
38
# OptAddress.new('RHOST', [false, 'The target address', '']),
39
], Msf::Handler::BeefBind
40
)
41
end
42
43
#
44
# Placeholder only
45
#
46
def cleanup_handler; end
47
48
#
49
# Placeholder only
50
#
51
def add_handler(_opts = {})
52
# Start a new handler
53
start_handler
54
end
55
56
#
57
# Placeholder only
58
#
59
def start_handler; end
60
61
#
62
# Placeholder only
63
#
64
def stop_handler; end
65
end
66
end
67
end
68
69