mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-01-20 10:52:15 +01:00
Added
This commit is contained in:
parent
201a89bc5e
commit
d16ec2df8d
40
ykval-export.php
Executable file
40
ykval-export.php
Executable file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
require_once 'ykval-db.php';
|
||||
require_once 'ykval-config.php';
|
||||
|
||||
|
||||
$logname="ykval-export";
|
||||
$myLog = new Log($logname);
|
||||
|
||||
$db=new Db($baseParams['__YKVAL_DB_DSN__'],
|
||||
$baseParams['__YKVAL_DB_USER__'],
|
||||
$baseParams['__YKVAL_DB_PW__'],
|
||||
$baseParams['__YKVAL_DB_OPTIONS__'],
|
||||
$logname . ':db');
|
||||
|
||||
if (!$db->connect()) {
|
||||
$myLog->log(LOG_WARNING, "Could not connect to database");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$result=$db->customQuery("SELECT active, created, modified, yk_publicname, yk_counter, yk_use, yk_low, yk_high, nonce, notes FROM yubikeys");
|
||||
while($row = $result->fetch(PDO::FETCH_ASSOC)){
|
||||
echo $row['active'] .
|
||||
"\t" . $row['created'] .
|
||||
"\t" . $row['modified'] .
|
||||
"\t" . $row['yk_publicname'] .
|
||||
"\t" . $row['yk_counter'] .
|
||||
"\t" . $row['yk_use'] .
|
||||
"\t" . $row['yk_low'] .
|
||||
"\t" . $row['yk_high'] .
|
||||
"\t" . $row['nonce'] .
|
||||
"\t" . $row['notes'] .
|
||||
"\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user