/**
* 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
try {
$db = \Cdb\Writer::open( $outfile );
- $alreadyWritten = array();
+ $alreadyWritten = [];
$skipped = 0;
for ( $i = 0; ( $i - $skipped ) < $limit; $i++ ) {
if ( feof( $file ) ) {
} catch ( \Cdb\Exception $e ) {
$this->error( "Error writing cdb file: " . $e->getMessage(), 2 );
}
-
}
}