public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 1081a699c68ba4d2aa39aee21607767208565382
@ 2025-10-07 15:10 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-10-07 15:10 UTC (permalink / raw)
  To: ipfire-scm

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 28878 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, master has been updated
       via  1081a699c68ba4d2aa39aee21607767208565382 (commit)
       via  4290085d84bf2f8986b5f36045989a048f5a6e00 (commit)
       via  1370241b59a4a124c3009455890aa3cc2aafee09 (commit)
       via  be69dd03ad9b268c10e29533fd91462d3172ebb2 (commit)
       via  25a006fd6cd06e559fbc913d31d4662b6831e2ac (commit)
       via  3d5dba3246228752368ac2ec73acf86101bdd754 (commit)
      from  54e9e66841b8fc97dd46ba419228c3fb6d488b69 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1081a699c68ba4d2aa39aee21607767208565382
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Oct 7 15:09:52 2025 +0000

    suricata-reporter: Update to 0.4
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 4290085d84bf2f8986b5f36045989a048f5a6e00
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Oct 7 16:05:39 2025 +0100

    ids.dat: Only allow downloading daily reports
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 1370241b59a4a124c3009455890aa3cc2aafee09
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Oct 7 15:54:58 2025 +0100

    ids.dat: Fix date offset
    
    The CGI is starting from zero.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit be69dd03ad9b268c10e29533fd91462d3172ebb2
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Oct 7 15:53:01 2025 +0100

    ids.dat: Remove extra space from command line arguments
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 25a006fd6cd06e559fbc913d31d4662b6831e2ac
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Oct 7 15:52:33 2025 +0100

    ids.dat: Remove database path
    
    We don't want to have any configuration in random CGI files.
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 3d5dba3246228752368ac2ec73acf86101bdd754
Author: Stefan Schantl <stefan.schantl@ipfire.org>
Date:   Mon Oct 6 17:15:58 2025 +0200

    logs.cgi/ids.dat: Add support for generating reports
    
    This commit allows to manaully generate certain reports
    of logged suricata alerts.
    
    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 doc/language_issues.de        |  2 +-
 doc/language_issues.en        |  2 ++
 doc/language_issues.es        |  2 ++
 doc/language_issues.fr        |  2 ++
 doc/language_issues.it        |  2 ++
 doc/language_issues.nl        |  2 ++
 doc/language_issues.pl        |  2 ++
 doc/language_issues.ru        |  2 ++
 doc/language_issues.tr        |  2 ++
 doc/language_issues.tw        |  2 ++
 doc/language_issues.zh        |  2 ++
 doc/language_missings         | 30 +++++++++++++++++++++++++++
 html/cgi-bin/logs.cgi/ids.dat | 48 ++++++++++++++++++++++++++++++++++++++++++-
 langs/de/cgi-bin/de.pl        |  2 +-
 langs/en/cgi-bin/en.pl        |  3 +++
 lfs/suricata-reporter         |  4 ++--
 16 files changed, 104 insertions(+), 5 deletions(-)

Difference in files:
diff --git a/doc/language_issues.de b/doc/language_issues.de
index 76f7ab472..5dbc9987f 100644
--- a/doc/language_issues.de
+++ b/doc/language_issues.de
@@ -391,7 +391,6 @@ WARNING: translation string unused: generate
 WARNING: translation string unused: generate tripwire keys and init
 WARNING: translation string unused: generatekeys
 WARNING: translation string unused: generatepolicy
-WARNING: translation string unused: generatereport
 WARNING: translation string unused: genkey
 WARNING: translation string unused: genre
 WARNING: translation string unused: gpl i accept these terms and conditions
@@ -996,6 +995,7 @@ WARNING: untranslated string: fwdfw syn flood protection = Enable SYN Flood Prot
 WARNING: untranslated string: fwhost cust locationgrp = unknown string
 WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
 WARNING: untranslated string: guardian block ssh brute-force = unknown string
diff --git a/doc/language_issues.en b/doc/language_issues.en
index fe7a17f1f..cb22c63df 100644
--- a/doc/language_issues.en
+++ b/doc/language_issues.en
@@ -654,6 +654,7 @@ WARNING: untranslated string: download ca certificate = Download CA certificate
 WARNING: untranslated string: download certificate = Download file
 WARNING: untranslated string: download host certificate = Download host certificate
 WARNING: untranslated string: download pkcs12 file = Download PKCS12 file
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: download root certificate = Download root certificate
 WARNING: untranslated string: download tls-auth key = Download tls-auth key
 WARNING: untranslated string: dpd action = Action
@@ -968,6 +969,7 @@ WARNING: untranslated string: gateway ip = Gateway IP
 WARNING: untranslated string: generate a certificate = Generate a certificate:
 WARNING: untranslated string: generate iso = Generate ISO
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: generate root/host certificates = Generate root/host certificates
 WARNING: untranslated string: generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient = Generating the root and host certificates may take a long time.  It can take up to several minutes on older hardware. Please be patient.
 WARNING: untranslated string: global settings = Global Settings
diff --git a/doc/language_issues.es b/doc/language_issues.es
index f0a6e31ba..de9fdbff0 100644
--- a/doc/language_issues.es
+++ b/doc/language_issues.es
@@ -1022,6 +1022,7 @@ WARNING: untranslated string: Captive ACTIVATE = unknown string
 WARNING: untranslated string: Captive clients = unknown string
 WARNING: untranslated string: ca name must only contain characters and spaces = unknown string
 WARNING: untranslated string: dns servers = DNS Servers
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: enable disable client = unknown string
 WARNING: untranslated string: enable disable dyndns = unknown string
 WARNING: untranslated string: error message = unknown string
@@ -1029,6 +1030,7 @@ WARNING: untranslated string: extrahd because it is outside the allowed mount pa
 WARNING: untranslated string: fwhost cust locationgrp = unknown string
 WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
 WARNING: untranslated string: guardian block ssh brute-force = unknown string
diff --git a/doc/language_issues.fr b/doc/language_issues.fr
index ce55b88ba..009286d9f 100644
--- a/doc/language_issues.fr
+++ b/doc/language_issues.fr
@@ -1004,6 +1004,7 @@ WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core notice 3 = available.
 WARNING: untranslated string: data transfer = Data Transfer
 WARNING: untranslated string: done = Done
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: enable disable client = unknown string
 WARNING: untranslated string: enable disable dyndns = unknown string
 WARNING: untranslated string: endpoint = Endpoint
@@ -1016,6 +1017,7 @@ WARNING: untranslated string: fwhost cust locationgrp = unknown string
 WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
 WARNING: untranslated string: guardian block ssh brute-force = unknown string
diff --git a/doc/language_issues.it b/doc/language_issues.it
index ee5135003..a7d440766 100644
--- a/doc/language_issues.it
+++ b/doc/language_issues.it
@@ -1051,6 +1051,7 @@ WARNING: untranslated string: dnsforward forward_servers = Nameservers
 WARNING: untranslated string: done = Done
 WARNING: untranslated string: downfall gather data sampling = Downfall/Gather Data Sampling
 WARNING: untranslated string: download apple profile = Download Apple Configuration Profile
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: drop hostile = Drop packets from and to hostile networks (listed at <a href="https://www.spamhaus.org/blocklists/do-not-route-or-peer/" target="_blank">Spamhaus DROP</a>, etc.)
 WARNING: untranslated string: drop spoofed martians = Log dropped spoofed packets and martians
 WARNING: untranslated string: duration = Duration
@@ -1120,6 +1121,7 @@ WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
 WARNING: untranslated string: fwhost newlocationgrp = Location Groups
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guaranteed bandwidth = Guaranteed bandwidth
 WARNING: untranslated string: guardian = Guardian
 WARNING: untranslated string: guardian block a host = unknown string
diff --git a/doc/language_issues.nl b/doc/language_issues.nl
index 415041191..f90b26efa 100644
--- a/doc/language_issues.nl
+++ b/doc/language_issues.nl
@@ -1055,6 +1055,7 @@ WARNING: untranslated string: dnssec validating = DNSSEC Validating
 WARNING: untranslated string: done = Done
 WARNING: untranslated string: downfall gather data sampling = Downfall/Gather Data Sampling
 WARNING: untranslated string: download apple profile = Download Apple Configuration Profile
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: download tls-auth key = Download tls-auth key
 WARNING: untranslated string: drop hostile = Drop packets from and to hostile networks (listed at <a href="https://www.spamhaus.org/blocklists/do-not-route-or-peer/" target="_blank">Spamhaus DROP</a>, etc.)
 WARNING: untranslated string: drop outgoing = Log dropped outgoing packets
@@ -1127,6 +1128,7 @@ WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
 WARNING: untranslated string: fwhost newlocationgrp = Location Groups
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guardian = Guardian
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
diff --git a/doc/language_issues.pl b/doc/language_issues.pl
index c951b39ce..4e3b4a4ef 100644
--- a/doc/language_issues.pl
+++ b/doc/language_issues.pl
@@ -1016,6 +1016,7 @@ WARNING: untranslated string: done = Done
 WARNING: untranslated string: downfall gather data sampling = Downfall/Gather Data Sampling
 WARNING: untranslated string: downlink = Downlink
 WARNING: untranslated string: download apple profile = Download Apple Configuration Profile
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: download tls-auth key = Download tls-auth key
 WARNING: untranslated string: dpd delay = Delay
 WARNING: untranslated string: dpd timeout = Timeout
@@ -1245,6 +1246,7 @@ WARNING: untranslated string: fwhost used = Used
 WARNING: untranslated string: fwhost welcome = Over here, you can group single hosts, networks and services together, which will creating new rules more easy and faster.
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: grouptype = Grouptype:
 WARNING: untranslated string: guardian = Guardian
 WARNING: untranslated string: guardian block a host = unknown string
diff --git a/doc/language_issues.ru b/doc/language_issues.ru
index 738de8fee..7e29245c9 100644
--- a/doc/language_issues.ru
+++ b/doc/language_issues.ru
@@ -1014,6 +1014,7 @@ WARNING: untranslated string: done = Done
 WARNING: untranslated string: downfall gather data sampling = Downfall/Gather Data Sampling
 WARNING: untranslated string: downlink = Downlink
 WARNING: untranslated string: download apple profile = Download Apple Configuration Profile
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: download tls-auth key = Download tls-auth key
 WARNING: untranslated string: dpd delay = Delay
 WARNING: untranslated string: dpd timeout = Timeout
@@ -1243,6 +1244,7 @@ WARNING: untranslated string: fwhost used = Used
 WARNING: untranslated string: fwhost welcome = Over here, you can group single hosts, networks and services together, which will creating new rules more easy and faster.
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: grouptype = Grouptype:
 WARNING: untranslated string: guardian = Guardian
 WARNING: untranslated string: guardian block a host = unknown string
diff --git a/doc/language_issues.tr b/doc/language_issues.tr
index cb13bc21f..c79958b23 100644
--- a/doc/language_issues.tr
+++ b/doc/language_issues.tr
@@ -1033,6 +1033,7 @@ WARNING: untranslated string: dnsforward forward_servers = Nameservers
 WARNING: untranslated string: done = Done
 WARNING: untranslated string: downfall gather data sampling = Downfall/Gather Data Sampling
 WARNING: untranslated string: download apple profile = Download Apple Configuration Profile
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: drop hostile = Drop packets from and to hostile networks (listed at <a href="https://www.spamhaus.org/blocklists/do-not-route-or-peer/" target="_blank">Spamhaus DROP</a>, etc.)
 WARNING: untranslated string: drop spoofed martians = Log dropped spoofed packets and martians
 WARNING: untranslated string: duration = Duration
@@ -1066,6 +1067,7 @@ WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
 WARNING: untranslated string: fwhost wg peers = WireGuard Peers
 WARNING: untranslated string: generate ptr = Generate PTR
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
 WARNING: untranslated string: guardian block ssh brute-force = unknown string
diff --git a/doc/language_issues.tw b/doc/language_issues.tw
index 5a9f61b2c..71fbaf3c2 100644
--- a/doc/language_issues.tw
+++ b/doc/language_issues.tw
@@ -1030,6 +1030,7 @@ WARNING: untranslated string: Captive wrong type = Uploaded file has wrong filet
 WARNING: untranslated string: aliases default interface = - Default Interface -
 WARNING: untranslated string: ca name must only contain characters and spaces = unknown string
 WARNING: untranslated string: dns servers = DNS Servers
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: enable disable client = unknown string
 WARNING: untranslated string: enable disable dyndns = unknown string
 WARNING: untranslated string: error message = unknown string
@@ -1037,6 +1038,7 @@ WARNING: untranslated string: extrahd because it is outside the allowed mount pa
 WARNING: untranslated string: fwhost cust locationgrp = unknown string
 WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guaranteed bandwidth = Guaranteed bandwidth
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
diff --git a/doc/language_issues.zh b/doc/language_issues.zh
index 5a9f61b2c..71fbaf3c2 100644
--- a/doc/language_issues.zh
+++ b/doc/language_issues.zh
@@ -1030,6 +1030,7 @@ WARNING: untranslated string: Captive wrong type = Uploaded file has wrong filet
 WARNING: untranslated string: aliases default interface = - Default Interface -
 WARNING: untranslated string: ca name must only contain characters and spaces = unknown string
 WARNING: untranslated string: dns servers = DNS Servers
+WARNING: untranslated string: download report = Download Report
 WARNING: untranslated string: enable disable client = unknown string
 WARNING: untranslated string: enable disable dyndns = unknown string
 WARNING: untranslated string: error message = unknown string
@@ -1037,6 +1038,7 @@ WARNING: untranslated string: extrahd because it is outside the allowed mount pa
 WARNING: untranslated string: fwhost cust locationgrp = unknown string
 WARNING: untranslated string: fwhost err hostip = unknown string
 WARNING: untranslated string: fwhost invalid country code = Invalid Country Code
+WARNING: untranslated string: generate report = unknown string
 WARNING: untranslated string: guaranteed bandwidth = Guaranteed bandwidth
 WARNING: untranslated string: guardian block a host = unknown string
 WARNING: untranslated string: guardian block httpd brute-force = unknown string
diff --git a/doc/language_missings b/doc/language_missings
index b042081eb..8e0ad72d3 100644
--- a/doc/language_missings
+++ b/doc/language_missings
@@ -66,6 +66,8 @@
 < fwdfw syn flood protection
 < fwhost wg peers
 < g.dtm
+< generate pdf report for
+< generatereport
 < g.lite
 < hostile networks in
 < hostile networks out
@@ -113,6 +115,7 @@
 < reiserfs warning1
 < reiserfs warning2
 < remarks
+< report exporting
 < required
 < routing
 < rss
@@ -156,7 +159,9 @@
 < AES-256-GCM
 < CHACHA20-POLY1305
 < dns servers
+< download report
 < fwhost invalid country code
+< generate pdf report for
 < ids all including informational
 < ids email alerts
 < ids email alert severity
@@ -194,6 +199,7 @@
 < ovpn transport protocol
 < ovpn unsupported cipher selected
 < quality of service
+< report exporting
 < rss
 < rss long
 < transient sheduler attacks
@@ -214,6 +220,7 @@
 < configuration file
 < data transfer
 < done
+< download report
 < endpoint
 < endpoint address
 < endpoint port
@@ -222,6 +229,7 @@
 < fwhost invalid country code
 < fwhost wg peers
 < g.dtm
+< generate pdf report for
 < g.lite
 < hostile networks total
 < ids all including informational
@@ -286,6 +294,7 @@
 < reg_file_data_sampling
 < remarks
 < remote subnets
+< report exporting
 < routing
 < rss
 < rss long
@@ -506,6 +515,7 @@
 < done
 < downfall gather data sampling
 < download apple profile
+< download report
 < drop hostile
 < drop spoofed martians
 < duration
@@ -576,6 +586,7 @@
 < fwhost newlocationgrp
 < fwhost wg peers
 < fw red
+< generate pdf report for
 < generate ptr
 < guaranteed bandwidth
 < guardian
@@ -812,6 +823,7 @@
 < release
 < remarks
 < remote subnets
+< report exporting
 < required
 < required field
 < retbleed
@@ -1164,6 +1176,7 @@
 < done
 < downfall gather data sampling
 < download apple profile
+< download report
 < download tls-auth key
 < drop hostile
 < drop outgoing
@@ -1237,6 +1250,7 @@
 < fwhost newlocationgrp
 < fwhost wg peers
 < fw red
+< generate pdf report for
 < generate ptr
 < guardian
 < hardware vulnerabilities
@@ -1490,6 +1504,7 @@
 < reiserfs warning2
 < remarks
 < remote subnets
+< report exporting
 < required
 < required field
 < retbleed
@@ -1919,6 +1934,7 @@
 < downfall gather data sampling
 < downlink
 < download apple profile
+< download report
 < download tls-auth key
 < dpd delay
 < dpd timeout
@@ -2198,6 +2214,7 @@
 < fw settings dropdown
 < fw settings remark
 < fw settings ruletable
+< generate pdf report for
 < generate ptr
 < grouptype
 < guardian
@@ -2509,6 +2526,7 @@
 < release
 < remarks
 < remote subnets
+< report exporting
 < required
 < required field
 < retbleed
@@ -3046,6 +3064,7 @@
 < downfall gather data sampling
 < downlink
 < download apple profile
+< download report
 < download tls-auth key
 < dpd delay
 < dpd timeout
@@ -3327,6 +3346,7 @@
 < fw settings dropdown
 < fw settings remark
 < fw settings ruletable
+< generate pdf report for
 < generate ptr
 < grouptype
 < guardian
@@ -3639,6 +3659,7 @@
 < release
 < remarks
 < remote subnets
+< report exporting
 < required
 < required field
 < retbleed
@@ -4025,6 +4046,7 @@
 < done
 < downfall gather data sampling
 < download apple profile
+< download report
 < drop hostile
 < drop spoofed martians
 < duration
@@ -4054,6 +4076,7 @@
 < fwhost invalid country code
 < fwhost wg peers
 < fw red
+< generate pdf report for
 < generate ptr
 < hardware vulnerabilities
 < hostile networks in
@@ -4251,6 +4274,7 @@
 < release
 < remarks
 < remote subnets
+< report exporting
 < required
 < retbleed
 < routing
@@ -4406,7 +4430,9 @@
 < Captive wrong type
 < CHACHA20-POLY1305
 < dns servers
+< download report
 < fwhost invalid country code
+< generate pdf report for
 < guaranteed bandwidth
 < ids all including informational
 < ids email alerts
@@ -4455,6 +4481,7 @@
 < pakfire remove package
 < pakfire updating
 < password has quotation mark
+< report exporting
 < rss
 < rss long
 < transient sheduler attacks
@@ -4470,7 +4497,9 @@
 < Captive wrong type
 < CHACHA20-POLY1305
 < dns servers
+< download report
 < fwhost invalid country code
+< generate pdf report for
 < guaranteed bandwidth
 < ids all including informational
 < ids email alerts
@@ -4519,6 +4548,7 @@
 < pakfire remove package
 < pakfire updating
 < password has quotation mark
+< report exporting
 < rss
 < rss long
 < transient sheduler attacks
diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat
index 7991e3936..deebced21 100644
--- a/html/cgi-bin/logs.cgi/ids.dat
+++ b/html/cgi-bin/logs.cgi/ids.dat
@@ -18,6 +18,9 @@ use strict;
 #use warnings;
 #use CGI::Carp 'fatalsToBrowser';
 
+# Path where the suricata-report-generator binary lives.
+my $report_generator_binary = "/usr/bin/suricata-report-generator";
+
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
@@ -193,6 +196,48 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'export'})
 	exit;
 }
 
+if ($cgiparams{'ACTION'} eq "$Lang::tr{'download report'}") {
+	# Array which contains the report-generator command and it's arguments.
+	my @report_cmd = ("$report_generator_binary", "--output=-");
+
+	# Filename for the generated report.
+	my $filename = "suricata-report";
+	my $file_extension = "pdf";
+
+	# Assign easy to access variables.
+	my $day = $cgiparams{'DAY'};
+	my $month = $cgiparams{'MONTH'} + 1;
+	my $year = $year;
+
+	# Calculate the year value.
+	#
+	# Check if the given day and/or month is different from today.
+	if (($day ne $now[3]) || ($month ne $now[4])) {
+		# Check if the given date is in the future.
+		if (($month eq $now[4]) && ($day > $now[3]) || ($month > $now[4] )) {
+			# Assume we are looking for data from the past year.
+			$year = $year-1;
+		}
+	}
+
+	# Append the date
+	push(@report_cmd, "--day=$day", "--month=$month", "--year=$year");
+
+	# Check if there has been any error.
+	unless ($errormessage) {
+		# Call the suricata-report-generator binary and return it's output.
+		my @report = &General::system_output(@report_cmd);
+
+		# Send addition HTTP headers to the client and the generated report.
+		print "Content-Type:application/x-download\n";
+		print "Content-Disposition:attachment;filename=$filename.$file_extension\n\n";
+		print @report;
+
+		# Exit gracefully.
+		exit (0);
+	}
+}
+
 &Header::showhttpheaders();
 
 &Header::openpage($Lang::tr{'ids log viewer'}, 1, '');
@@ -227,7 +272,7 @@ print <<END
 	</select>
 	</td>
 	<td width='10%' class='base' align='right'>&nbsp;$Lang::tr{'day'}:&nbsp;</td>
-	<td width='40%'>
+	<td width='30%'>
 	<select name='DAY'>
 END
 ;
@@ -245,6 +290,7 @@ print <<END
         <td width='5%' align='center'><input type='submit' name='ACTION' title='$Lang::tr{'day after'}' value='&gt;&gt;' /></td>
 	<td width='10%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'update'}' /></td>
 	<td width='10%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'export'}' /></td>
+	<td width='10%' align='center'><input type='submit' name='ACTION' value='$Lang::tr{'download report'}' /></td>
 </tr>
 </table>
 </form>
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 09a63b535..00bf427a0 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -898,6 +898,7 @@
 'download host certificate' => 'Host-Zertifikat herunterladen',
 'download new ruleset' => 'Neuen Regelsatz herunterladen',
 'download pkcs12 file' => 'PKCS12-Datei herunterladen',
+'download report' => 'Report herunterladen',
 'download root certificate' => 'Root-Zertifikat herunterladen',
 'download tls-auth key' => 'tls-auth Key herunterladen',
 'dpd action' => 'Aktion für Erkennung toter Gegenstellen (Dead Peer Detection)',
@@ -1326,7 +1327,6 @@
 'generate tripwire keys and init' => 'Tripwire Initalisierung',
 'generatekeys' => 'Neue Schlüssel erzeugen',
 'generatepolicy' => 'Neue Policy erstellen',
-'generatereport' => 'Neuen Report erstellen',
 'generating the root and host certificates may take a long time. it can take up to several minutes on older hardware. please be patient' => 'Die Erzeugung der Root- und Host-Zertifikate kann eine Weile dauern.  Auf älterer Hardware kann dies mehrere Minuten in Anspruch nehmen. Bitte haben Sie etwas Geduld.',
 'genkey' => 'PSK erzeugen',
 'genre' => 'Genre',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 02a088600..8b7cfb7de 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -947,6 +947,7 @@
 'download host certificate' => 'Download host certificate',
 'download new ruleset' => 'Download new ruleset',
 'download pkcs12 file' => 'Download PKCS12 file',
+'download report' => 'Download Report',
 'download root certificate' => 'Download root certificate',
 'download tls-auth key' => 'Download tls-auth key',
 'dpd action' => 'Action',
@@ -1376,6 +1377,7 @@
 'generate' => 'Generate root/host zertifikate',
 'generate a certificate' => 'Generate a certificate:',
 'generate iso' => 'Generate ISO',
+'generate pdf report for' => 'Generate PDF report for:',
 'generate ptr' => 'Generate PTR',
 'generate root/host certificates' => 'Generate root/host certificates',
 'generate tripwire keys and init' => 'generate tripwire keys and init',
@@ -2303,6 +2305,7 @@
 'remove ca certificate' => 'Remove CA certificate',
 'remove x509' => 'Remove x509',
 'repeat' => 'Repeat',
+'report exporting' => 'Report exporting:',
 'reportfile' => 'Reportfile',
 'reportlevel' => 'Reportlevel',
 'requested data' => '1. Connection Settings:',
diff --git a/lfs/suricata-reporter b/lfs/suricata-reporter
index 37593699c..839eb7931 100644
--- a/lfs/suricata-reporter
+++ b/lfs/suricata-reporter
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = 0.3
+VER        = 0.4
 
 THISAPP    = suricata-reporter-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_BLAKE2 = 8e06248fadb582244b32e4bdbf68cd584e4f7048a917f4891d7c92351e5f879c5149e82d8a1c25ca14e33a954d338214b18d95bb7a92fbc87fcf9548e6dd266d
+$(DL_FILE)_BLAKE2 = cd7cf23143f09133cd590900a14e30cc02a9fb441287349c982a458e2aa8cb5b0087d55ae4c254b1d9b4b54a8ff8108b380c93119cccf3ae54cf4d8214023430
 
 install : $(TARGET)
 


hooks/post-receive
--
IPFire 2.x development tree


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-07 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-07 15:10 [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 1081a699c68ba4d2aa39aee21607767208565382 Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox