Make md5sums of index files to be considdered for deletion configurable
This commit is contained in:
@ -12,6 +12,10 @@ const SERVERS=[ //servers and ports we are running on
|
||||
'danwin1210.me'=>['sftp'=>22, 'ftp'=>21, 'pop3'=>'', 'imap'=>'', 'smtp'=>'']
|
||||
];
|
||||
const EMAIL_TO=''; //Send email notifications about new registrations to this address
|
||||
const INDEX_MD5S=[ //MD5 sums of index.hosting.html files that should be considdered as unchanged for deletion
|
||||
'd41d8cd98f00b204e9800998ecf8427e', //empty file
|
||||
'7ae7e9bac6be76f00e0d95347111f037' //default file
|
||||
];
|
||||
|
||||
function get_onion($pkey){
|
||||
$keyData = openssl_pkey_get_details($pkey);
|
||||
|
@ -25,8 +25,7 @@ foreach($all as $tmp){
|
||||
}
|
||||
//check www empty or index unmodified
|
||||
if(count(scandir("/home/$tmp/www/"))===3){
|
||||
$md5s=['2ff89413bebfd03f9241b0254ebfd782','d41d8cd98f00b204e9800998ecf8427e', '7ae7e9bac6be76f00e0d95347111f037'];
|
||||
if(!file_exists("/home/$tmp/www/index.hosting.html") || !in_array(md5_file("/home/$tmp/www/index.hosting.html"), $md5s)){
|
||||
if(!file_exists("/home/$tmp/www/index.hosting.html") || !in_array(md5_file("/home/$tmp/www/index.hosting.html"), INDEX_MD5S)){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user