PIRANHA CONFIGURATION TOOL | INTRODUCTION | HELP |
EDIT MONITORING SCRIPTS |
"; // echo " [" . $virt[$selected_host]['expect'] . "] [$expect] "; // echo " [" . $virt[$selected_host]['send_program'] . "] [$send_program] "; // echo " [" . $virt[$selected_host]['expect_program'] . "] [$expect_program] "; /* * php escapes \n to \\n ! argh! { fortunately there is stripslashes(); * this statement is right only if magic_quotes_gpc is set to ON ! */ $lst = array ("send", "expect", "start_cmd", "stop_cmd", "send_program", "expect_program", "use_regex"); foreach ($lst as $i) { if (!isset($_GET[$i])) { $_GET[$i] = ""; } } if (get_magic_quotes_gpc() == 1) { $send = stripslashes($_GET['send']); $expect = stripslashes($_GET['expect']); $start_cmd = stripslashes($_GET['start_cmd']); $stop_cmd = stripslashes($_GET['stop_cmd']); $send_program = stripslashes($_GET['send_program']); $expect_program = stripslashes($_GET['expect_program']); } else { $send = $_GET['send']; $expect = $_GET['expect']; $start_cmd = $_GET['start_cmd']; $stop_cmd = $_GET['stop_cmd']; $send_program = $_GET['send_program']; $expect_program = $_GET['expect_program']; } $use_regex = $_GET['use_regex']; if ( $use_regex != "1" ) { $use_regex = "0"; } if ($gen_service == "ACCEPT") { $virt[$selected_host]['use_regex'] = $use_regex; /* take values and enclose them in quotes */ if (!empty($send)) { $send = "\"" . $send . "\""; $virt[$selected_host]['send'] = $send; } if (!empty($expect)) { $expect = "\"" . $expect . "\""; $virt[$selected_host]['expect'] = $expect; } if (!empty($send_program)) { $send_program = "\"" . $send_program . "\""; $virt[$selected_host]['send_program'] = $send_program; } if (!empty($expect_program)) { $expect_program = "\"" . $expect_program . "\""; $virt[$selected_host]['expect_program'] = $expect_program; } } if ($gen_service == "BLANK SEND") { $send = ""; if (!empty($selected_host)) { $virt[$selected_host]['send'] = ""; } } if ($gen_service == "BLANK EXPECT") { $expect = ""; if (!empty($selected_host)) { $virt[$selected_host]['expect'] = ""; } } if ($gen_service == "NO SEND PROGRAM") { $start_cmd = ""; if (!empty($selected_host)) { $virt[$selected_host]['send_program'] = ""; } } if ($gen_service == "NO EXPECT PROGRAM") { $stop_cmd = ""; if (!empty($selected_host)) { $virt[$selected_host]['expect_program'] = ""; } } ?>
|