<?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'); ?>
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
php53 | Folder | 0755 |
|
|
php56 | Folder | 0755 |
|
|
php71 | Folder | 0755 |
|
|
php81 | Folder | 0755 |
|
|
php82 | Folder | 0755 |
|
|
changelog.txt | File | 10.24 KB | 0644 |
|
clone.php | File | 5.43 KB | 0644 |
|
edit.php | File | 7.09 KB | 0644 |
|
edit.xml | File | 433 B | 0644 |
|
extend.php | File | 8.78 KB | 0644 |
|
fileindex.php | File | 101 B | 0644 |
|
import.php | File | 3.29 KB | 0644 |
|
info.xml | File | 3.09 KB | 0644 |
|
install.js | File | 1.02 KB | 0644 |
|
install.php | File | 10.61 KB | 0644 |
|
install.xml | File | 27.94 KB | 0644 |
|
md5 | File | 1.22 KB | 0644 |
|
notes.txt | File | 1.14 KB | 0644 |
|
robots.txt | File | 118 B | 0644 |
|
update_pass.php | File | 497 B | 0644 |
|
upgrade.php | File | 60.23 KB | 0644 |
|
upgrade.xml | File | 990 B | 0644 |
|
write_htpass.php | File | 615 B | 0644 |
|