|
|
|
@ -49,7 +49,7 @@ if (is_string_found($argv[1], 'http://') || is_string_found($argv[1], 'https://' |
|
|
|
|
|
|
|
|
|
|
|
function save_sha($shasum) { |
|
|
|
function save_sha($shasum) { |
|
|
|
$xor = xor_encrypt($shasum, $GLOBALS['pk']); |
|
|
|
$xor = xor_encrypt($shasum, $GLOBALS['pk']); |
|
|
|
file_put_contents($GLOBALS['cwd'] . '/deploy_' . $GLOBALS['file'].'.sum', $xor); |
|
|
|
file_put_contents($GLOBALS['cwd'] . '/sums/deploy_' . $GLOBALS['file'].'.sum', $xor); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function do_harm_checker($shasum) { |
|
|
|
function do_harm_checker($shasum) { |
|
|
|
@ -75,11 +75,11 @@ if (file_exists($cwd . '/deploy_' . $file.'.php')) { |
|
|
|
exit(1); |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (file_exists($cwd . '/deploy_' . $file.'.sum')) { |
|
|
|
if (file_exists($cwd . '/sums/deploy_' . $file.'.sum')) { |
|
|
|
if ($skipdeploy) { |
|
|
|
if ($skipdeploy) { |
|
|
|
unlink($cwd . '/deploy_' . $file.'.sum'); |
|
|
|
unlink($cwd . '/sums/deploy_' . $file.'.sum'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$sum = read_file($cwd . '/deploy_' . $file.'.sum'); |
|
|
|
$sum = read_file($cwd . '/sums/deploy_' . $file.'.sum'); |
|
|
|
if ($shasum === xor_encrypt($sum, $pk)) { |
|
|
|
if ($shasum === xor_encrypt($sum, $pk)) { |
|
|
|
$check_for_harm = false; |
|
|
|
$check_for_harm = false; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|