PHP Quines

Quines are self-reproducing programmes. Here are two in PHP I just wrote:

CLI version:

<?php $a='<?php $a=%c%s%c;printf($a,39,$a,39);?>’;printf($a,39,$a,39);?>

WEB version:

<?php $a=’&lt;?php $a=%c%s%c;printf($a,39,htmlspecialchars($a),39);?&gt;’;printf($a,39,htmlspecialchars($a),39);?>

Leave a Reply

Your email address will not be published. Required fields are marked *