Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/debug/test_get_variable/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
/*
8
This JavaScript gets value of the specified variable that was set in another script via Window property.
9
*/
10
11
beef.execute(function() {
12
13
var payload = "<%= @payload_name %>";
14
var curl = "<%= @command_url %>";
15
var cid = "<%= @command_id %>";
16
17
beef.debug("The current value of " + payload + " is " + Window[payload]);
18
beef.net.send(curl, parseInt(cid),'get_variable=true');
19
20
});
21
22