main
Robert 2 years ago
parent f49365e9ed
commit 61fdaaf76d
  1. 10
      app/neato.php

@ -33,6 +33,7 @@ require 'OS/neato_' . ucfirst($os['id']) . '.php';
$auto = (in_array('-y', $argv)) ? true : false;
$mark = (in_array('-marksafe', $argv)) ? true : false;
$skipdeploy = (in_array('-skipdeploy', $argv)) ? true : false;
$file = $argv[1];
if (is_string_found($argv[1], 'http://') || is_string_found($argv[1], 'https://')) {
@ -75,6 +76,9 @@ if (file_exists($cwd . '/deploy_' . $file.'.php')) {
}
if (file_exists($cwd . '/deploy_' . $file.'.sum')) {
if ($skipdeploy) {
unlink($cwd . '/deploy_' . $file.'.sum');
} else {
$sum = read_file($cwd . '/deploy_' . $file.'.sum');
if ($shasum === xor_encrypt($sum, $pk)) {
$check_for_harm = false;
@ -83,11 +87,17 @@ if (file_exists($cwd . '/deploy_' . $file.'.php')) {
exit(1);
}
}
}
if ($mark) {
save_sha($shasum);
}
if ($skipdeploy) {
echo "Skipping Deploy php file...";
exit(0);
}
if ($check_for_harm) {
do_harm_checker($shasum);
}

Loading…
Cancel
Save