Skip to content

issue in php encoders #119

Description

@Ali-Razmjoo

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"; ?>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions