88 * License: GNU/GPLv2
99 * @see LICENSE.txt
1010 *
11- * This file: CLI handler (last modified: 2023.09.19 ).
11+ * This file: CLI handler (last modified: 2023.09.25 ).
1212 */
1313
1414namespace phpMussel \CLI ;
@@ -74,7 +74,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
7474 "\r%d/%d %s ... " ,
7575 $ this ->Loader ->InstanceCache ['ThisScanDone ' ],
7676 $ this ->Loader ->InstanceCache ['ThisScanTotal ' ],
77- $ this ->Loader ->L10N ->getString ('scan_complete ' )
77+ $ this ->Loader ->L10N ->getString ('response.Complete ' )
7878 );
7979 return true ;
8080 });
@@ -206,7 +206,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
206206 /** Convert a hexadecimal to a binary string. */
207207 elseif ($ Command === 'hex_decode ' ) {
208208 $ 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" ;
210210 }
211211
212212 /** Convert a binary string to a base64 string. */
@@ -218,7 +218,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca
218218 /** Convert a base64 string to a binary string. */
219219 elseif ($ Command === 'base64_decode ' ) {
220220 $ 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" ;
222222 }
223223
224224 /** Scan a file or directory. */
@@ -273,7 +273,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
273273 [$ Command , $ Params ] = explode (' ' , $ Command );
274274 if (is_dir ($ Params )) {
275275 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" ;
277277 }
278278 $ Decal = [':-) - (-: ' , ':-) \\ (-: ' , ':-) | (-: ' , ':-) / (-: ' ];
279279 $ Frame = 0 ;
@@ -400,7 +400,7 @@ private function coexFile(string $Clean): string
400400 $ Data = $ this ->Loader ->readFileContent ($ Params );
401401 }
402402 if (empty ($ Data )) {
403- return $ this ->Loader ->L10N ->getString ('invalid_data ' ) . "\n" ;
403+ return $ this ->Loader ->L10N ->getString ('response.Invalid data ' ) . "\n" ;
404404 }
405405 return sprintf (
406406 "\$sha256:%s; \$StringLength:%d;%s \n" ,
@@ -427,7 +427,7 @@ private function hashFile(string $Clean): string
427427 $ Data = $ this ->Loader ->readFileContent ($ Params );
428428 }
429429 if (empty ($ Data )) {
430- return $ this ->Loader ->L10N ->getString ('invalid_data ' ) . "\n" ;
430+ return $ this ->Loader ->L10N ->getString ('response.Invalid data ' ) . "\n" ;
431431 }
432432 return hash ($ this ->LastAlgo , $ Data ) . ': ' . strlen ($ Data ) . ': ' . $ this ->Loader ->L10N ->getString ('cli_signature_placeholder ' ) . "\n" ;
433433 });
0 commit comments