Improved debugging, improved whois query

pull/1/head
root 17 years ago
parent 6d85fdb891
commit 12beea299b

@ -238,6 +238,8 @@
if(strlen($pwd) > 30)
$points++;
//echo "Points due to length: $points<br/>";
if(preg_match("/\d/", $pwd))
$points++;
@ -253,6 +255,8 @@
if(preg_match("/\s/", $pwd))
$points++;
//echo "Points due to length and charset: $points<br/>";
if(@strstr(strtolower($pwd), strtolower($email)))
$points--;
@ -287,10 +291,14 @@
if(@strstr(strtolower($suffix), strtolower($pwd)))
$points--;
//echo "Points due to name matches: $points<br/>";
$do = `grep '$pwd' /usr/share/dict/american-english`;
if($do)
$points--;
//echo "Points due to wordlist: $points<br/>";
return($points);
}
@ -612,13 +620,15 @@
{
list($username,$domain)=split('@',$email);
$dom = escapeshellarg($domain);
$line = trim(`dig +short MX '$dom' 2>&1`);
$line = trim(`dig +short MX $dom 2>&1`);
#echo $email."-$dom-$line-\n";
#echo `dig +short mx heise.de 2>&1`."-<br>\n";
$list = explode("\n", $line);
foreach($list as $row)
list($pri, $mxhosts[]) = explode(" ", substr(trim($row), 0, -1));
$mxhosts[] = $domain;
//echo $email."<br>\n";
//print_r($mxhosts); die;
#print_r($mxhosts); die;
foreach($mxhosts as $key => $domain)
{
$fp = @fsockopen($domain,25,$errno,$errstr,5);
@ -688,7 +698,7 @@
if(mysql_num_rows($res) > 0)
printf(_("Your certificate request is still queued and hasn't been processed yet. Please wait, and go to Certificates -> View to see it's status."));
else
printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." certid:$certid", "<a href='http://wiki.cacert.org/wiki/FAQ/CertificateRenewal'>", "</a>");
printf(_("Your certificate request has failed to be processed correctly, see %sthe WIKI page%s for reasons and solutions.")." certid:$table:$certid", "<a href='http://wiki.cacert.org/wiki/FAQ/CertificateRenewal'>", "</a>");
showfooter();
exit;
}

Loading…
Cancel
Save