Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/social_engineering/text_to_voice/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
beef.execute(function() {
8
9
var url = beef.net.httpproto+'://'+beef.net.host+':'+beef.net.port+'/objects/msg-<%= @command_id %>.mp3';
10
try {
11
var sound = new Audio(url);
12
sound.play();
13
beef.debug('[Text to Voice] Playing mp3: ' + url);
14
beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=message sent", beef.are.status_success());
15
} catch (e) {
16
beef.debug("[Text to Voice] HTML5 audio unsupported. Could not play: " + url);
17
beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=audio not supported", beef.are.status_error());
18
}
19
20
});
21
22