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.186
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 /
time /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
1.56
KB
-rw-r--r--
acl_security.pl
687
B
-rwxr-xr-x
apply.cgi
2.93
KB
-rwxr-xr-x
backup_config.pl
775
B
-rwxr-xr-x
config-ALL-linux
94
B
-rw-r--r--
config-freebsd
95
B
-rw-r--r--
config-hpux
76
B
-rw-r--r--
config-irix
76
B
-rw-r--r--
config-macos
76
B
-rw-r--r--
config-netbsd
76
B
-rw-r--r--
config-openserver
76
B
-rw-r--r--
config-redhat-linux
117
B
-rw-r--r--
config-solaris
95
B
-rw-r--r--
config.info
537
B
-rw-r--r--
config.info.ca
611
B
-rw-r--r--
config.info.cs
587
B
-rw-r--r--
config.info.de
566
B
-rw-r--r--
config.info.es
611
B
-rw-r--r--
config.info.fa
776
B
-rw-r--r--
config.info.fr
634
B
-rw-r--r--
config.info.hr
0
B
-rw-r--r--
config.info.hu
594
B
-rw-r--r--
config.info.it
615
B
-rw-r--r--
config.info.ja
278
B
-rw-r--r--
config.info.ko
577
B
-rw-r--r--
config.info.ms
572
B
-rw-r--r--
config.info.nl
549
B
-rw-r--r--
config.info.no
560
B
-rw-r--r--
config.info.pl
590
B
-rw-r--r--
config.info.pt_BR
647
B
-rw-r--r--
config.info.ru
923
B
-rw-r--r--
config.info.sk
583
B
-rw-r--r--
config.info.sv
179
B
-rw-r--r--
config.info.tr
428
B
-rw-r--r--
config.info.uk
473
B
-rw-r--r--
config.info.zh
96
B
-rw-r--r--
config.info.zh_TW
224
B
-rw-r--r--
defaultacl
47
B
-rw-r--r--
freebsd-lib.pl
1.29
KB
-rwxr-xr-x
index.cgi
7.62
KB
-rwxr-xr-x
linux-lib.pl
2.02
KB
-rwxr-xr-x
log_parser.pl
936
B
-rwxr-xr-x
module.info
228
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
117
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
152
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
188
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
185
B
-rw-r--r--
module.info.ca
133
B
-rw-r--r--
module.info.ca.auto
14
B
-rw-r--r--
module.info.cs
25
B
-rw-r--r--
module.info.cs.auto
100
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
112
B
-rw-r--r--
module.info.de
116
B
-rw-r--r--
module.info.de.auto
13
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
243
B
-rw-r--r--
module.info.es
25
B
-rw-r--r--
module.info.es.auto
115
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
125
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
177
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
135
B
-rw-r--r--
module.info.fr
23
B
-rw-r--r--
module.info.fr.auto
123
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
142
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
135
B
-rw-r--r--
module.info.hu
35
B
-rw-r--r--
module.info.hu.auto
122
B
-rw-r--r--
module.info.it
23
B
-rw-r--r--
module.info.it.auto
97
B
-rw-r--r--
module.info.ja
27
B
-rw-r--r--
module.info.ja.auto
145
B
-rw-r--r--
module.info.ko
25
B
-rw-r--r--
module.info.ko.auto
118
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
143
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
122
B
-rw-r--r--
module.info.ms
117
B
-rw-r--r--
module.info.ms.auto
13
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
134
B
-rw-r--r--
module.info.nl
21
B
-rw-r--r--
module.info.nl.auto
94
B
-rw-r--r--
module.info.no
19
B
-rw-r--r--
module.info.no.auto
93
B
-rw-r--r--
module.info.pl
100
B
-rw-r--r--
module.info.pl.auto
13
B
-rw-r--r--
module.info.pt
25
B
-rw-r--r--
module.info.pt.auto
105
B
-rw-r--r--
module.info.pt_BR
0
B
-rw-r--r--
module.info.pt_BR.auto
138
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
130
B
-rw-r--r--
module.info.ru
38
B
-rw-r--r--
module.info.ru.auto
162
B
-rw-r--r--
module.info.sk
25
B
-rw-r--r--
module.info.sk.auto
104
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
125
B
-rw-r--r--
module.info.sv
18
B
-rw-r--r--
module.info.sv.auto
106
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
250
B
-rw-r--r--
module.info.tr
23
B
-rw-r--r--
module.info.tr.auto
107
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
180
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
180
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
168
B
-rw-r--r--
module.info.zh
91
B
-rw-r--r--
module.info.zh_TW
24
B
-rw-r--r--
module.info.zh_TW.auto
91
B
-rw-r--r--
postinstall.pl
674
B
-rwxr-xr-x
rbac-mapping
73
B
-rw-r--r--
save_timezone.cgi
359
B
-rwxr-xr-x
solaris-lib.pl
1.39
KB
-rwxr-xr-x
time-lib.pl
7.17
KB
-rwxr-xr-x
time.js
785
B
-rw-r--r--
uninstall.pl
330
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : time-lib.pl
#!/usr/bin/perl use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); our %access = &get_module_acl(); our ($module_config_directory, $module_name, %text, %config, %gconfig); our ($timezones_file, $currentzone_link, $currentzone_file, $timezones_dir, $sysclock_file); our ($get_hardware_time_error); our $cron_cmd = "$module_config_directory/sync.pl"; if ($config{'zone_style'}) { do "$config{'zone_style'}-lib.pl"; } &foreign_require("webmincron"); sub find_cron_job { &foreign_require("cron", "cron-lib.pl"); my @jobs = &cron::list_cron_jobs(); my ($job) = grep { $_->{'command'} && $_->{'user'} && $_->{'command'} eq $cron_cmd && $_->{'user'} eq 'root' } @jobs; return $job; } sub find_webmin_cron_job { return &webmincron::find_webmin_cron($module_name, 'sync_time_cron'); } # sync_time(server, hardware-too) # Syncs the system and maybe hardware time with some server. Returns undef # on success, or an error message on failure. sub sync_time { my ($server, $hwtoo) = @_; my @servs = split(/\s+/, $server); my $servs = join(" ", map { quotemeta($_) } @servs); my $out; if (&has_command("ntpdate")) { $out = &backquote_logged("ntpdate -u $servs 2>&1"); } elsif (&has_command("sntp")) { $out = &backquote_logged("sntp -s $servs 2>&1"); } elsif (&has_command("chronyc")) { $out = &backquote_logged("systemctl restart chronyd 2>&1"); $out .= &backquote_logged("chronyc makestep 2>&1"); sleep 5; } else { $out = "Missing ntpdate and sntp commands"; $? = 1; } if ($? && $config{'ntp_only'}) { # error using ntp, but nothing else is allowed return &text('error_entp', "$out"); } elsif ($?) { # error using ntp. use timeservice my ($err, $serv); my $rawtime; foreach $serv (@servs) { $err = undef; my $fh = "SOCK"; &open_socket($serv, 37, $fh, \$err); read($fh, $rawtime, 4); close($fh); last if (!$err && $rawtime); } return $err if ($err); # Got a time .. set it $rawtime = unpack("N", $rawtime); $rawtime -= (17 * 366 + 53 * 365) * 24 * 60 * 60; my $diff = abs(time() - $rawtime); if ($diff > 365*24*60*60) { # Too big! return &text('error_ediff', int($diff/(24*60*60))); } my @tm = localtime($rawtime); &set_system_time(@tm); } if ($hwtoo) { # Set hardware clock time to match system time (which is now correct) my $flags = &get_hwclock_flags(); my $out = &backquote_logged("hwclock $flags --systohc"); return $? ? $out : undef; } return undef; } # sync_time_cron() # Called from webmin cron to sync from the configured server sub sync_time_cron { my $err = &sync_time($config{'timeserver'}, $config{'timeserver_hardware'}); print STDERR $err if ($err); } sub has_timezone { return 0 if (!defined(&list_timezones)); if (defined(&os_has_timezones)) { return &os_has_timezones(); } else { my @zones = &list_timezones(); return @zones ? 1 : 0; } } # find_same_zone(file) # Finds an identical timezone file to the one specified sub find_same_zone { my @st = stat(&translate_filename($_[0])); my $z; foreach $z (&list_timezones()) { my $zf = &translate_filename("$timezones_dir/$z->[0]"); my @zst = stat($zf); if ($zst[7] == $st[7]) { my $ex = system("diff ".&translate_filename($currentzone_link)." $zf >/dev/null 2>&1"); if (!$ex) { return $z->[0]; } } } return undef; } # get_hwclock_flags() # Returns command-line flags for hwclock sub get_hwclock_flags { if ($config{'hwclock_flags'} && $config{'hwclock_flags'} eq "sysconfig") { my %clock; &read_env_file("/etc/sysconfig/clock", \%clock); return $clock{'CLOCKFLAGS'}; } else { return $config{'hwclock_flags'}; } } # get_hardware_time() # Returns the current hardware time, in localtime format. On failure returns # an empty array, and sets the global $get_hardware_time_error sub get_hardware_time { my $flags = &get_hwclock_flags(); $flags ||= ""; $get_hardware_time_error = undef; &clean_language(); my $out = &backquote_command("hwclock $flags 2>/dev/null"); &reset_environment(); if ($out =~ /^(\S+)\s+(\S+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(\d+)\s+/) { return ($6, $5, $4, $3, &month_to_number($2), $7-1900, &weekday_to_number($1)); } elsif ($out =~ /^(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\d+):(\d+):(\d+)\s+(am|pm)\s+/i) { return ($7, $6, $5+($8 eq 'pm' ? 12 : 0), $2, &month_to_number($3), $4-1900, &weekday_to_number($1)); } elsif ($out =~ /^(\d+)\-(\d+)\-(\d+)\s+(\d+):(\d+):(\d+)/) { # Format like 2016-06-10 22:58:17.999536+3:00 return ($6, $5, $4, $3, $2-1, $1-1900); } else { $get_hardware_time_error = &text('index_ehwclock', "<tt>".&html_escape("hwclock $flags")."</tt>", "<pre>".&html_escape($out)."</pre>"); return ( ); } } # get_system_time() # Returns the current time, in localtime format sub get_system_time { return localtime(time()); } # set_hardware_time(secs, mins, hours, day, month, year) sub set_hardware_time { my ($second, $minute, $hour, $date, $month, $year) = @_; $month++; $year += 1900; my $format = "--set --date=". quotemeta("$month/$date/$year $hour:$minute:$second"); my $flags = &get_hwclock_flags(); my $out = &backquote_logged("hwclock $flags $format 2>&1"); return $? ? $out : undef; } # set_system_time(secs, mins, hours, day, month, year) sub set_system_time { my ($second, $minute, $hour, $date, $month, $year) = @_; $second = &zeropad($second, 2); $minute = &zeropad($minute, 2); $hour = &zeropad($hour, 2); $date = &zeropad($date, 2); $month = &zeropad($month+1, 2); $year = &zeropad($year+1900, 4); my $format; if ($config{'seconds'} == 2) { $format = $year.$month.$date.$hour.$minute.".".$second; } elsif ($config{'seconds'} == 1) { $format = $month.$date.$hour.$minute.$year.".".$second; } else { $format = $month.$date.$hour.$minute.substr($year, -2); } my $out = &backquote_logged("echo yes | date ".quotemeta($format)." 2>&1"); if ($gconfig{'os_type'} eq 'freebsd' || $gconfig{'os_type'} eq 'netbsd') { return int($?/256) == 1 ? $out : undef; } else { return $? ? $out : undef; } } sub zeropad { my ($str, $len) = @_; while(length($str) < $len) { $str = "0".$str; } return $str; } our @weekday_names = ( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ); # weekday_to_number(day) # Converts a day like Mon to a number like 1 sub weekday_to_number { for(my $i=0; $i<@weekday_names; $i++) { return $i if (lc(substr($weekday_names[$i], 0, 3)) eq lc($_[0])); } return undef; } sub number_to_weekday { return defined($_[0]) ? ucfirst($weekday_names[$_[0]]) : undef; } # Returns 1 if this system supports setting the hardware clock. sub support_hwtime { return &has_command("hwclock") && &execute_command("hwclock") == 0 && !&running_in_xen() && !&running_in_vserver() && !&running_in_openvz() && !&running_in_zone(); } # config_pre_load(mod-info-ref, [mod-order-ref]) # Check if some config options are conditional, # and if not allowed, remove them from listing sub config_pre_load { my ($modconf_info, $modconf_order) = @_; my @forbidden_keys; # Do not display timeformat for Linux systems push(@forbidden_keys, 'seconds') if ($gconfig{'os_type'} =~ /linux$/); # Remove forbidden from display if ($modconf_info) { foreach my $fkey (@forbidden_keys) { delete($modconf_info->{$fkey}); @{$modconf_order} = grep { $_ ne $fkey } @{$modconf_order} if ($modconf_order); } } } 1;
Close