Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/network/identify_lan_subnets/module.rb
1873 views
1
#
2
# Copyright (c) 2006-2026 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
##
7
# Ported to BeEF from: http://browserhacker.com/code/Ch10/index.html
8
##
9
10
class Identify_lan_subnets < BeEF::Core::Command
11
def self.options
12
[
13
{ 'name' => 'timeout', 'ui_label' => 'Timeout for each request (ms)', 'value' => '500' }
14
]
15
end
16
17
def post_execute
18
content = {}
19
content['host'] = @datastore['host'] unless @datastore['host'].nil?
20
content['hosts'] = @datastore['hosts'] unless @datastore['hosts'].nil?
21
content['fail'] = 'No active hosts have been discovered.' if content.empty?
22
save content
23
end
24
end
25
26