-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathhelper_code.php
35 lines (30 loc) · 1.06 KB
/
helper_code.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* 代码处理
* code: 12e8df4f68a600f6c1b11638_164952005f9fff2a8efeea3aa6e3d3c6_f68a600f6c1b1163
* User: 姜伟
* Date: 2019/7/9 0009
* Time: 9:08
*/
require_once __DIR__ . '/helper_load.php';
function syhelp_code()
{
echo '显示帮助: /usr/local/php7/bin/php helper_code.php -h' . PHP_EOL;
echo '代码加密: /usr/local/php7/bin/php helper_code.php encrypt -file xxx.php' . PHP_EOL;
echo ' -file:必填 待加密文件或者文件目录,从根目录/开始' . PHP_EOL;
echo '代码解密: /usr/local/php7/bin/php helper_code.php decrypt -file xxx.php' . PHP_EOL;
echo ' -file:必填 待解密文件或者文件目录,从根目录/开始' . PHP_EOL;
}
$phpInfo = include __DIR__ . '/helper_php.php';
$option = SyTool\Tool::getClientOption(1, true);
switch ($option) {
case 'encrypt':
\Helper\CodeTool::generator($phpInfo['dir_screw'], 'encrypt');
break;
case 'decrypt':
\Helper\CodeTool::generator($phpInfo['dir_screw'], 'decrypt');
break;
default:
syhelp_code();
break;
}