v.2.27
Fixed reports
This commit is contained in:
39
commands/GETKeyInfo.php
Normal file
39
commands/GETKeyInfo.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Commands;
|
||||
|
||||
use App\Component\Models\Cache;
|
||||
use App\Console\Commands\HRCEncryptor;
|
||||
use App\Console\Commands\HRCCommand;
|
||||
use App\Console\Commands\HRCCommandInterface;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class GETKeyInfo extends HRCCommand implements HRCCommandInterface
|
||||
{
|
||||
protected $signature = 'getkeyinfo';
|
||||
|
||||
public function command($input, $output = null)
|
||||
{
|
||||
$cache = Cache::get(245817422, 'v1', $input);
|
||||
if ($cache) {
|
||||
return [
|
||||
'status' => 'success',
|
||||
'info' => $cache,
|
||||
'input' => $input
|
||||
];
|
||||
}
|
||||
$info_file = __DIR__ . "\\..\\..\\..\\info.ini";
|
||||
$key_file = __DIR__ . "\\..\\..\\..\\Key.key";
|
||||
$unn = parse_ini_file($info_file);
|
||||
$unn = intval($unn['unn']);
|
||||
$info = json_decode(HRCEncryptor::decrypt(file_get_contents($key_file), $unn), true);
|
||||
if (!$cache) {
|
||||
$cache = Cache::store(245817422, 'v1', $input, $info);
|
||||
}
|
||||
return [
|
||||
'status' => 'success',
|
||||
'info' => $cache,
|
||||
'input' => $input
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user