forked from interference-security/empire-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
show-all-listeners.php
56 lines (55 loc) · 2.17 KB
/
show-all-listeners.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
55
56
<?php
// include files
require_once("includes/check-authorize.php");
require_once("includes/functions.php");
$count = 0;
$empire_listeners = "";
$arr_result = get_all_listeners($sess_ip, $sess_port, $sess_token);
if(!empty($arr_result))
{
//$empire_listeners = '<table class="table table-hover table-striped"><thead><tr><th>Listener Option</th><th>Listener Value</th></tr></thead><tbody>';
$empire_listeners .= "<div class='panel-group'>";
for($i=0; $i<sizeof($arr_result["listeners"]); $i++)
{
$empire_listeners .= "<div class='panel panel-success'>
<div class='panel-heading'><h4 class='panel-title'><a data-toggle='collapse' href='#collapse$i'>Listener Name: ".htmlentities($arr_result["listeners"][$i]["name"])."</a></h4></div>
<div id='collapse$i' class='panel-collapse collapse'>
<div class='panel-body'>";
$empire_listeners .= '<table class="table table-hover table-striped"><thead><tr><th>Listener Option</th><th>Listener Value</th></tr></thead><tbody>';
foreach($arr_result["listeners"][$i] as $key => $value)
{
$key = htmlentities($key);
$value = htmlentities($value);
$empire_listeners .= "<tr><td>$key</td><td>$value</td></tr>";
}
$empire_listeners .= '</tbody></table>';
$empire_listeners .= "</div></div></div>";
$count = $i + 1;
}
$empire_listeners .= "</div>";
}
else
{
$empire_listeners = "<div class='alert alert-danger'><span class='glyphicon glyphicon-remove'></span> Unexpected response.</div>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Empire: All Listeners</title>
<?php @require_once("includes/head-section.php"); ?>
</head>
<body>
<div class="container">
<?php @require_once("includes/navbar.php"); ?>
<br>
<div class="panel-group">
<div class="panel panel-primary">
<div class="panel-heading">Show All Listeners (<?php echo $count; ?>)</div>
<div class="panel-body"><?php echo $empire_listeners; ?></div>
</div>
</div>
</div>
<?php @require_once("includes/footer.php"); ?>
</body>
</html>