";print_r($_SERVER); exit; } if (basename($_SERVER['SCRIPT_NAME']) != $file) { header("Location: {$_SERVER['SCRIPT_NAME']}/"); echo "REDIRECT? 2 "; exit; } if (empty($_SERVER['PATH_INFO'])) { header("Location: {$_SERVER['SCRIPT_NAME']}/"); echo "REDIRECT? 3"; exit; } $url = $_SERVER['PATH_INFO']; $url = str_replace('//','/',$url); $bits = explode('/',$_SERVER['PATH_INFO']); $last = array_pop($bits); $lastbit = $last; $bits[0] = 'ROOT'; $bits = array_reverse($bits); $link = './'; foreach($bits as $sub) { $last = "".htmlspecialchars($sub) . " / {$last}"; $link .= '../'; } if ($url == '/' && $needAuth) { if ($needAuth) { $hhost = str_replace('http://','http://'.$_SERVER['PHP_AUTH_USER'].':'.$_SERVER['PHP_AUTH_PW']."@",$host); } $data = @file_get_contents($hhost.$url); if (!$data) { header('WWW-Authenticate: Basic realm="SVN AUTH"'); header('HTTP/1.0 401 Unauthorized'); echo "You must enter a valid login ID and password to access this resource\n"; exit; } } ?> <?= $lastbit ?>

Location:

From          [View Viewers Source]


"; exit; } $data = file_get_contents($host.$url); if (!$data && $url == '/') { echo "EMPTY: FAIL AUTH AGAIN?"; } if (!$ext) { echo $data; exit; } if ( in_array($ext,array('php','class')) && preg_match('/<\?/',$data)) { highlight_string($data) ; exit; } //echo "
";print_R($matches);echo "
"; if (in_array(strtolower($ext) , explode(',','defs,c,h,sh,wddx,xml,css,sql,mysql,psql,txt,js,tc,jay,conf,xul,cpp,hpp,imc') )) { echo "
". htmlspecialchars($data) . "
"; exit; } if (in_array($ext , explode(',','tar,tgz,dia,zip') )) { echo "
CAN NOT DISPLAY THIS FILE TYPE
"; exit; } // usually dir listings.. echo $data; }