X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateCommonPasswordCdb.php;h=e77113ac01d1984689038a8c18d65679f5499a29;hb=9ad43405cf1d6e13375aeff460b92f400f0ab502;hp=388ad8a711f45e9fd5482f7dc52bc13472fa2ef6;hpb=52546163af81a588f3104d447657f24d071aa53f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createCommonPasswordCdb.php b/maintenance/createCommonPasswordCdb.php index 388ad8a711..e77113ac01 100644 --- a/maintenance/createCommonPasswordCdb.php +++ b/maintenance/createCommonPasswordCdb.php @@ -26,9 +26,11 @@ require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to create common password cdb database. * - * Meant to take a file like - * https://github.com/danielmiessler/SecLists/blob/master/Passwords/rockyou.txt?raw=true - * as input. + * Meant to take a file like those from + * https://github.com/danielmiessler/SecLists + * For example: + * https://github.com/danielmiessler/SecLists/blob/fe2b40dd84/Passwords/rockyou.txt?raw=true + * * @see serialized/commonpasswords.cdb and PasswordPolicyChecks::checkPopularPasswordBlacklist * @since 1.27 * @ingroup Maintenance @@ -58,12 +60,12 @@ class GenerateCommonPassword extends Maintenance { $outfile = $this->getArg( 1 ); if ( !is_readable( $infile ) && $infile !== 'php://stdin' ) { - $this->error( "Cannot open input file $infile for reading", 1 ); + $this->fatalError( "Cannot open input file $infile for reading" ); } $file = fopen( $infile, 'r' ); if ( $file === false ) { - $this->error( "Cannot read input file $infile", 1 ); + $this->fatalError( "Cannot read input file $infile" ); } try { @@ -107,7 +109,7 @@ class GenerateCommonPassword extends Maintenance { " (out of $i) passwords to $outfile\n" ); } catch ( \Cdb\Exception $e ) { - $this->error( "Error writing cdb file: " . $e->getMessage(), 2 ); + $this->fatalError( "Error writing cdb file: " . $e->getMessage(), 2 ); } } }