You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not work in Bash.
The PHP code is between "double quotes", so Bash will replace all $variables by the value of the variable in Bash, of by nothing if not defined.
Example:
/path/to/httpdocs$ php -r "require_once('app/Mage.php');Mage::app();$config=Mage::getConfig()->getNode()->modules;$found=array();$list=fopen('https://raw.githubusercontent.com/gwillem/magevulndb/master/magento1-vulnerable-extensions.csv','r');while($list&&list($name,$version)=list($row['module'],$row['fixed_in'],,$row['reference'],$row['update'])=fgetcsv($list)){if(isset($name,$version,$config->{$name},$config->{$name}->version)&&(empty($version)||version_compare($config->{$name}->version,$version,'<'))){$found[]=$row;}}if($found){echo 'Found possible vulnerable modules: '.print_r($found,1);}else{echo 'No known vulnerable modules detected.';}"
PHP Parse error: syntax error, unexpected '=', expecting end of file in Command line code on line 1
Parse error: syntax error, unexpected '=', expecting end of file in Command line code on line 1
PHP complains here because $config is removed so the remaining statement is =Mage::getConfig()->getNode()->modules;
The text was updated successfully, but these errors were encountered:
See: https://github.com/gwillem/magevulndb#no-magerun-installed
This does not work in Bash.
The PHP code is between "double quotes", so Bash will replace all
$variables
by the value of the variable in Bash, of by nothing if not defined.Example:
PHP complains here because
$config
is removed so the remaining statement is=Mage::getConfig()->getNode()->modules;
The text was updated successfully, but these errors were encountered: