beef-npm
Version:
Node.js package to install and interact with BeEF (Browser Exploitation Framework)
19 lines (17 loc) • 708 B
JavaScript
//
// Copyright (c) 2006-2024Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - https://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var url = "<%== @sound_file_uri %>";
try {
var sound = new Audio(url);
sound.play();
beef.debug("[Play Sound] Played sound successfully: " + url);
beef.net.send("<%= @command_url %>", <%= %>, "result=Sound Played", beef.are.status_success());
} catch (e) {
beef.debug("[Play Sound] HTML5 audio unsupported. Could not play: " + url);
beef.net.send("<%= @command_url %>", <%= %>, "fail=audio not supported", beef.are.status_error());
}
});