Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue in php encoders #119

Open
Ali-Razmjoo opened this issue Apr 18, 2017 · 1 comment
Open

issue in php encoders #119

Ali-Razmjoo opened this issue Apr 18, 2017 · 1 comment
Labels

Comments

@Ali-Razmjoo
Copy link
Collaborator

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"; ?>
@sameersingh7
Copy link

I'd like to work on this. Please guide me what to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants