[Reverse-Engineering] PHP vld 0.17.1 Kompatibiltätsproblem mit PHP 5.6 Parameter -dvld.active=1 funktioniert nicht.

in #reverse-engineering3 years ago (edited)

vld-Versionen größer als 0.13 lassen sich nicht mit php5.6 kompilieren, es wäre nett, wenn die Programmierer dieses angegeben hätten. Ich musste mir die Mühe machen, alles Versionen durchzuprobieren und bei mir hat nur die Version 0.13 funktioniert.

wget https://pecl.php.net/get/vld-0.13.0.tgz
tar zxvf vld-13.0.tgz
cd ./vld-0.13.0
/usr/local/php/bin/phpize or directly phpize
./configure --with-php-config=/usr/bin/php-config5.6 --enable-vld
make && make install #kompilieren und installieren
grep "^extension=vld.so" /etc/php/5.6/cli/php.ini || echo "extension=vld.so" >> /etc/php/5.6/cli/php.ini #Erweiterung aktivieren

Weil der Kommandozeilenparameter

-d vld.active=1

bei mir nicht funktioniert müssen wir es manuell in die php.ini Datei eintrage:
vld.active=1

image.png

Extra info zum Herausfinden wo sich die php.ini Datei befindet:

php5.6 -r "@phpinfo();" | grep [.]ini

Und jetzt werden die Opcodes beim Ausführen angezeigt.
Dafür verwenden wir erst einmal eine kleine test datei:

nano debug.php

<?php 
$text = "Fehlerbeheber wartet auf schwere Fehler."; 
echo $text . PHP_EOL; 

Und führen dann diese Datei mit dem PHP-Befehl aus:

php5.6 debug.php

Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /usr/src/debug.php
function name:  (null)
number of ops:  4
compiled vars:  !0 = $text
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, 'Fehlerbeheber+wartet+auf+schwere+Fehler.'
   3     1        CONCAT                                           ~1      !0, '%0A'
         2        ECHO                                                     ~1
   5     3      > RETURN                                                   1

branch: #  0; line:     2-    5; sop:     0; eop:     3; out1:  -2
path #1: 0, 
Fehlerbeheber wartet auf schwere Fehler.







Sort:  

Es gibt noch eine einfachere Methode, allerdings habe ich sie noch nicht ausprobiert:

pickle.phar install vld

Congratulations @fehlerbeheber! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You got more than 10 replies.
Your next target is to reach 50 replies.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP