[ Avaa Bypassed ]




Upload:

Command:

www-data@18.188.66.142: ~ $
#!/usr/bin/perl
# Show a form for editing or creating a log destination

require './syslog-ng-lib.pl';
&ReadParse();

# Show title and get the destination
$conf = &get_config();
if ($in{'new'}) {
	&ui_print_header(undef, $text{'destination_title1'}, "");
	}
else {
	&ui_print_header(undef, $text{'destination_title2'}, "");
	@dests = &find("destination", $conf);
	($dest) = grep { $_->{'value'} eq $in{'name'} } @dests;
	$dest || &error($text{'destination_egone'});
	}

# Form header
print &ui_form_start("save_destination.cgi", "post");
print &ui_hidden("new", $in{'new'}),"\n";
print &ui_hidden("old", $in{'name'}),"\n";
print &ui_table_start($text{'destination_header'}, undef, 2);

# Destination name
print &ui_table_row($text{'destination_name'},
		    &ui_textbox("name", $dest->{'value'}, 20));

# Work out type
$file = &find("file", $dest->{'members'});
$usertty = &find("usertty", $dest->{'members'});
$program = &find("program", $dest->{'members'});
$pipe = &find("pipe", $dest->{'members'});
$udp = &find("udp", $dest->{'members'});
$tcp = &find("tcp", $dest->{'members'});
$dgram = &find("unix-dgram", $dest->{'members'});
$stream = &find("unix-stream", $dest->{'members'});
$type = $file ? 0 :
	$usertty ? 1 :
	$program ? 2 :
	$pipe ? 3 :
	$tcp ? 4 :
	$udp ? 5 :
	$dgram ? 6 :
	$stream ? 7 : 0;

$dtable = "<table>\n";

# File destination
if ($file) {
	$file_name = $file->{'value'};
	$file_owner = &find_value("owner", $file->{'members'});
	$file_group = &find_value("group", $file->{'members'});
	$file_perm = &find_value("perm", $file->{'members'});
	$file_create_dirs = &find_value("create_dirs", $file->{'members'});
	$file_dir_perm = &find_value("dir_perm", $file->{'members'});
	$file_fsync = &find_value("fsync", $file->{'members'});
	$file_sync_freq = &find_value("sync_freq", $file->{'members'});
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 0, "<b>$text{'destinations_typef'}</b>", $type == 0)."</td> <td valign=top><table>\n";
$dtable .= "<tr> <td>$text{'destination_file'}</td> <td>".
	   &ui_textbox("file_name", $file_name, 35)." ".
	   &file_chooser_button("file_name")."</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_owner'}</td> <td>".
	   &ui_opt_textbox("file_owner", $file_owner, 15, $text{'default'})." ".
	   &user_chooser_button("file_owner").
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_group'}</td> <td>".
	   &ui_opt_textbox("file_group", $file_group, 15, $text{'default'})." ".
	   &group_chooser_button("file_owner").
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_perm'}</td> <td>".
	   &ui_opt_textbox("file_perm", $file_perm, 5, $text{'default'}).
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_create_dirs'}</td> <td>".
	   &ui_radio("file_create_dirs", $file_create_dirs,
		     [ [ 'yes', $text{'yes'} ],
		       [ 'no', $text{'no'} ],
		       [ '', $text{'default'} ] ]).
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_dir_perm'}</td> <td>".
	   &ui_opt_textbox("file_dir_perm", $file_dir_perm, 5,$text{'default'}).
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_fsync'}</td> <td>".
	   &ui_radio("file_fsync", $file_fsync,
		     [ [ 'yes', $text{'yes'} ],
		       [ 'no', $text{'no'} ],
		       [ '', $text{'default'} ] ]).
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_sync_freq'}</td> <td>".
	   &ui_opt_textbox("file_sync_freq", $file_sync_freq, 5, $text{'default'}).
	   "</td> </tr>\n";
$dtable .= "</table></td> </tr>";

# User TTY destination
if ($usertty) {
	$usertty_user = $usertty->{'value'};
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 1, "<b>$text{'destinations_typeu'}</b>", $type == 1)."</td> <td valign=top>\n";
$dtable .= &ui_opt_textbox("usertty_user", $usertty_user eq "*" ? undef : $usertty_user, 20, $text{'destinations_allusers'}, $text{'destination_users'})." ".&user_chooser_button("usertty_user", 1);
$table .= "</td> </tr>";

# Program destination
if ($program) {
	$program_prog = $program->{'value'};
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 2, "<b>$text{'destinations_typep'}</b>", $type == 2)."</td> <td valign=top>\n";
$dtable .= &ui_textbox("program_prog", $program_prog, 50);
$table .= "</td> </tr>";

# Pipe destination
if ($pipe) {
	$pipe_name = $pipe->{'value'};
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 3, "<b>$text{'destinations_typei'}</b>", $type == 3)."</td> <td valign=top>\n";
$dtable .= &ui_textbox("pipe_name", $pipe_name, 30)." ".
	   &file_chooser_button("pipe_name");
$dtable .= "</td> </tr>";

# TCP or UDP socket
$net = $tcp || $udp;
if ($net) {
	$net_host = $net->{'value'};
	$net_port = &find_value("port", $net->{'members'});
	$net_localip = &find_value("localip", $net->{'members'});
	$net_localport = &find_value("localport", $net->{'members'});
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 4, "<b>$text{'destination_net'}</b>", $type == 4 || $type == 5)."</td> <td valign=top><table>\n";
$dtable .= "<tr> <td>$text{'destination_proto'}</td> ".
	   "<td>".&ui_select("net_proto", $type == 5 ? "udp" : "tcp",
		     [ [ "tcp", "TCP" ], [ "udp", "UDP" ] ])."</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_host'}</td> ".
	   "<td>".&ui_textbox("net_host", $net_host, 20)."</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_port'}</td> ".
	   "<td>".&ui_opt_textbox("net_port", $net_port, 5, "$text{'default'} (514)")."</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_localip'}</td> ".
	   "<td>".&ui_opt_textbox("net_localip", $net_localip, 15, $text{'default'})."</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_localport'}</td> ".
	   "<td>".&ui_opt_textbox("net_localport", $net_localport, 5, $text{'default'})."</td> </tr>\n";
$dtable .= "</table></td> </tr>";

# Datagram or stream socket
$unix = $dgram || $stream;
if ($unix) {
	$unix_name = $unix->{'value'};
	}
$dtable .= "<tr> <td valign=top>".&ui_oneradio("type", 6, "<b>$text{'destination_unix'}</b>", $type == 6 || $type == 7)."</td> <td valign=top><table>\n";
$dtable .= "<tr> <td>$text{'destination_utype'}</td> ".
	   "<td>".&ui_select("unix_type",
		     $type == 6 ? "unix-dgram" : "unix-stream",
		     [ [ "unix-stream", $text{'destinations_types'} ],
		       [ "unix-dgram", $text{'destinations_typeg'} ] ]).
	   "</td> </tr>\n";
$dtable .= "<tr> <td>$text{'destination_socket'}</td> ".
	   "<td>".&ui_textbox("unix_name", $unix_name, 30)."\n".
		  &file_chooser_button("unix_name")."</td> </tr>\n";
$dtable .= "</table></td> </tr>";

# Actually show the destination
$dtable .= "</table>\n";
print &ui_table_row($text{'destination_type'}, $dtable);

# Form footer and buttons
print &ui_table_end();
if ($in{'new'}) {
	print &ui_form_end([ [ "create", $text{'create'} ] ]);
	}
else {
	print &ui_form_end([ [ "save", $text{'save'} ],
			     [ "delete", $text{'delete'} ] ]);
	}
&ui_print_footer("list_destinations.cgi", $text{'destinations_return'});


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 389 B 0644
apply.cgi File 202 B 0755
backup_config.pl File 617 B 0755
config File 190 B 0644
config-AlmaLinux-7.0-ALL File 188 B 0644
config-Amazon-Linux-2-ALL File 188 B 0644
config-CentOS-Linux-7.0-ALL File 190 B 0644
config-CentOS-Stream-Linux-8.0-ALL File 188 B 0644
config-CloudLinux-8.0-ALL File 188 B 0644
config-Oracle-Linux-8.0-ALL File 188 B 0644
config-Redhat-Enterprise-Linux-7.0-ALL File 188 B 0644
config-Rocky-Linux-7.0-ALL File 188 B 0644
config-Scientific-Linux-7.0-ALL File 188 B 0644
config-debian-linux File 196 B 0644
config-freebsd File 225 B 0644
config-gentoo-linux File 211 B 0644
config-openSUSE-Linux-15.0-ALL File 128 B 0644
config-openmamba-linux File 186 B 0644
config-redhat-linux-12.0-23.0 File 196 B 0644
config-redhat-linux-24.0-ALL File 176 B 0644
config-solaris File 197 B 0644
config-suse-linux File 128 B 0644
config-syno-linux File 122 B 0644
config.info File 575 B 0644
config.info.ca File 673 B 0644
config.info.de File 687 B 0644
config.info.hu File 0 B 0644
config.info.nl File 651 B 0644
config.info.no File 613 B 0644
delete_destinations.cgi File 710 B 0755
delete_filters.cgi File 667 B 0755
delete_logs.cgi File 549 B 0755
delete_sources.cgi File 667 B 0755
edit_destination.cgi File 6.76 KB 0755
edit_filter.cgi File 4.24 KB 0755
edit_log.cgi File 2.22 KB 0755
edit_source.cgi File 9.59 KB 0755
index.cgi File 1.9 KB 0755
install_check.pl File 419 B 0755
list_destinations.cgi File 1.88 KB 0755
list_filters.cgi File 1.1 KB 0755
list_logs.cgi File 1.23 KB 0755
list_options.cgi File 5.63 KB 0755
list_sources.cgi File 1.04 KB 0755
log_parser.pl File 685 B 0755
module.info File 148 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 104 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 152 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 194 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 249 B 0644
module.info.ca File 130 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 131 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 104 B 0644
module.info.de File 112 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 225 B 0644
module.info.es File 0 B 0644
module.info.es.auto File 123 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 134 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 204 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 120 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 127 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 151 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 136 B 0644
module.info.hu File 38 B 0644
module.info.hu.auto File 97 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 127 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 138 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 126 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 141 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 125 B 0644
module.info.ms File 111 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 123 B 0644
module.info.nl File 23 B 0644
module.info.nl.auto File 89 B 0644
module.info.no File 25 B 0644
module.info.no.auto File 78 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 112 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 119 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 125 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 136 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 188 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 133 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 127 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 107 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 207 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 136 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 194 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 179 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 160 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 103 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 109 B 0644
prefs.info File 44 B 0644
save_destination.cgi File 4.99 KB 0755
save_filter.cgi File 3.64 KB 0755
save_log.cgi File 1.94 KB 0755
save_options.cgi File 2.08 KB 0755
save_source.cgi File 6.11 KB 0755
start.cgi File 198 B 0755
stop.cgi File 194 B 0755
syslog-ng-lib.pl File 20.61 KB 0755
view_log.cgi File 2.92 KB 0755