Viewing file: ei-set-password.php (926 B) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/local/php7/bin/php <?php error_reporting(-1);
function usage() { return "\n" . $GLOBALS['argv'][0] . " [script_name] [script_installation_path] [template_name] \t - script_name --> " . implode(', ', $GLOBALS['supported_scripts']); }
require_once('ei-tools.php');
if (empty($argv[1])) err('Missing script name'); if (empty($argv[2])) err('Missing installation path'); if (empty($argv[3])) err('New password not provided');
$script = strtolower($argv[1]); $path = $argv[2]; $password = $argv[3];
if (!is_dir($path) || !file_exists($path)) err('Invalid installation path');
script_supported($script);
$config_file = script_config_file($script, $path);
if (!file_exists($config_file)) err('Missing ' . $script . ' config file [' . $config_file . ']');
// get script details $details = get_script_config($script, $config_file);
// set script password set_script_password($script, $password, $details);
echo 1;
|