blob: fb224e58b5b68ed8c4288e813978086592bfc954 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/php
#does anyone use this?
<?php
print('$ttl 600'."\n");
chdir('../db/dom/ano');
$names = scandir('./');
foreach ($names as $name) {
if (!file_exists($name.'/ns/')) continue;
$servers = scandir($name.'/ns/');
foreach ($servers as $server) {
if ($server[0] == '.') continue;
if (substr($name, -4) == ".ano") $name .= ".";
$fqserver = $server;
if (substr($server, -4) == ".ano") $fqserver .= ".";
print($name.' IN NS '.$fqserver."\n");
$ips = file($name.'/ns/'.$server, FILE_IGNORE_NEW_LINES |
FILE_SKIP_EMPTY_LINES);
foreach ($ips as $ip) {
print($fqserver.' IN A '.$ip."\n");
}
}
}
?>
|