<?php
### Brainy Control Panel
### Decoded IonCube by pimnik98
### Декодировал Пиминов Никита
### vk.com/piminov_remont
### Скрипт скачан с портала X-Scripts.Ru
require_once "/etc/brainy/conf/globals.php";
require_once "/etc/brainy/classes/server.php";
$error_log_stream = "/dev/null";
$server = new server();
$conf = $server->config_read("/etc/brainy/data/properties/prop.conf");
if (isset($conf["language"])) {
$langload = $conf["language"];
} else {
$langload = "ru";
}
require_once "/etc/brainy/langs/" . $langload . "/common.php";
$test = json_decode(urldecode($argv[1]));
$new = array();
foreach ($test as $key) {
$new[] = json_decode(json_encode($key), true);
}
if (!is_array($test)) {
$new = json_decode(file_get_contents($test), 1);
}
$file = "/etc/brainy/data/" . $argv[2] . "/main";
$create_dir = "mkdir -m 755 -p /etc/brainy/data/" . $argv[2];
exec($create_dir);
$create_dir = "/etc/brainy/data/" . $argv[2];
exec($create_dir);
$name = $argv[3];
$stream_id = basename($name);
$stream_file = fopen($file, "a+") or exit("Unable to open file!");
fclose($stream_file);
if (!empty($new[0]["array_succes"]) && !empty($new[0]["array_unsucces"])) {
$array_succes = $new[0]["array_succes"];
$array_unsucces = $new[0]["array_unsucces"];
}
$array_start = $new[0]["array_start"];
$thread = 0;
if (isset($new[0]["thread"])) {
$thread = $new[0]["thread"];
}
$indicators = array("#stream_id#", "#error#", "#comm_number#", "#stream_pid#", "#output#");
$err_count = 0;
$iter = 0;
exec("ps aux | grep " . $stream_id, $ret);
foreach ($ret as $value) {
$retu[] = $value;
}
$stream_pid = explode(" ", $retu[0]);
$stream_pid = array_diff($stream_pid, array(""));
ksort($stream_pid);
$i = 0;
foreach ($stream_pid as $value) {
$n_stream_pid[$i] = $value;
$i++;
}
$stream_pid = $n_stream_pid[1];
exec("sed -i 's@#stream_pid#@" . $stream_pid . "@g' " . $file);
exec("sed -i 's@#stream_id#@" . $stream_id . "@g' " . $file);
$thread_backup = $thread;
$counter_comm = 0;
$total_comm_count = count($new);
$type_process = $new[0]["comm"];
if (stripos($type_process, "createbackuphint") !== false || stripos($type_process, "createtranshint") !== false || stripos($type_process, "preparedownloadbackup") !== false || stripos($type_process, "restorebackuphint") !== false) {
file_put_contents($name, "");
}
foreach ($new as $str) {
$counter_comm++;
$iter++;
$comm_number = $iter;
$error = "";
$content = array($stream_id, $error, $comm_number, $stream_pid, $name);
if (is_array($array_start)) {
$array_start = str_replace($indicators, $content, $array_start);
$array_start = array_flip($array_start);
$array_start = str_replace($indicators, $content, $array_start);
$array_start = array_flip($array_start);
$conf = parse_ini_file($file, true);
$new_conf = array_merge($conf, $array_start);
write_php_ini($new_conf, $file);
}
$str["comm"] = str_replace("#output#", $name, $str["comm"]);
$is_echo = strripos($str["comm"], ">>");
if ($is_echo === false) {
$is_echo = strripos($str["comm"], ">");
}
$res_remove = removefromlog_value($str["comm"], $name, $counter_comm, $total_comm_count, $type_process);
if ($res_remove == 1) {
}
if ($res_remove == 0) {
file_put_contents($name, $str["comm"] . "\n", FILE_APPEND);
}
if ($res_remove == 2) {
continue;
}
if ($res_remove == -2) {
break;
}
if ($is_echo === false) {
if ($thread != 0) {
if ((stripos($type_process, "createbackuphint") !== false || stripos($type_process, "createtranshint") !== false || stripos($type_process, "restorebackuphint") !== false) && stripos($str["comm"], "rsync") !== false) {
shell_exec("rm -f " . $name . "_r");
if (stripos($str["comm"], "createbackupremotersync") !== false) {
shell_exec($str["comm"] . " -l='" . $name . "' 2>" . $name . "_r");
} else {
shell_exec($str["comm"] . " 2>" . $name . "_r");
}
} else {
shell_exec($str["comm"] . " 2>" . $name);
}
} else {
if ((stripos($type_process, "createbackuphint") !== false || stripos($type_process, "createtranshint") !== false || stripos($type_process, "restorebackuphint") !== false) && stripos($str["comm"], "rsync") !== false) {
shell_exec("rm -f " . $name . "_r");
if (stripos($str["comm"], "createbackupremotersync") !== false) {
shell_exec($str["comm"] . " -l='" . $name . "' >>" . $name . "_r" . " 2>>" . $error_log_stream);
} else {
shell_exec($str["comm"] . " >>" . $name . "_r" . " 2>>" . $error_log_stream);
}
} else {
shell_exec($str["comm"] . " >>" . $name . " 2>>" . $error_log_stream);
}
}
} else {
shell_exec($str["comm"]);
}
$is_echo = false;
if (!empty($array_succes) && !empty($array_unsucces) && $str["test"] != "no") {
$fooarr = file($name);
$res = trim(end($fooarr));
if ($res == trim($argv[1])) {
$res = "1";
}
if (empty($str["test"])) {
$str["test"] = "1";
}
if ($res != 1) {
$error = $res;
}
$content = array($stream_id, $error, $comm_number, $stream_pid);
$array_succes = str_replace($indicators, $content, $array_succes);
unset($foo);
foreach ($array_succes as $kkkey => $vvvalue) {
$kkkey = str_replace($indicators, $content, $kkkey);
$vvvalue = str_replace($indicators, $content, $vvvalue);
$foo[$kkkey] = $vvvalue;
}
$array_succes = $foo;
$array_unsucces = str_replace($indicators, $content, $array_unsucces);
unset($foo);
foreach ($array_unsucces as $kkkey => $vvvalue) {
$kkkey = str_replace($indicators, $content, $kkkey);
$vvvalue = str_replace($indicators, $content, $vvvalue);
$foo[$kkkey] = $vvvalue;
}
$array_unsucces = $foo;
$try = false;
if ($str["test"] != 1) {
$arr_test = explode("||", $str["test"]);
foreach ($arr_test as $curtest) {
$try = strripos($res, trim($curtest));
if ($try !== false) {
break;
}
}
}
if ($try === false && trim($str["test"]) != "1") {
$conf = parse_ini_file($file, true);
$new_conf = array_merge($conf, $array_unsucces);
$server->config_save($file, $new_conf, "add");
$err_count++;
exit;
}
}
}
if ($err_count == 0 && !empty($array_succes)) {
$conf = parse_ini_file($file, true);
$new_conf = array_merge($conf, $array_succes);
$server->config_save($file, $new_conf, "add");
}
function safefilerewrite($fileName, $dataToSave)
{
if ($fp = fopen($fileName, "w")) {
$startTime = microtime(true);
do {
$canWrite = flock($fp, LOCK_EX);
if (!$canWrite) {
usleep(round(rand(0, 100) * 1000));
}
} while (!($canWrite || microtime(true) - $startTime >= 5));
if ($canWrite) {
fwrite($fp, $dataToSave);
flock($fp, LOCK_UN);
}
fclose($fp);
}
}
function write_php_ini($array, $file)
{
$res = array();
foreach ($array as $key => $val) {
if (is_array($val)) {
$res[] = "[" . $key . "]";
foreach ($val as $skey => $sval) {
$res[] = (string) $skey . "=" . (is_numeric($sval) ? $sval : PHP_EOL . $sval . PHP_EOL);
}
} else {
$res[] = (string) $key . "=" . (is_numeric($val) ? $val : "" . $val . "");
}
}
safefilerewrite($file, implode("\r\n", $res));
}
function writeprocesshuman($logfile, $text, $num_comm, $all_comm)
{
file_put_contents($logfile, $text . ceil(floatval($num_comm / $all_comm) * 100) . "%\n", FILE_APPEND);
}
function removefromlog_value($string, $log, $counter_comm, $totalcomm, $type_process)
{
global $lang;
if (stripos($string, "mysqldump") !== false) {
$start = stripos($string, " -p");
$end = stripos($string, " ", $start + 1);
$getnamedb = stripos($string, " ", $end + 1);
file_put_contents($log, $lang["child_human_log_mysqldb"] . substr($string, $end, $getnamedb - $end + 1) . "\n", FILE_APPEND);
$log_mod = file_get_contents($log);
if (stripos($log_mod, "mysqldump") !== false) {
$log_mod = file_get_contents($log);
$start_comm = stripos($log_mod, "mysqldump");
$end_comm = $start_comm + 40;
$log_mod = substr($log_mod, 0, $start_comm) . "+DUMP DATABASE+" . substr($log_mod, $end_comm);
file_put_contents($log, $log_mod);
}
return 1;
}
if (stripos($string, "bindsync.php") !== false) {
$exp = explode("type=", $string);
list($data) = explode(" ", $exp[1]);
if ($data == "cluster") {
$typesync = $lang["child_human_dns_type_cluster"];
}
if ($data == "server") {
$typesync = $lang["child_human_dns_type_server"];
}
file_put_contents($log, $typesync . "\n");
$exp = explode("cluster=", $string);
list($data) = explode(" ", $exp[1]);
file_put_contents($log, $lang["child_human_dns_ipaddress"] . $data . "\n", FILE_APPEND);
$exp = explode("typeserv=", $string);
list($data) = explode(" ", $exp[1]);
file_put_contents($log, $lang["child_human_dns_typeserver"] . $data . "\n", FILE_APPEND);
return 1;
}
if (stripos($type_process, "createbackuphint") !== false || stripos($type_process, "createtranshint") !== false || stripos($type_process, "restorebackuphint") !== false) {
ini_set("max_execution_time", "30000");
ini_set("max_input_time", "30000");
if (stripos($string, "transfertoremote") !== false) {
list(, $userdec) = explode("#", $string);
writeprocesshuman($log, $lang["child_human_logtransStart"] . $userdec . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "transferfromremote") !== false) {
list(, $userdec) = explode("#", $string);
writeprocesshuman($log, $lang["child_human_logtransStartFromRemote"] . $userdec . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "createbackuphint") !== false) {
list(, $userdec) = explode("#", $string);
writeprocesshuman($log, $lang["child_human_log_startcreate_backup"] . $userdec . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "createtranshint") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_start"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restorebackuphintend") !== false) {
list(, $data_username) = explode("#", $string);
writeprocesshuman($log, $lang["child_human_logtrans_restorebackuphintend"] . $data_username . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restorebackuphint") !== false) {
list(, $data_username) = explode("#", $string);
writeprocesshuman($log, $lang["child_human_logtrans_restorebackuphint"] . $data_username . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "#curusertrans_block1#") !== false) {
$add_data = str_replace("curusertrans_block1", "", $string);
$add_data = str_replace("curusertrans_block2", "", $add_data);
$add_data = str_replace("#", "", $add_data);
$add_data = str_replace("'", "", $add_data);
$add_data = str_replace("echo", "", $add_data);
$add_data = str_replace(">>/dev/null", "", $add_data);
writeprocesshuman($log, $lang["child_human_logtrans_transuser"] . $add_data . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "#curusertrans_block1end#") !== false) {
$add_data = str_replace("curusertrans_block1end", "", $string);
$add_data = str_replace("curusertrans_block2end", "", $add_data);
$add_data = str_replace("#", "", $add_data);
$add_data = str_replace("'", "", $add_data);
$add_data = str_replace("echo", "", $add_data);
$add_data = str_replace(">>/dev/null", "", $add_data);
writeprocesshuman($log, $lang["child_human_logtrans_transuserend"] . $add_data . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "autoins_backup") !== false) {
writeprocesshuman($log, $lang["child_human_log_preparelog2"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_backups_jobs") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_backups_jobs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_backups_jobs") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_backups_jobs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoreftpacc") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_restoreftpacc"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restorevhosts") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_restorevhosts"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "change_ips_domains") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_change_ips_domains"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "vhostsrebuild") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_vhostsrebuild"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "addzones") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_addzones"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_emails_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_restore_emails_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_email_forward") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_email_forward"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_dns_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_dns_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_dkimkeys_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_dkimkeys_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_webserver_includes_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_webserver_includes_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_passdir_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_passdir_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_httpredir_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_vhostsrebuild"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_siteredir_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_siteredir_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restore_opti_user") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restore_opti_user"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "calcbackupsfordelete") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_calcbackupsfordelete"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "crontab") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_crontab"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "hostaccsetjailhost") !== false) {
writeprocesshuman($log, $lang["child_human_hostaccsetjailhost"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "hostaccsetjailphp") !== false) {
writeprocesshuman($log, $lang["child_human_hostaccsetjailphp"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "hostaccjailoff") !== false) {
writeprocesshuman($log, $lang["child_human_hostaccJaillOffBeforeRestore"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restorebackupFilenoarchbypass") !== false) {
writeprocesshuman($log, $lang["child_human_hostaccRestoreContinue"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "yadisk_getfile") !== false) {
writeprocesshuman($log, $lang["child_human__yandexGetBackup"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "cp ") !== false) {
writeprocesshuman($log, $lang["child_human_log_preparelog2"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoreuser") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoreuser"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoreuser") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoreuser"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "echo dbuser_rest") !== false) {
return 1;
}
if (stripos($string, "echo dbrest") !== false) {
return 1;
}
if (stripos($string, "restoredbuser") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoredbuser"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoredb") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoredbuserdbs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "clearuserdata") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_clearuserdata"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoredb") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoredbuserdbs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoredb") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoredbuserdbs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "restoredb") !== false) {
writeprocesshuman($log, $lang["child_human_logtrans_restoredbuserdbs"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "md5sum") !== false) {
writeprocesshuman($log, $lang["child_human_backup_control_sum"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "logstatback") !== false) {
$res1 = shell_exec($string);
$resFilt = str_replace("logstatback", "", $res1);
if (strlen($resFilt) < 2) {
$resFilt = $lang["child_human_backup_logtrans_ok"];
}
file_put_contents($log, $lang["child_human_backup_logtrans"] . $resFilt . "\n", FILE_APPEND);
return 2;
}
if (stripos($string, "du ") !== false) {
writeprocesshuman($log, $lang["child_human_log_data_backup"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "mkdir -p") !== false) {
writeprocesshuman($log, $lang["child_human_log_preparelog3"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if ((stripos($string, "rsync") !== false || stripos($string, "tar") !== false) && stripos($string, "openssl enc") === false) {
writeprocesshuman($log, $lang["child_human_log_preparelog2"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "data_backup.info") !== false) {
writeprocesshuman($log, $lang["child_human_log_data_backup"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "rm -rf") !== false || stripos($string, "rm -f") !== false || stripos($string, "rm ") !== false || stripos($string, "xargs rm") !== false) {
writeprocesshuman($log, $lang["child_human_log_remove_temp"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "mv ") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_oper"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "chown ") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_oper"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "chmod ") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_oper"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "emailsendcomplete") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_emailsendcomplete"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "completecreatebackup") !== false) {
writeprocesshuman($log, $lang["child_human_log_finish_completecreatebackup"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($type_process, "createbackuphint") !== false) {
if (stripos($string, "dropbox.sh") !== false) {
writeprocesshuman($log, $lang["child_human_log_uptodrop"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "ssh/gdrive") !== false) {
writeprocesshuman($log, $lang["child_human_log_uptogdrive"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "yadisk_putfile") !== false) {
writeprocesshuman($log, $lang["child_human_log_yadisk_putfile"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "lftp -p") !== false) {
writeprocesshuman($log, $lang["child_human_log_ftp"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
}
if (stripos($type_process, "restorebackuphint") !== false) {
if (stripos($string, "dropbox.sh") !== false) {
writeprocesshuman($log, $lang["child_human_log_uptodrop_rest"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "ssh/gdrive") !== false) {
writeprocesshuman($log, $lang["child_human_log_uptogdrive_rest"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "yadisk_putfile") !== false) {
writeprocesshuman($log, $lang["child_human_log_yadisk_putfile_rest"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "lftp -p") !== false) {
writeprocesshuman($log, $lang["child_human_log_ftp_rest"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
}
if (stripos($string, "ssh-keygen") !== false) {
return 1;
}
}
if (stripos($string, "openssl enc") !== false) {
writeprocesshuman($log, $lang["child_human_backup_opensslcrypt"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
$res1 = shell_exec($string);
if (stripos($res1, "bad decrypt") !== false) {
writeprocesshuman($log, $lang["child_human_backup_openssldecryptFailed"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return -2;
}
return 2;
}
if (stripos($string, "ssh-keygen") !== false) {
writeprocesshuman($log, $lang["child_human_backup_prepare"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($string, "sshpass") !== false) {
writeprocesshuman($log, $lang["child_human_backup_prepare"] . $lang["child_human_log_process"], $counter_comm, $totalcomm);
return 1;
}
if (stripos($type_process, "preparedownloadbackup") !== false) {
return 1;
}
return 0;
}
?>