代码拉取完成,页面将自动刷新
同步操作将从 端木凌风/tonyenc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
/**
* tonyenc.php: Encrypt or decrypt the script with tonyenc.
*
* A high performance and cross-platform encrypt extension for PHP source code.
*
* @author: Tony
* @site: lihancong.cn
* @github: github.com/lihancong/tonyenc
*/
if (version_compare(PHP_VERSION, 7, '<'))
die("PHP must later than version 7.0\n");
if (php_sapi_name() !== 'cli')
die("Must run in cli mode\n");
if (!extension_loaded('tonyenc'))
die("The extension: 'tonyenc' not loaded\n");
if ($argc <= 1)
die("\nusage: php tonyenc.php file.php ... encrypt the php file(s) or directory(s)\n\n");
array_shift($argv);
foreach ($argv as $fileName) {
if (is_file($fileName)) {
handle($fileName);
} elseif (is_dir($fileName)) {
$DirectoriesIt = new RecursiveDirectoryIterator($fileName, FilesystemIterator::SKIP_DOTS);
$AllIt = new RecursiveIteratorIterator($DirectoriesIt);
$it = new RegexIterator($AllIt, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);
foreach ($it as $v)
handle($v[0]);
} else {
echo "Unknowing file: '$fileName'\n";
}
}
function handle($file)
{
if ($fp = fopen($file, 'rb+') and $fileSize = filesize($file)) {
$data = tonyenc_encode(fread($fp, $fileSize));
if ($data !== false) {
if (file_put_contents($file, '') !== false) {
rewind($fp);
fwrite($fp, $data);
}
}
fclose($fp);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。