Hi,
Added software statistics for Java, OpenOffice.org, Adobe Flash Player and Adobe Reader like there already are statistics for IE, Firefox and Thunderbird.
Keeping these products up to date is a priority as they are most targeted by various exploits. A good overview helps.
I also fixed the issue I reported here [1] in both delete_missed_audits.php and delete_systems.php.
Attached is the svn diff for all the changes as well a zip file containing all the modified and added files.
Please apply the changes to the trunk ASAP or notify me of any problems with these changes here so I can fix them.
The png files were taken from the internet or my Fedora installation, the openoffice icon was converted from the homepage's favicon.ico. I assume there are no copyright issues as these are just 16x16 icons.
Regards, kilgor
1 - [url]http://www.open-audit.org/phpBB3/viewtopic.php?f=8&t=3414[/url]
[code] $ svn status | sort A images/adobe_flash_player.png A images/adobe_reader.png A images/java.png A images/oo.org.png A list_viewdef_statistic_adobe_flash_player.php A list_viewdef_statistic_adobe_reader.php A list_viewdef_statistic_java.php A list_viewdef_statistic_openoffice.org.php M delete_missed_audits.php M delete_systems.php M include_menu_array.php [/code]
[code] $ svn diff Index: list_viewdef_statistic_openoffice.org.php =================================================================== --- list_viewdef_statistic_openoffice.org.php (revision 0) +++ list_viewdef_statistic_openoffice.org.php (revision 0) @@ -0,0 +1,54 @@ +<?php + +$query_array=array("headline"=>__("Statistic for OpenOffice.org Versions"), + "sql"=>" + SELECT + DISTINCT software_name, software_version, + COUNT( * ) AS count_item, + round( 100 / ( + SELECT count(software_uuid) FROM software, system + WHERE + software_name LIKE 'OpenOffice.org%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + ) + * COUNT( * ) + ,$round_to_decimal_places ) AS percentage + FROM + software, system + WHERE + software_name LIKE 'OpenOffice.org%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + GROUP BY software_version + ", + "sort"=>"count_item", + "dir"=>"DESC", + "get"=>array("file"=>"list.php", + "title"=>__("Systems installed this Version of this Software"), + "var"=>array("name"=>"%software_name", + "version"=>"%software_version", + "view"=>"systems_for_software_version", + "headline_addition"=>"%software_name", + ), + ), + "fields"=>array("10"=>array("name"=>"software_version", + "head"=>__("Version"), + "show"=>"y", + "link"=>"y", + ), + "20"=>array("name"=>"count_item", + "head"=>__("Count"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + "30"=>array("name"=>"percentage", + "head"=>__("Percentage"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + ), + ); +?> Index: images/adobe_flash_player.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
Property changes on: images/adobe_flash_player.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
Index: images/adobe_reader.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
Property changes on: images/adobe_reader.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
Index: images/java.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
Property changes on: images/java.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
Index: images/oo.org.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
Property changes on: images/oo.org.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream
Index: list_viewdef_statistic_adobe_flash_player.php =================================================================== --- list_viewdef_statistic_adobe_flash_player.php (revision 0) +++ list_viewdef_statistic_adobe_flash_player.php (revision 0) @@ -0,0 +1,54 @@ +<?php + +$query_array=array("headline"=>__("Statistic for Adobe Flash Player Versions"), + "sql"=>" + SELECT + DISTINCT software_name, software_version, + COUNT( * ) AS count_item, + round( 100 / ( + SELECT count(software_uuid) FROM software, system + WHERE + software_name LIKE 'Adobe Flash Player%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + ) + * COUNT( * ) + ,$round_to_decimal_places ) AS percentage + FROM + software, system + WHERE + software_name LIKE 'Adobe Flash Player%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + GROUP BY software_version + ", + "sort"=>"count_item", + "dir"=>"DESC", + "get"=>array("file"=>"list.php", + "title"=>__("Systems installed this Version of this Software"), + "var"=>array("name"=>"%software_name", + "version"=>"%software_version", + "view"=>"systems_for_software_version", + "headline_addition"=>"%software_name", + ), + ), + "fields"=>array("10"=>array("name"=>"software_version", + "head"=>__("Version"), + "show"=>"y", + "link"=>"y", + ), + "20"=>array("name"=>"count_item", + "head"=>__("Count"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + "30"=>array("name"=>"percentage", + "head"=>__("Percentage"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + ), + ); +?> Index: list_viewdef_statistic_adobe_reader.php =================================================================== --- list_viewdef_statistic_adobe_reader.php (revision 0) +++ list_viewdef_statistic_adobe_reader.php (revision 0) @@ -0,0 +1,54 @@ +<?php + +$query_array=array("headline"=>__("Statistic for Adobe Reader Versions"), + "sql"=>" + SELECT + DISTINCT software_name, software_version, + COUNT( * ) AS count_item, + round( 100 / ( + SELECT count(software_uuid) FROM software, system + WHERE + software_name LIKE 'Adobe Reader%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + ) + * COUNT( * ) + ,$round_to_decimal_places ) AS percentage + FROM + software, system + WHERE + software_name LIKE 'Adobe Reader%' AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + GROUP BY software_version + ", + "sort"=>"count_item", + "dir"=>"DESC", + "get"=>array("file"=>"list.php", + "title"=>__("Systems installed this Version of this Software"), + "var"=>array("name"=>"%software_name", + "version"=>"%software_version", + "view"=>"systems_for_software_version", + "headline_addition"=>"%software_name", + ), + ), + "fields"=>array("10"=>array("name"=>"software_version", + "head"=>__("Version"), + "show"=>"y", + "link"=>"y", + ), + "20"=>array("name"=>"count_item", + "head"=>__("Count"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + "30"=>array("name"=>"percentage", + "head"=>__("Percentage"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + ), + ); +?> Index: include_menu_array.php =================================================================== --- include_menu_array.php (revision 1186) +++ include_menu_array.php (working copy) @@ -177,8 +177,12 @@ "class"=>"menuparent", "childs"=>array("10"=>array("name"=>"OS Type", "link"=>"./list.php?view=statistic_os", "image"=>"images/os.png", "title"=>"OS Type",), "20"=>array("name"=>"IE Versions", "link"=>"./list.php?view=statistic_ie", "image"=>"images/browser.png", "title"=>"Internet Explorer Versions",), - "25"=>array("name"=>"Firefox Versions", "link"=>"./list.php?view=statistic_firefox", "image"=>"images/browser_ff.png", "title"=>"Mozilla Firefox Versions",), - "27"=>array("name"=>"Thunderbird Versions", "link"=>"./list.php?view=statistic_thunderbird", "image"=>"images/mail_tb.png", "title"=>"Mozilla Thunderbird Versions",), + "21"=>array("name"=>"Firefox Versions", "link"=>"./list.php?view=statistic_firefox", "image"=>"images/browser_ff.png", "title"=>"Mozilla Firefox Versions",), + "22"=>array("name"=>"Thunderbird Versions", "link"=>"./list.php?view=statistic_thunderbird", "image"=>"images/mail_tb.png", "title"=>"Mozilla Thunderbird Versions",), + "23"=>array("name"=>"Adobe Flash Player Versions", "link"=>"./list.php?view=statistic_adobe_flash_player", "image"=>"images/adobe_flash_player.png", "title"=>"Adobe Flash Player Versions",), + "24"=>array("name"=>"Adobe Reader Versions", "link"=>"./list.php?view=statistic_adobe_reader", "image"=>"images/adobe_reader.png", "title"=>"Adobe Reader Versions",), + "25"=>array("name"=>"OpenOffice.org Versions", "link"=>"./list.php?view=statistic_openoffice.org", "image"=>"images/oo.org.png", "title"=>"OpenOffice.org Versions",), + "26"=>array("name"=>"Java Versions", "link"=>"./list.php?view=statistic_java", "image"=>"images/java.png", "title"=>"Java Versions",), "30"=>array("name"=>"Memory Size", "link"=>"./list.php?view=statistic_memory", "image"=>"images/memory.png", "title"=>"Memory Size",), "40"=>array("name"=>"Processor Types", "link"=>"./list.php?view=statistic_processor", "image"=>"images/processor.png", "title"=>"Processor Types",), "50"=>array("name"=>"Hard Drive", "link"=>"./list.php?view=statistic_harddrive", "image"=>"images/harddisk.png", "title"=>"Hard Drive",), Index: delete_systems.php =================================================================== --- delete_systems.php (revision 1186) +++ delete_systems.php (working copy) @@ -227,7 +227,7 @@ do { $bgcolor = change_row_color($bgcolor,$bg1,$bg2); echo "<tr style=\"bgcolor:" . $bgcolor . ";\"> - <td width=\"5%\"><input type=\"checkbox\" name=" . $myrow["system_uuid"] . " id=" . $myrow["system_uuid"] . " value=" . $myrow["system_uuid"] . "></td> + <td width=\"5%\"><input type=\"checkbox\" name=\"" . $myrow["system_uuid"] . "\" id=\"" . $myrow["system_uuid"] . "\" value=\"" . $myrow["system_uuid"] . "\"></td> <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&view=summary\">" . ip_trans($myrow["net_ip_address"]) . "</a></td> <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&view=summary\">" . $myrow["system_name"] . "</a></td> <td>" . $myrow["net_domain"] . "</td> Index: list_viewdef_statistic_java.php =================================================================== --- list_viewdef_statistic_java.php (revision 0) +++ list_viewdef_statistic_java.php (revision 0) @@ -0,0 +1,56 @@ +<?php + +$query_array=array("headline"=>__("Statistic for Java Versions"), + "sql"=>" + SELECT + DISTINCT software_name, software_version, + COUNT( * ) AS count_item, + round( 100 / ( + SELECT count(software_uuid) FROM software, system + WHERE + (software_name LIKE 'Java%' OR + software_name LIKE 'J2SE%') AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + ) + * COUNT( * ) + ,$round_to_decimal_places ) AS percentage + FROM + software, system + WHERE + (software_name LIKE 'Java%' OR + software_name LIKE 'J2SE%') AND + software_timestamp=system_timestamp AND + software_uuid=system_uuid + GROUP BY software_version + ", + "sort"=>"count_item", + "dir"=>"DESC", + "get"=>array("file"=>"list.php", + "title"=>__("Systems installed this Version of this Software"), + "var"=>array("name"=>"%software_name", + "version"=>"%software_version", + "view"=>"systems_for_software_version", + "headline_addition"=>"%software_name", + ), + ), + "fields"=>array("10"=>array("name"=>"software_version", + "head"=>__("Version"), + "show"=>"y", + "link"=>"y", + ), + "20"=>array("name"=>"count_item", + "head"=>__("Count"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + "30"=>array("name"=>"percentage", + "head"=>__("Percentage"), + "show"=>"y", + "link"=>"n", + "search"=>"n", + ), + ), + ); +?> Index: delete_missed_audits.php =================================================================== --- delete_missed_audits.php (revision 1186) +++ delete_missed_audits.php (working copy) @@ -229,7 +229,7 @@ do { $bgcolor = change_row_color($bgcolor,$bg1,$bg2); echo "<tr style=\"bgcolor:" . $bgcolor . ";\"> - <td width=\"5%\"><input type=\"checkbox\" name=" . $myrow["system_uuid"] . " id=" . $myrow["system_uuid"] . " value=" . $myrow["system_uuid"] . "></td> + <td width=\"5%\"><input type=\"checkbox\" name=\"" . $myrow["system_uuid"] . "\" id=\"" . $myrow["system_uuid"] . "\" value=\"" . $myrow["system_uuid"] . "\"></td> <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&view=summary\">" . ip_trans($myrow["net_ip_address"]) . "</a></td> <td><a href=\"system.php?pc=".$myrow["system_uuid"]."&view=summary\">" . $myrow["system_name"] . "</a></td> <td>" . $myrow["net_domain"] . "</td>
[/code]
|