mirror of
https://github.com/pi-hole/web.git
synced 2025-12-23 12:18:26 +00:00
28 lines
431 B
PHP
28 lines
431 B
PHP
<html><body>
|
|
<?php
|
|
require "auth.php";
|
|
require "password.php";
|
|
check_cors();
|
|
|
|
if($auth)
|
|
{
|
|
if(strlen($pwhash) > 0)
|
|
{
|
|
require_once("../../vendor/qrcode.php");
|
|
$qr = QRCode::getMinimumQRCode($pwhash, QR_ERROR_CORRECT_LEVEL_Q);
|
|
$qr->printHTML("10px");
|
|
echo "<br>Raw API Token: <code>" . $pwhash . "</code>";
|
|
}
|
|
else
|
|
{
|
|
?><p>No password set<?php
|
|
}
|
|
}
|
|
else
|
|
{
|
|
?><p>Not authorized!</p><?php
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|