This file is indexed.

/usr/share/netmrg/lib/misc.php is in netmrg 0.20-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
57
58
59
60
61
62
63
64
65
<?php
/********************************************
* NetMRG Integrator
*
* misc.php
* Misc Subroutines Module
*
* see doc/LICENSE for copyright information
********************************************/

function get_img_tag_from_status($status)
{

	$color = get_color_from_situation($status);

	$img = ('<img src="' . get_image_by_name($color . '_led_on') . '" border="0" align="middle" alt="status '.$status.'" />');

	return $img;
} // end get_img_tag_from_status()


function get_color_from_situation($situation)
{
	switch ($situation)
	{
		case 0: 	$color = "blue";	break;
		case 1: 	$color = "green";	break;
		case 2: 	$color = "yellow";	break;
		case 3: 	$color = "red"; 	break;
		default:	$color = "blue";	break;
	} // end switch situation
	
	return $color;

} // end get_color_from_situation()


// seed with microseconds
function make_seed()
{
   list($usec, $sec) = explode(' ', microtime());
   return (float) $sec + ((float) $usec * 100000);
}


function htmlcolor_to_rgb($htmlcolor)
{
	$c = str_replace("#", "", $htmlcolor);
	$r1 = substr($c,0,2);
	$g1 = substr($c,2,2);
	$b1 = substr($c,4,2);
	$r = hexdec($r1);
	$g = hexdec($g1);
	$b = hexdec($b1);
	return array("r" => $r, "g" => $g, "b" => $b);
}


function rgb_to_htmlcolor($r, $g, $b)
{
	return sprintf("#%02x%02x%02x", $r, $g, $b);
}


?>