Skip to content

Commit

Permalink
All eval's removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sparc committed Sep 4, 2015
1 parent 37f3f7a commit 5cc5724
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions whois.parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ function generic_parser_a_blocks ($rawdata, $translate, &$disclaimer)
if ($k=='') continue;
if (strstr($k,'.'))
{
eval("\$block".getvarname($k)."=\$v;");
$var = 'block'.getvarname($k);
$$var = $v;
continue;
}
}
Expand Down Expand Up @@ -446,9 +447,8 @@ function get_blocks ( $rawdata, $items, $partial_match = false, $def_block = fal
}
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;
Expand Down Expand Up @@ -518,7 +518,11 @@ function get_blocks ( $rawdata, $items, $partial_match = false, $def_block = fal
if ($pos !== false)
{
$var = getvarname(strtok($field,'#'));
if ($var != '[]') eval('$r'.$var.'=$block;');
if ($var != '[]')
{
$var = 'r'.$var;
$$var = $block;
}
}
}
}
Expand Down Expand Up @@ -630,7 +634,8 @@ function get_contact ( $array, $extra_items='', $has_org= false )

if ($field != '' && $itm != '')
{
eval('$r'.getvarname($field).'=$itm;');
$var = 'r'.getvarname($field);
$$var = $itm;
}

$val = trim(substr($val,0,$pos));
Expand Down

0 comments on commit 5cc5724

Please sign in to comment.