One Time Password Retrieval Tool
false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION] ); } catch (PDOException $failure) { echo "Connection failed: " . $failure->getMessage(); }; require 'CaptchasDotNet.php'; $captchas = new CaptchasDotNet ('demo', 'secret', '/tmp/captchasnet-random-strings','3600', 'abcdefghkmnopqrstuvwxyz','6', '240','80','000088'); if(isset($_GET['key'])) { //Key set in URL $MyKey = preg_replace('/[^a-f0-9]/', '', trim($_GET['key'])); if(($MyKey != '') and (strlen($MyKey) == 32) || (strlen($MyKey) == 64)) { $MyLookup = $pdo->prepare("SELECT password, retrieved_ip, retireved_time FROM pwtool.mypasswd WHERE code = '$MyKey'"); $MyLookup->execute(); $count = $MyLookup->rowCount(); if($count == 1){ $myRow = $MyLookup->fetch(PDO::FETCH_OBJ); $MyIP = $myRow->retrieved_ip; if($MyIP != ''){ $MyTime = $myRow->retireved_time; print '

Error: This key was valid for one-time ' .'use and is no longer valid.

It was already delivered to IP address ' .''.$MyIP.' on '.$MyTime.'. Please contact ' .'support immediately to have your password reset if you feel your key ' .'might have been intercepted.

'; } else { $MyPassword = $myRow->password; $MyIP = $_SERVER['REMOTE_ADDR']; $myUpdate = $pdo->prepare("UPDATE pwtool.mypasswd SET retrieved_ip = '$MyIP',retireved_time = now(),password = '' WHERE code = '$MyKey'"); $myUpdate->execute(); print '

Your password is:

'; if(strlen($MyPassword) > 20){ print '

'.$MyPassword.'

'; } else { print ''.$MyPassword.'

'; } print '

Do not hit reload on your browser. This URL is one-time use and will not show your passsword again.

'; } } else{ print '

Error: You need to supply a valid key.

'; } } else{ print '

Error: You need to supply a valid key.

'; } } else { //Display New password entry form ?>
*/ ?>
Admin Password:
?>
image () ?>
Reload Image Phonetic spelling (mp3)
Buchstabieren (mp3)
Compitare (mp3)
Spellen (mp3)
Epeler (mp3) */ ?>
The CAPTCHA:
New Password: