ÿØÿà JFIF ` ` ÿþ
|
Server : Apache System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64 User : farolpborg ( 1053) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /var/softaculous/litecart/ |
Upload File : |
<?php
$username = '[[admin_username]]';
$enc_password = '[[encrypted_pass]]';
$htpasswd_file = '[[softpath]]/[[admin_folder]]/.htpasswd';
$htpasswd = file_get_contents($htpasswd_file);
if(preg_match('#(?<=^|\r\n|\r|\n)\#*('. preg_quote($username, '#') .'):.*?#', $htpasswd)){
$htpasswd = preg_replace('#(?<=^|\r\n|\r|\n)(\#*'. preg_quote($username, '#') .'):[^\r|\n]+(\r\n?|\n)*#', '$1:{SHA}'. $enc_password . PHP_EOL, $htpasswd);
echo '<htpasswd>'.$htpasswd.'</htpasswd>';
}
if(is_writable($htpasswd_file)){
$htpasswd = file_put_contents($htpasswd_file, $htpasswd);
}
@unlink('write_htpass.php');
?>