8
8
* License: GNU/GPLv2
9
9
* @see LICENSE.txt
10
10
*
11
- * This file: CLI handler (last modified: 2023.09.19 ).
11
+ * This file: CLI handler (last modified: 2023.09.25 ).
12
12
*/
13
13
14
14
namespace phpMussel \CLI ;
@@ -74,7 +74,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
74
74
"\r%d/%d %s ... " ,
75
75
$ this ->Loader ->InstanceCache ['ThisScanDone ' ],
76
76
$ this ->Loader ->InstanceCache ['ThisScanTotal ' ],
77
- $ this ->Loader ->L10N ->getString ('scan_complete ' )
77
+ $ this ->Loader ->L10N ->getString ('response.Complete ' )
78
78
);
79
79
return true ;
80
80
});
@@ -206,7 +206,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
206
206
/** Convert a hexadecimal to a binary string. */
207
207
elseif ($ Command === 'hex_decode ' ) {
208
208
$ TargetData = substr ($ Clean , strlen ($ Command ) + 1 );
209
- echo "\n" . ($ this ->Loader ->hexSafe ($ TargetData ) ?: $ this ->Loader ->L10N ->getString ('invalid_data ' )) . "\n" ;
209
+ echo "\n" . ($ this ->Loader ->hexSafe ($ TargetData ) ?: $ this ->Loader ->L10N ->getString ('response.Invalid data ' )) . "\n" ;
210
210
}
211
211
212
212
/** Convert a binary string to a base64 string. */
@@ -218,7 +218,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
218
218
/** Convert a base64 string to a binary string. */
219
219
elseif ($ Command === 'base64_decode ' ) {
220
220
$ TargetData = substr ($ Clean , strlen ($ Command ) + 1 );
221
- echo "\n" . (base64_decode ($ TargetData ) ?: $ this ->Loader ->L10N ->getString ('invalid_data ' )) . "\n" ;
221
+ echo "\n" . (base64_decode ($ TargetData ) ?: $ this ->Loader ->L10N ->getString ('response.Invalid data ' )) . "\n" ;
222
222
}
223
223
224
224
/** Scan a file or directory. */
@@ -273,7 +273,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
273
273
[$ Command , $ Params ] = explode (' ' , $ Command );
274
274
if (is_dir ($ Params )) {
275
275
if (!is_readable ($ Params )) {
276
- return sprintf ($ this ->Loader ->L10N ->getString ('Failed to access %s ' ), $ Params ) . "\n" ;
276
+ return sprintf ($ this ->Loader ->L10N ->getString ('response. Failed to access %s ' ), $ Params ) . "\n" ;
277
277
}
278
278
$ Decal = [':-) - (-: ' , ':-) \\ (-: ' , ':-) | (-: ' , ':-) / (-: ' ];
279
279
$ Frame = 0 ;
@@ -400,7 +400,7 @@ private function coexFile(string $Clean): string
400
400
$ Data = $ this ->Loader ->readFileContent ($ Params );
401
401
}
402
402
if (empty ($ Data )) {
403
- return $ this ->Loader ->L10N ->getString ('invalid_data ' ) . "\n" ;
403
+ return $ this ->Loader ->L10N ->getString ('response.Invalid data ' ) . "\n" ;
404
404
}
405
405
return sprintf (
406
406
"\$sha256:%s; \$StringLength:%d;%s \n" ,
@@ -427,7 +427,7 @@ private function hashFile(string $Clean): string
427
427
$ Data = $ this ->Loader ->readFileContent ($ Params );
428
428
}
429
429
if (empty ($ Data )) {
430
- return $ this ->Loader ->L10N ->getString ('invalid_data ' ) . "\n" ;
430
+ return $ this ->Loader ->L10N ->getString ('response.Invalid data ' ) . "\n" ;
431
431
}
432
432
return hash ($ this ->LastAlgo , $ Data ) . ': ' . strlen ($ Data ) . ': ' . $ this ->Loader ->L10N ->getString ('cli_signature_placeholder ' ) . "\n" ;
433
433
});
0 commit comments