⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
webmin
/
iscsi-target
/
View File Name :
edit_allow.cgi
#!/usr/bin/perl # Display an allowed target and IP list use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; require './iscsi-target-lib.pl'; our (%text, %in); &ReadParse(); my $allow = &get_allow_config($in{'mode'}); my $conf = &get_iscsi_config(); my @targets = &find($conf, "Target"); if ($in{'new'}) { &ui_print_header(undef, $text{$in{'mode'}.'_title1'}, ""); $a = { 'addrs' => [ ] }; } else { &ui_print_header(undef, $text{$in{'mode'}.'_title2'}, ""); $a = $allow->[$in{'idx'}]; $a || &error($text{'allow_egone'}); } print &ui_form_start("save_allow.cgi", "post"); print &ui_hidden("mode", $in{'mode'}); print &ui_hidden("new", $in{'new'}); print &ui_hidden("idx", $in{'idx'}); print &ui_table_start($text{$in{'mode'}.'_header'}, undef, 2); # Target name print &ui_table_row($text{'allow_target'}, &ui_select("name", $a->{'name'}, [ [ "ALL", "<".$text{'allow_all1'}.">" ], map { $_->{'value'} } @targets ], 1, 0, !$in{'new'})); # Allowed IPs (can be v6 or networks) my $all = $a->{'addrs'}->[0] eq 'ALL' ? 1 : 0; print &ui_table_row($text{$in{'mode'}.'_ips'}, &ui_radio("addrs_def", $all, [ [ 1, $text{'allow_all2'} ], [ 0, $text{'allow_below'} ] ])."<br>\n". &ui_textarea("addrs", $all ? "" : join("\n", @{$a->{'addrs'}}), 5, 60)); print &ui_table_end(); if ($in{'new'}) { print &ui_form_end([ [ undef, $text{'create'} ] ]); } else { print &ui_form_end([ [ undef, $text{'save'} ], [ 'delete', $text{'delete'} ] ]); } &ui_print_footer("list_allow.cgi?mode=$in{'mode'}", $text{'allow_return'});