Hertz Posted April 27, 2012 Report Share Posted April 27, 2012 Uitati un chalenge foarte interesant:<?php$challenge = function(){ $t = (string)$_GET['eval']; $t = str_replace(array('`', '$', '*', '#', ':', '\\', '"', "'", '(', '.'), '', $t); if((strlen($t) > 13) || (false !== strpos($t, 'return'))) { die('Nu e permis!'); } try { eval("\$rst= $t"); } catch (Exception $e) { return false; } return ($rst=== '1337');};?>Have fun! Quote Link to comment Share on other sites More sharing options...
totti93 Posted April 27, 2012 Report Share Posted April 27, 2012 (edited) Ai PM cu o rezolvare ciudata, deoarece nu ai specificat ce am / ce nu am voie sa fac... Edited April 27, 2012 by totti93 Quote Link to comment Share on other sites More sharing options...
Hertz Posted April 27, 2012 Author Report Share Posted April 27, 2012 Nu ai acces la cod. Poti manipula doar variabila 'eval'. Quote Link to comment Share on other sites More sharing options...
noVaLue Posted April 28, 2012 Report Share Posted April 28, 2012 Daca vrei sa intoarca true, atunci va trebui sa vad si eu cum faci ca sa sari peste verificare. Quote Link to comment Share on other sites More sharing options...
u0m3 Posted April 30, 2012 Report Share Posted April 30, 2012 Cand se va afisa rezolvarea? Ca sunt chiar curios.@Hertz: Eram cat de cat pe aproape? Quote Link to comment Share on other sites More sharing options...
Hertz Posted May 3, 2012 Author Report Share Posted May 3, 2012 u0m3 a fost extrem de aproape, bravo! Iti lipseste doar un %0a la sfarsit.Hint pentru restul: Heredoc Quote Link to comment Share on other sites More sharing options...