Line 5... |
Line 5... |
5 |
echo "<FORM action='network.php' method='POST'>";
|
5 |
echo "<FORM action='network.php' method='POST'>";
|
6 |
echo "<table cellspacing=2 cellpadding=3 border=1>";
|
6 |
echo "<table cellspacing=2 cellpadding=3 border=1>";
|
7 |
echo "<tr><th>$l_mac_address<th>$l_ip_address<th>Info<th>$l_del</tr>";
|
7 |
echo "<tr><th>$l_mac_address<th>$l_ip_address<th>Info<th>$l_del</tr>";
|
8 |
// Read the "ether" file
|
8 |
// Read the "ether" file
|
9 |
$intif = $conf["INTIF"];
|
9 |
$intif = $conf["INTIF"];
|
10 |
exec ("sudo /sbin/ip link show $intif", $output);
|
10 |
exec("sudo /sbin/ip link show ".escapeshellarg($intif), $output);
|
11 |
$detail = explode (" " , $output[1]);
|
11 |
$detail = explode (" " , $output[1]);
|
12 |
$intif_mac_addr=strtoupper(str_replace(":","-",$detail[5]));
|
12 |
$intif_mac_addr=strtoupper(str_replace(":","-",$detail[5]));
|
13 |
unset ($output);unset ($detail);
|
13 |
unset ($output);unset ($detail);
|
14 |
$line_exist=False;
|
14 |
$line_exist=False;
|
15 |
$tab=file(ETHERS_INFO_FILE);
|
15 |
$tab=file(ETHERS_INFO_FILE);
|