Files
oc-server3/htdocs/doc/sql/static-data/pwlist.php
T
2013-03-24 20:06:09 +01:00

32 lines
712 B
PHP

<?php
/***************************************************************************
* For license information see doc/license.txt
*
* Unicode Reminder メモ
*
* Read anti-cracking password list into database
***************************************************************************/
$opt['rootpath'] = '../../../';
require($opt['rootpath'] . 'lib2/web.inc.php');
$pwf = @fopen('pw_dict', 'r');
if ($pwf)
{
// sql("TRUNCATE TABLE `pw_dict`");
$n = 0;
while (!feof($pwf))
{
$pw = fgets($pwf);
sql("INSERT IGNORE INTO `pw_dict` (`pw`) VALUES ('&1')", trim($pw));
++$n;
}
fclose($pwf);
echo "inserted " . $n . " passwords\n";
}
else
echo "could not open pw_dict\n";
?>