1
0
Fork 0
mirror of synced 2024-10-04 04:06:16 +13:00

load password dictionary as array

This commit is contained in:
Damodar Lohani 2022-12-26 10:22:38 +00:00
parent f03035451f
commit 5649bc8060

View file

@ -606,7 +606,10 @@ $register->set('geodb', function () {
return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2022-06.mmdb'); return new Reader(__DIR__ . '/assets/dbip/dbip-country-lite-2022-06.mmdb');
}); });
$register->set('passwordsDictionary', function () { $register->set('passwordsDictionary', function () {
return \file_get_contents(__DIR__ . '/assets/security/10k-common-passwords'); $content = \file_get_contents(__DIR__ . '/assets/security/10k-common-passwords');
$content = explode('\n', $content);
$content = array_flip($content);
return $content;
}); });
$register->set('db', function () { $register->set('db', function () {
// This is usually for our workers or CLI commands scope // This is usually for our workers or CLI commands scope