Fuer den Urlfilter ein Background Image gemacht

MPFire erweitert
Samba Pagerefresh korrigiert
Tripwire Pagerefreh korrigiert
Backup CGI sollte jetzt fertig sein zum Testen
vpnmain die beiden SHA2 Crypts entfernt
Snort init nochmal angepasst damit die PID alleine angelegt wird


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@682 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-07-13 18:49:27 +00:00
parent c0b839c47f
commit 69addbb810
14 changed files with 62 additions and 52 deletions

View File

@@ -15,45 +15,35 @@ $Minuten = sprintf("%02d", $Minuten);
if ($ARGV[0] eq 'include') {
&createinclude;
my @files = `find / -name *.log`;
my @files = `find / -name *.log 2>/dev/null`;
foreach (@files){
push(@include,$_);
}
open(DATEI, ">/tmp/include") || die "Could not save temp include file";
print DATEI @include;
close(DATEI);
system("tar -cvzf /srv/web/ipfire/html/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten.ipf --files-from=/tmp/include --exclude-from=/var/ipfire/backup/exclude");
system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten.ipf --files-from='/tmp/include' --exclude-from='/var/ipfire/backup/exclude'");
system("rm /tmp/include");
}
if ($ARGV[0] eq 'exclude') {
elsif ($ARGV[0] eq 'exclude') {
&createinclude;
open(DATEI, ">/tmp/include") || die "Could not save temp include file";
print DATEI @include;
close(DATEI);
system("tar -cvzf /srv/web/ipfire/html/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten.ipf --files-from='/tmp/include' --exclude-from='/var/ipfire/backup/exclude'");
system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten.ipf --files-from='/tmp/include' --exclude-from='/var/ipfire/backup/exclude'");
system("rm /tmp/include");
}
if ($ARGV[0] eq 'restore') {
elsif ($ARGV[0] eq 'restore') {
system("tar -xvz --preserve -f /tmp/restore.ipf");
}
if ($ARGV[0] eq 'exclude') {
&createinclude;
open(DATEI, ">/tmp/include") || die "Could not save temp include file";
print DATEI @include;
close(DATEI);
system("tar -cvzf /srv/web/ipfire/html/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten.ipf --files-from='/tmp/include' --exclude-from='/var/ipfire/backup/exclude'");
system("rm /tmp/include");
elsif ($ARGV[0] eq 'cli') {
system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten-$ARGV[1].ipf --files-from='$ARGV[2]' --exclude-from='$ARGV[3]'");
}
if ($ARGV[0] eq 'cli') {
system("tar -cvzf /srv/web/ipfire/html/backup/$Jahr$Monat$Monatstag-$Stunden:$Minuten-$ARGV[1].ipf --files-from='$ARGV[2]' --exclude-from='$ARGV[3]'");
elsif ($ARGV[0] =~ /ipf$/ ) {
system("rm /var/ipfire/backup/$ARGV[0]");
}
if ($ARGV[0] eq '') {
printf "No argument given, please use <include><exclude>\n"
elsif ($ARGV[0] eq '') {
printf "No argument given, please use <include><exclude><cli>\n"
}
sub createinclude(){

View File

@@ -1,6 +1,7 @@
/var/ipfire/*/settings
/var/ipfire/*/*.conf
/var/ipfire/*/*.pem
/var/ipfire/*/config
/etc/passwd
/etc/shadow
/etc/group

View File

@@ -109,7 +109,6 @@ WARNING: translation string unused: display traffic at home
WARNING: translation string unused: dns server
WARNING: translation string unused: do not log this port list
WARNING: translation string unused: downlink speed
WARNING: translation string unused: download
WARNING: translation string unused: dynamic dns client
WARNING: translation string unused: eciadsl help
WARNING: translation string unused: eciadsl upload

View File

@@ -17,7 +17,6 @@
< dhcp fixed lease err1
< dhcp fixed lease help1
< dns server
< download
< err bk 10 password
< or
< password crypting key

View File

@@ -22,7 +22,7 @@ my %cgiparams=();
my %checked = ();
my $message = "";
my $errormessage = "";
my @backups = `cd /srv/web/ipfire/html/backup && ls *.ipf`;
my @backups = `cd /var/ipfire/backup/ && ls *.ipf`;
$a = new CGI;
@@ -33,19 +33,16 @@ $cgiparams{'ACTION'} = '';
$cgiparams{'FILE'} = '';
$cgiparams{'UPLOAD'} = '';
$cgiparams{'BACKUPLOGS'} = '';
&Header::getcgihash(\%cgiparams);
############################################################################################################################
######################################## Scanne Verzeichnisse nach Mp3 Dateien #############################################
############################################## System calls ohne Http Header ###############################################
if ( $cgiparams{'ACTION'} eq "backup" )
if ( $cgiparams{'ACTION'} eq "download" )
{
if ( $cgiparams{'BACKUPLOGS'} eq "include" ){system("/usr/local/bin/backupctrl include");}
else {system("/usr/local/bin/backupctrl exclude");}
}
elsif ( $cgiparams{'ACTION'} eq "download" )
{
open(DLFILE, "</srv/web/ipfire/html/backup/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
open(DLFILE, "</var/ipfire/backup/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
my @fileholder = <DLFILE>;
print "Content-Type:application/x-download\n";
print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n";
@@ -64,13 +61,31 @@ elsif ( $cgiparams{'ACTION'} eq "restore" )
system("/usr/local/bin/backupctrl restore");
}
############################################################################################################################
########################################### rekursiv nach neuen Mp3s Scannen ##############################################ä
&Header::showhttpheaders();
sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
&Header::openpage($Lang::tr{'backup'}, 1, "");
&Header::openbigbox('100%', 'left', '', $errormessage);
############################################################################################################################
################################################### Default System calls ###################################################
if ( $cgiparams{'ACTION'} eq "backup" )
{
if ( $cgiparams{'BACKUPLOGS'} eq "include" ){system("/usr/local/bin/backupctrl include >/dev/null");}
else {system("/usr/local/bin/backupctrl exclude >/dev/null");}
refreshpage();
}
elsif ( $cgiparams{'ACTION'} eq "delete" )
{
system("/usr/local/bin/backupctrl $cgiparams{'FILE'} >/dev/null");
refreshpage();
}
############################################################################################################################
########################################### rekursiv nach neuen Mp3s Scannen ##############################################ä
if ( $message ne "" ){
&Header::openbox('100%','left',$Lang::tr{'error messages'});
print "<font color='red'>$message</font>\n";
@@ -100,11 +115,12 @@ END
;
foreach (@backups){
chomp($_);
my $Datei = "/srv/web/ipfire/html/backup/".$_;
my $Datei = "/var/ipfire/backup/".$_;
my @Info = stat($Datei);
my $Size = $Info[7] / 1024;
$Size = sprintf("%02d", $Size);
print "<tr><td align='left'><form method='post' action='$ENV{'SCRIPT_NAME'}'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB <input type='hidden' name='ACTION' value='download' /><input type='hidden' name='FILE' value='$_' /><input type='image' src='/images/package-x-generic.png' /></form></td></tr>";
print "<tr><td align='center'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB</td><td width='5'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='download' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'download'}' title='$Lang::tr{'download'}' src='/images/package-x-generic.png' /></form></td>";
print "<td width='5'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='delete' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/user-trash.png' /></form></td></tr>";
}
print <<END
</table>
@@ -116,7 +132,7 @@ END
print <<END
<table width='95%' cellspacing='0'>
<tr><td align='left'><form method='post' enctype='multipart/form-data' action='$ENV{'SCRIPT_NAME'}'>$Lang::tr{'backup'}</td><td align='left'><input type="file" size='50' name="UPLOAD" /><input type='submit' name='ACTION' value='restore' /></form></td></tr>
<tr><td align='left'>$Lang::tr{'backup'}</td><td align='left'><form method='post' enctype='multipart/form-data' action='$ENV{'SCRIPT_NAME'}'><input type="file" size='50' name="UPLOAD" /><input type='hidden' name='ACTION' value='restore' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'restore'}' title='$Lang::tr{'restore'}' src='/images/media-floppy.png' /></form></td></tr>
</table>
END
;

View File

@@ -31,8 +31,10 @@ close(DATEI);
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
&Header::showhttpheaders();
&Header::getcgihash(\%mpfiresettings);
sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
&Header::getcgihash(\%mpfiresettings);
&Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120'>");
&Header::openbigbox('100%', 'left', '', $errormessage);
@@ -44,6 +46,7 @@ if ( $mpfiresettings{'ACTION'} eq "scan" )
delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};
&General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);
system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
refreshpage();
}
if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
@@ -139,8 +142,12 @@ my $song = qx(/usr/local/bin/mpfirectrl song);
if ( $song eq "" ){$song = "None";}
&Header::openbox('100%', 'center', $Lang::tr{'mpfire controls'});
print "<table width='95%' cellspacing='0'><tr bgcolor='$color{'color20'}'><td colspan='5' align='center'><marquee behavior='alternate' scrollamount='1' scrolldelay='5'><font color=red>-= $song =-</font></marquee></td></tr><tr><td colspan='5'><br/></td></tr><tr>";
print <<END
<table width='95%' cellspacing='0'>
<tr bgcolor='$color{'color20'}'> <td colspan='5' align='center'><marquee behavior='alternate' scrollamount='1' scrolldelay='5'><font color=red>-= $song =-</font></marquee></td></tr>
<tr><td colspan='5' align='center'><br/><b>total $#songdb songs</b><br/><br/></td></tr>
<tr>
<td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='x' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/media-playback-stop.png' /></form></td>
<td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='||' /><input type='image' alt='$Lang::tr{'pause'}' title='$Lang::tr{'pause'}' src='/images/media-playback-pause.png' /></form></td>
<td align='center'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='|>' /><input type='image' alt='$Lang::tr{'resume'}' title='$Lang::tr{'resume'}' src='/images/media-resume.png' /></form></td>
@@ -175,9 +182,10 @@ foreach (@songdb){
@album = sort keys %hash;
print <<END
<table width='95%' cellspacing='0'>
<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - $#artist</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - $#album</b></td></tr>
<tr><td align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<select name='artist' size='8' multiple='multiple'>
<select name='artist' size='8' multiple='multiple' style='width:300px;'>
END
;
foreach (@artist){print "<option>$_</option>";}
@@ -188,7 +196,7 @@ print <<END
</form></td>
<td align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<select name='album' size='8' multiple='multiple'>
<select name='album' size='8' multiple='multiple' style='width:300px;'>
END
;
foreach (@album){print "<option>$_</option>";}

View File

@@ -98,7 +98,7 @@ my $PDCOPTIONS = `cat ${General::swroot}/samba/pdc`;
&General::readhash("${General::swroot}/samba/settings", \%sambasettings);
&Header::getcgihash(\%sambasettings);
sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );}
sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
&Header::openpage('Samba', 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);

View File

@@ -248,7 +248,7 @@ END
if ($tripwiresettings{'ACTION'} eq 'globalresetyes')
{
&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'tripwireoperating'}</font></center>";
&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'tripwireoperating'}</font></center>";&Header::closebox();
$tripwiresettings{'ROOT'} = '/usr/sbin';
$tripwiresettings{'POLFILE'} = '/var/ipfire/tripwire/tw.pol';
$tripwiresettings{'DBFILE'} = '/var/ipfire/tripwire/$(HOSTNAME).twd';

View File

@@ -2302,8 +2302,6 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) ||
<td class='boldbase' align='right' valign='top'>$Lang::tr{'ike integrity'}</td><td class='boldbase' valign='top'>
<select name='IKE_INTEGRITY' multiple='multiple' size='4'>
<option value='sha2_512' $checked{'IKE_INTEGRITY'}{'sha2_512'}>SHA2 (512)</option>
<option value='sha2_256' $checked{'IKE_INTEGRITY'}{'sha2_256'}>SHA2 (256)</option>
<option value='sha' $checked{'IKE_INTEGRITY'}{'sha'}>SHA</option>
<option value='md5' $checked{'IKE_INTEGRITY'}{'md5'}>MD5</option>
</select></td>
@@ -2340,8 +2338,6 @@ if(($cgiparams{'ACTION'} eq $Lang::tr{'advanced'}) ||
<td class='boldbase' align='right' valign='top'>$Lang::tr{'esp integrity'}</td><td class='boldbase' valign='top'>
<select name='ESP_INTEGRITY' multiple='multiple' size='4'>
<option value='sha2_512' $checked{'ESP_INTEGRITY'}{'sha2_512'}>SHA2 (512)</option>
<option value='sha2_256' $checked{'ESP_INTEGRITY'}{'sha2_256'}>SHA2 (256)</option>
<option value='sha1' $checked{'ESP_INTEGRITY'}{'sha1'}>SHA1</option>
<option value='md5' $checked{'ESP_INTEGRITY'}{'md5'}>MD5</option></select></td>

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -606,7 +606,7 @@
'domain name suffix' => 'Domain-Name-Suffix:',
'domain not set' => 'Domain nicht eingegeben.',
'downlink speed' => 'Downlink-Geschwindigkeit (kBit/sek)',
'download' => 'Download',
'download' => 'herunterladen',
'download ca certificate' => 'CA Zertifikat herunterladen',
'download certificate' => 'Zertifikate herunterladen',
'download host certificate' => 'Host Zertifikat herunterladen',
@@ -1167,6 +1167,7 @@
'ovpnstatus log' => 'OVPN-Status-Log',
'ovpnsys log' => 'OVPN-System-Log',
'package failed to install' => 'Programmpaket konnte nicht installiert werden.',
'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.',
'pakfire configuration' => 'Pakfire Konfiguration',
'pap or chap' => 'PAP oder CHAP',
'password' => 'Passwort:',

View File

@@ -617,6 +617,7 @@
'domain not set' => 'Domain not set.',
'done' => 'Do it',
'downlink speed' => 'Downlink speed (kbit/sec)',
'download' => 'download',
'download ca certificate' => 'Download CA Certificate',
'download certificate' => 'Download Certificate',
'download host certificate' => 'Download Host Certificate',
@@ -1179,6 +1180,7 @@
'ovpnstatus log' => 'OVPN-Status-Log',
'ovpnsys log' => 'OVPN-System-Log',
'package failed to install' => 'Package failed to install.',
'pagerefresh' => 'Page is beeing refreshed, please wait.',
'pakfire configuration' => 'Pakfire Configuration',
'pap or chap' => 'PAP or CHAP',
'password' => 'Password:',

View File

@@ -62,7 +62,7 @@ case "$1" in
start)
for DEVICE in $DEVICES; do
boot_mesg "Starting Intrusion Detection System on $DEVICE..."
/usr/sbin/snort -c /etc/snort/snort.conf -i $DEVICE -D -l /var/log/snort --pid-path /var/run/
/usr/sbin/snort -c /etc/snort/snort.conf -i $DEVICE -D -l /var/log/snort --create-pidfile --nolock-pidfile --pid-path /var/run/
evaluate_retval
chmod 644 /var/run/snort_$DEVICE.pid
done

View File

@@ -43,7 +43,5 @@ int main(int argc, char *argv[]) {
sprintf(add, " %s", argv[i]);
strcat(command, add);
}
snprintf(command, STRING_SIZE, " >/dev/null 2>/dev/null");
return safe_system(command);
}