diff options
author | Chris Buechler <cmb@pfsense.org> | 2014-11-28 20:28:22 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2014-11-28 20:28:22 -0600 |
commit | b2672b93a0917d7efea54e6692458e71a091dbd3 (patch) | |
tree | 6f4b11ecd74c328b4bb25ebf0533963a65f3cf93 /config/iperf.xml | |
parent | 6c4cfcc52d41b5ea5b5411c3db8d2ec88e511bae (diff) | |
download | pfsense-packages-b2672b93a0917d7efea54e6692458e71a091dbd3.tar.gz pfsense-packages-b2672b93a0917d7efea54e6692458e71a091dbd3.tar.bz2 pfsense-packages-b2672b93a0917d7efea54e6692458e71a091dbd3.zip |
touch up arpwatch, add escaping to iperf
Diffstat (limited to 'config/iperf.xml')
-rw-r--r-- | config/iperf.xml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/config/iperf.xml b/config/iperf.xml index f64500d9..3b17f549 100644 --- a/config/iperf.xml +++ b/config/iperf.xml @@ -150,13 +150,12 @@ $iperf_options = ""; if($_POST['protocol'] == "udp") $iperf_options .= " -u"; if($_POST['format'] == "bytes") $iperf_options .= " -f A"; - if($_POST['interval'] != "") $iperf_options .= " -i {$_POST['interval']}"; - if($_POST['length'] != "") $iperf_options .= " -l {$_POST['length']}"; - if($_POST['window'] != "") $iperf_options .= " -w {$_POST['window']}"; - if($_POST['udpbandwidth'] != "") $iperf_options .= " -b {$_POST['udpbandwidth']}"; - if($_POST['port'] != "") $iperf_options .= " -p {$_POST['port']}"; - $iperf_options .= " -c {$_POST['hostname']}"; + if($_POST['interval'] != "") $iperf_options .= " -i " . escapeshellarg($_POST['interval']); + if($_POST['length'] != "") $iperf_options .= " -l " . escapeshellarg($_POST['length']); + if($_POST['window'] != "") $iperf_options .= " -w " . escapeshellarg($_POST['window']); + if($_POST['udpbandwidth'] != "") $iperf_options .= " -b " . escapeshellarg($_POST['udpbandwidth']); + if($_POST['port'] != "") $iperf_options .= " -p " . escapeshellarg($_POST['port']); + $iperf_options .= " -c " . escapeshellarg($_POST['hostname']); system("/usr/local/bin/iperf" . $iperf_options); </custom_add_php_command> -</packagegui> - +</packagegui>
\ No newline at end of file |