In PHP, the XOR between 2 strings is done by xoring the ascii value of each couple of characters. For instance I can write "_<(0[|@>2__[@"^":_@_{[([^30|{" instead of "echo 'hello';".
If I run this PHP <?php eval("_<(0[|@>2__[@"^":_@_{[([^30|{");, it prints hello on the page. (example in a sandbox)
I tried to eval that XOR in a URL parameter using the following code running locally at localhost:8000 but it doesn't print anything.
<?php
if(isset($_GET['param'])){
eval($_GET['param']);
die();
}
The request URL I wrote is:
http://localhost:8000/?param="_<(0[|@>2__[@"^":_@_{[([^30|{"
My question is why the xor between the strings in the URL parameter is not evaluated. How can I make it working?