ZSC
ZSC copied to clipboard
issue in php encoders
As you see in this line all of <?php ,<? and ?> will be remvoed.
content = content.replace('<?php', '').replace('<?', '').replace('?>', '')
it will work fine if our php script is including just one <?php tag! otherwise it won't work fine.
sample of multi <?php tag which will not work:
<?php echo "section 1"; ?> section 2 is html <?php echo "section 3 is php"; ?>
execute before and after encoding:
C:\Users\Zombie\Downloads\OWASP-ZSC-master>php 1.php
section 1 section 2 is html section 3 is php
C:\Users\Zombie\Downloads\OWASP-ZSC-master>php 1.php
Parse error: syntax error, unexpected '2' (T_LNUMBER) in C:\Users\Zombie\Downloads\OWASP-ZSC-master\1.php(12) : eval()'d code on line 1
C:\Users\Zombie\Downloads\OWASP-ZSC-master>
decode generated file:
echo "section 1"; section 2 is html echo "section 3 is php";
which it must be this to work fine:
echo "section 1"; ?> section 2 is html <?php echo "section 3 is php"; ?>
I'd like to work on this. Please guide me what to do.