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

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

Loading…
Cancel
Save