403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/webmin/software/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/software//file_info.cgi
#!/usr/bin/perl
# file_info.cgi
# Display information about a file owned by the package management system

require './software-lib.pl';
&ReadParse();
$f = $in{'file'};
&ui_print_header(undef, $text{'file_title'}, "", "file_info");

$f =~ s/\/$//;
if ($f !~ /^\//) {
	# if the filename is not absolute, look for it
	foreach $p (split(/:/, $ENV{'PATH'})) {
		last if (&installed_file("$p/$f"));
		}
	}
else {
	# absolute path.. must exist in DB
	&installed_file($f);
	}

if (!%file) {
	print "<b>",&text('file_notfound', "<tt>$f</tt>"),"</b><p>\n";
	}
else {
	# display file info
	$nc = "width=10% nowrap";
	print &ui_table_start($text{'file_title'}, "width=100%", 4);

	print &ui_table_row($text{'file_path'},
			    "<tt>".&html_escape($file{'path'})."</tt>", 3);

	print &ui_table_row($text{'file_type'},
			    $type_map[$file{'type'}]);

	if ($file{'type'} != 3 && $file{'type'} != 4) {
		print &ui_table_row($text{'file_perms'}, $file{'mode'});

		print &ui_table_row($text{'file_owner'}, $file{'user'});
		print &ui_table_row($text{'file_group'}, $file{'group'});

		if ($file{'type'} == 0) {
			print &ui_table_row($text{'file_size'}, $file{'size'});
			}
		}
	else {
		print &ui_table_row($text{'file_link'},
			"<tt>".&html_escape($file{'link'})."</tt>", 3);
		}
	print &ui_table_end();

	# Show packages containing the file (usually only one)
	print &ui_columns_start([ $text{'file_pack'},
				  $text{'file_class'},
				  $text{'file_desc'} ], 100);
	@pkgs = split(/\s+/, $file{'packages'});
	@vers = split(/\s+/, $file{'versions'});
	$n = &list_packages(@pkgs);
	for($j=0; $j<@pkgs; $j++) {
		for($i=0; $i<$n; $i++) {
			next if ($vers[$i] &&
				 $packages{$i,'version'} ne $vers[$j] ||
				 $packages{$i,'name'} ne $pkgs[$j]);
			local @cols;
			push(@cols, "<a href=\"edit_pack.cgi?package=".
			      &urlize($pkgs[$j])."&version=".&urlize($vers[$j]).
			      "\">$pkgs[$j]</a>");
			$c = $packages{$i,'class'};
			push(@cols, $c || $text{'file_none'});
			push(@cols, $packages{$i,'desc'});
			print &ui_columns_row(\@cols);
			}
		}
	print &ui_columns_end();
	}

&ui_print_footer("", $text{'index_return'});


Youez - 2016 - github.com/yon3zu
LinuXploit