From 396625ce5b78730a45aa2196a0f82b646151d11d Mon Sep 17 00:00:00 2001 From: sparc Date: Fri, 4 Sep 2015 17:47:44 +0000 Subject: [PATCH] All eval's removed --- src/whois.parser.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/whois.parser.php b/src/whois.parser.php index 0a59080..c131364 100755 --- a/src/whois.parser.php +++ b/src/whois.parser.php @@ -109,7 +109,8 @@ while (list($key,$val)=each($rawdata)) if ($k=='') continue; if (strstr($k,'.')) { - eval("\$block".getvarname($k)."=\$v;"); + $var = 'block'.getvarname($k); + $$var = $v; continue; } } @@ -446,9 +447,8 @@ while (list($key,$val) = each($rawdata)) } else { - $var = getvarname(strtok($field,'#')); - $itm = trim(substr($val,$pos+strlen($match))); - eval('$r'.$var.'=$itm;'); + $var = 'r'.getvarname(strtok($field,'#')); + $$var = trim(substr($val,$pos+strlen($match))); } break; @@ -518,7 +518,11 @@ while (list($key,$val) = each($rawdata)) if ($pos !== false) { $var = getvarname(strtok($field,'#')); - if ($var != '[]') eval('$r'.$var.'=$block;'); + if ($var != '[]') + { + $var = 'r'.$var; + $$var = $block; + } } } } @@ -630,7 +634,8 @@ while (list($key,$val)=each($array)) if ($field != '' && $itm != '') { - eval('$r'.getvarname($field).'=$itm;'); + $var = 'r'.getvarname($field); + $$var = $itm; } $val = trim(substr($val,0,$pos));