forked from interference-security/empire-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.php
54 lines (51 loc) · 1.67 KB
/
dashboard.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// include files
require_once("includes/check-authorize.php");
require_once("includes/functions.php");
$listener_count = "0 listeners currently active" ;
$arr_result = get_all_listeners($sess_ip, $sess_port, $sess_token);
if(!empty($arr_result))
{
$listener_count = sizeof($arr_result["listeners"]) . " listeners currently active";
}
else
{
$listener_count = "<div class='alert alert-danger'><span class='glyphicon glyphicon-remove'></span> Unexpected response.</div>";
}
$agent_count = "0 agents currently active" ;
$arr_result = get_all_agents($sess_ip, $sess_port, $sess_token);
if(!empty($arr_result))
{
$agent_count = sizeof($arr_result["agents"]) . " agents currently active";
}
else
{
$agent_count = "<div class='alert alert-danger'><span class='glyphicon glyphicon-remove'></span> Unexpected response.</div>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Empire: Dashboard</title>
<?php @require_once("includes/head-section.php"); ?>
</head>
<body>
<div class="container">
<?php @require_once("includes/navbar.php"); ?>
<h1>PowerShell Empire Web</h1>
<br>
<div class="panel-group">
<div class="panel panel-primary">
<div class="panel-heading">Empire Listeners</div>
<div class="panel-body"><code><?php echo $listener_count; ?></code></div>
</div>
<br>
<div class="panel panel-primary">
<div class="panel-heading">Empire Agents</div>
<div class="panel-body"><code><?php echo $agent_count; ?></code></div>
</div>
</div>
</div>
<?php @require_once("includes/footer.php"); ?>
</body>
</html>