From 88aa378c7c439c497442f64d09b3d185e9668bbf Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 10 Apr 2018 20:29:32 +0900 Subject: [PATCH] Update webpagetool.php --- helper/webpagetool.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helper/webpagetool.php b/helper/webpagetool.php index adf1ef3..c0f4ba7 100644 --- a/helper/webpagetool.php +++ b/helper/webpagetool.php @@ -19,19 +19,19 @@ if(!function_exists("get_web_cmd")) { $cmd = ""; if($method == "get") { - $cmd = "curl -A \"%s\" -k %s"; - $cmd_fin = sprintf($cmd, $ua, $url); + $cmd = "curl -A '%s' -k %s"; + $cmd_fin = sprintf($cmd, addslashes($ua), addslashes($url)); $output = shell_exec($cmd_fin); } if($method == "post") { - $cmd = "curl -X POST -A \"%s\" -k %s %s"; + $cmd = "curl -X POST -A '%s' -k %s %s"; $params_cmd = ""; foreach($data as $k=>$v) { $v = addslashes($v); $params_cmd .= "-d '{$k}={$v}' "; } - $cmd_fin = sprintf($cmd, $ua, $url, $params_cmd); + $cmd_fin = sprintf($cmd, addslashes($ua), addslashes($url), $params_cmd); $output = shell_exec($cmd_fin); }