Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/network/fetch_port_scanner/module.rb
1154 views
1
#
2
# Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
# Browser Exploitation Framework (BeEF) - https://beefproject.com
4
# See the file 'doc/COPYING' for copying permission
5
#
6
class Fetch_port_scanner < BeEF::Core::Command
7
# set and return all options for this module
8
def self.options
9
[
10
{ 'name' => 'ipHost', 'ui_label' => 'Scan IP or Hostname', 'value' => '127.0.0.1' },
11
{ 'name' => 'ports', 'ui_label' => 'Specific port(s) to scan', 'value' => 'top' }
12
]
13
end
14
15
def post_execute
16
content = {}
17
content['result'] = @datastore['result']
18
save content
19
20
configuration = BeEF::Core::Configuration.instance
21
return unless configuration.get('beef.extension.network.enable') == true
22
23
session_id = @datastore['beefhook']
24
25
# @todo log the network service
26
# will need to once the datastore is confirmed.
27
# This should basically try and hook the browser
28
end
29
end
30
31