Minor file structure updates
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class=header>
|
||||
<h2>LiquidWeb Traffic Monitoring</h2>
|
||||
<h2>Traffic Monitoring</h2>
|
||||
<h3>Source IPs by Destination</h3>
|
||||
<?php include("includes/menu.php"); ?>
|
||||
</div>
|
||||
@ -16,10 +16,10 @@
|
||||
<?php
|
||||
//Include DB Connection Info
|
||||
include("includes/db_config.php");
|
||||
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
|
||||
|
||||
//Create dropdown
|
||||
$query = "SELECT port, svc_name FROM commonports ORDER BY port";
|
||||
$tbllist = mysqli_query($conn, $query);
|
||||
@ -30,7 +30,7 @@
|
||||
$name=$row["svc_name"];
|
||||
$options.="<option value=\"$id\">$id - $name</option>";
|
||||
}
|
||||
|
||||
|
||||
//Check Connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection Failed: " . $conn->connect_error);
|
||||
@ -65,27 +65,27 @@
|
||||
if(isset($_GET['formIP'])) {
|
||||
$varIP = filter_var(trim($_GET['formIP']), FILTER_VALIDATE_IP);
|
||||
}
|
||||
|
||||
|
||||
// Create connection
|
||||
$conn2 = new mysqli($servername, $username, $password, $dbname);
|
||||
|
||||
|
||||
//Check Connection
|
||||
if ($conn2->connect_error) {
|
||||
die("Connection Failed: " . $conn2->connect_error);
|
||||
}
|
||||
|
||||
|
||||
//Query
|
||||
|
||||
|
||||
$sql = "SELECT src_ip, dst_ip FROM `rawdata` WHERE `dst_ip` = '".$varIP."' AND `dst_port` = '".$varPort."' AND time > (UNIX_TIMESTAMP() - 86400) GROUP BY src_ip ORDER BY src_ip;";
|
||||
|
||||
|
||||
$result = $conn2->query($sql);
|
||||
//If there are results of the query, display them.
|
||||
if ($result->num_rows >0) {
|
||||
echo "Now viewing data for Destination Port: $varPort";
|
||||
echo "<table align='center'><tr><th colspan='2'>Destination IP: $varIP <a href=https://billing.int.liquidweb.com/mysql/content/admin/netblock/assignment/search.mhtml?customer=".$varIP."&submit=Search target=_blank>Netblock</a></tr></th><tr><th>Source IPs</th><th>Whois</tr>";
|
||||
|
||||
echo "<table align='center'><tr><th colspan='2'>Destination IP: $varIP <a href=https://DOMAIN.com/ips/assignment/search.mhtml?customer=".$varIP."&submit=Search target=_blank>Netblock</a></tr></th><tr><th>Source IPs</th><th>Whois</tr>";
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr><td>".$row["src_ip"]."</td><td><a href=http://utilities.mon.liquidweb.com/netdata/whoislookup.php?formIPaddr=".$row["src_ip"]." target=_blank>Whois</a></tr>";
|
||||
echo "<tr><td>".$row["src_ip"]."</td><td><a href=http://DOMAIN.com/netdata/whoislookup.php?formIPaddr=".$row["src_ip"]." target=_blank>Whois</a></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user