1 diff -ruBbd cacti-0.8.6i/scripts/query_host_cpu.php cacti-0.8.6i-patch/scripts/query_host_cpu.php
2 --- cacti-0.8.6i/scripts/query_host_cpu.php 2006-10-09 00:06:00.000000000 -0400
3 +++ cacti-0.8.6i-patch/scripts/query_host_cpu.php 2007-01-01 12:50:55.781250000 -0500
7 +/* do NOT run this script through a web browser */
8 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
9 + die("<br><strong>This script is only meant to run at the command line.</strong>");
12 $no_http_headers = true;
14 include(dirname(__FILE__) . "/../include/config.php");
15 include(dirname(__FILE__) . "/../lib/snmp.php");
17 diff -ruBbd cacti-0.8.6i/scripts/query_host_partitions.php cacti-0.8.6i-patch/scripts/query_host_partitions.php
18 --- cacti-0.8.6i/scripts/query_host_partitions.php 2006-10-09 00:06:00.000000000 -0400
19 +++ cacti-0.8.6i-patch/scripts/query_host_partitions.php 2007-01-01 12:50:55.781250000 -0500
23 +/* do NOT run this script through a web browser */
24 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
25 + die("<br><strong>This script is only meant to run at the command line.</strong>");
28 $no_http_headers = true;
30 include(dirname(__FILE__) . "/../include/config.php");
31 include(dirname(__FILE__) . "/../lib/snmp.php");
33 diff -ruBbd cacti-0.8.6i/scripts/sql.php cacti-0.8.6i-patch/scripts/sql.php
34 --- cacti-0.8.6i/scripts/sql.php 2006-10-09 00:06:00.000000000 -0400
35 +++ cacti-0.8.6i-patch/scripts/sql.php 2007-01-01 12:50:55.781250000 -0500
39 +/* do NOT run this script through a web browser */
40 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
41 + die("<br><strong>This script is only meant to run at the command line.</strong>");
44 $no_http_headers = true;
46 include(dirname(__FILE__) . "/../include/config.php");
48 if ($database_password == "") {
49 diff -ruBbd cacti-0.8.6i/scripts/ss_fping.php cacti-0.8.6i-patch/scripts/ss_fping.php
50 --- cacti-0.8.6i/scripts/ss_fping.php 2006-10-09 00:06:00.000000000 -0400
51 +++ cacti-0.8.6i-patch/scripts/ss_fping.php 2007-01-01 12:50:55.796875000 -0500
56 -//STANDARD SCRIPT SERVER HEADER!!!
57 +/* do NOT run this script through a web browser */
58 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
59 + die("<br><strong>This script is only meant to run at the command line.</strong>");
62 $no_http_headers = true;
64 /* display No errors */
65 diff -ruBbd cacti-0.8.6i/scripts/ss_host_cpu.php cacti-0.8.6i-patch/scripts/ss_host_cpu.php
66 --- cacti-0.8.6i/scripts/ss_host_cpu.php 2006-10-09 00:06:00.000000000 -0400
67 +++ cacti-0.8.6i-patch/scripts/ss_host_cpu.php 2007-01-01 12:50:55.796875000 -0500
71 +/* do NOT run this script through a web browser */
72 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
73 + die("<br><strong>This script is only meant to run at the command line.</strong>");
76 $no_http_headers = true;
78 /* display No errors */
79 diff -ruBbd cacti-0.8.6i/scripts/ss_host_disk.php cacti-0.8.6i-patch/scripts/ss_host_disk.php
80 --- cacti-0.8.6i/scripts/ss_host_disk.php 2006-10-09 00:06:00.000000000 -0400
81 +++ cacti-0.8.6i-patch/scripts/ss_host_disk.php 2007-01-01 12:50:55.796875000 -0500
85 +/* do NOT run this script through a web browser */
86 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
87 + die("<br><strong>This script is only meant to run at the command line.</strong>");
90 $no_http_headers = true;
92 /* display No errors */
93 diff -ruBbd cacti-0.8.6i/scripts/ss_sql.php cacti-0.8.6i-patch/scripts/ss_sql.php
94 --- cacti-0.8.6i/scripts/ss_sql.php 2006-10-09 00:06:00.000000000 -0400
95 +++ cacti-0.8.6i-patch/scripts/ss_sql.php 2007-01-01 12:50:55.781250000 -0500
99 +/* do NOT run this script through a web browser */
100 +if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
101 + die("<br><strong>This script is only meant to run at the command line.</strong>");
104 $no_http_headers = true;
106 /* display ALL errors */