Rename inject files to files_admin

This commit is contained in:
Martyn Alberts
2019-02-13 17:09:13 +01:00
parent d3c0f36c1b
commit d761329e40
6 changed files with 23 additions and 30 deletions

20
files_admin/deencode.php Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env php
<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
include "/etc/kopano/webapp/config-files.php";
if ( $argv[1] == 'encode' ) {
$value = openssl_encrypt($argv[2], "des-ede3-cbc", FILES_PASSWORD_KEY, 0, FILES_PASSWORD_IV);
}
elseif ( $argv[1] == 'decode' ) {
$value = openssl_decrypt($argv[2], "des-ede3-cbc", FILES_PASSWORD_KEY, 0, FILES_PASSWORD_IV);
}
else {
print "No valid options provided usage php dencode.php encode/decode string\n";
}
if ( ! empty($value) ) {
print $value;
}
?>