From patchwork Wed Feb 21 07:41:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller_via_Development?= X-Patchwork-Id: 1670 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 5C4A561196 for ; Tue, 20 Feb 2018 21:41:46 +0100 (CET) X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id C42B510FEF2A; Tue, 20 Feb 2018 20:41:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.ipfire.org; s=201801; t=1519159311; x=1521751311; bh=F4lyYiBwKxzhbVPzZB2IxHoZqdllXKalNFnAKFKXUR0=; h=To:Subject:Date:Message-Id:Content-Type:Cc:From:Reply-To:Sender: From:To:Cc:Date:Content-Type:Message-ID:In-Reply-To:Subject: Reply-To:Sender; b=EppsbTbjC5KxRvFYHxCSI31+xqzjxX31ZXi7TVdn5zNB4RbNZ8uBJLbTmE1x8ANH8 STuYmr3rD++YkknDXQUXmkRsFKdFfjRID9nrr+603HbfsUH20hgINGoqoD0SuqlWCY qGl2lbD11X4VUOLvaPMbKNruDozpvA9gU8tlvPhV7vY4692IjpEm46ghBeQrdg52QI m1C0QiB+SMCQvwAi//HZwtjdtBDtGpELnnndMw+1v6BQBTuPxHvfVEwcDRW4UhqYIF F+t75LzaCqLTBCuNAqIVvgiLZuG57PiXjZ1i9LoqX+gyGs1cM2ur8oJtoQCvFmOtLq y56r4thoN3rFA== X-Virus-Scanned: ClamAV at mail01.ipfire.org Received: from ubuntu.stflan.home (p5B39C0F9.dip0.t-ipconnect.de [91.57.192.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 8E96110FEF32; Tue, 20 Feb 2018 20:41:32 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ipfire.org; s=201801; t=1519159294; x=1521751294; bh=F4lyYiBwKxzhbVPzZB2IxHoZqdllXKalNFnAKFKXUR0=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:From:To:Cc:Date: Content-Type:Message-ID:In-Reply-To:Subject:Reply-To:Sender; b=EW81CmHsHfj8dfPmgeJ/nldVdPEwCboeiVD9jnrjiGVZ32JNhsNZOBj5IvhoU+dwZ 71kmrZ6rtsIlD+oRXFddc2DkdLbiVWhwh6iVlbslsgSApEUkl86ThpHgTikSnd0WKF /k/8YEk3bVLSzOGZWjqdLh/zOkhreT54CqDkqOwsdRtUDMIifthOggOsjeGYofpdYX 96Rm4HdNfhIiaHyNsijMyiKEelP4xYJH770v6GVbdhFyZRK4GlJgPjHgzyO9qKQKv9 6hVv6qgzR77K61D9V5ih19OzgA9QJY7BHJIqmetJdVhWHooAyaRnYWXM45hzx3LHr4 DPdz7nbP/DTRg== To: development@lists.ipfire.org Subject: [PATCH] WIO: Update to Version 1.3.2 several changes in many files Date: Tue, 20 Feb 2018 21:41:13 +0100 Message-Id: <1519159273-15518-1-git-send-email-sfeddersen@ipfire.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: Stephan Feddersen X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stephan Feddersen via Development From: =?utf-8?q?Peter_M=C3=BCller_via_Development?= Reply-To: Stephan Feddersen Errors-To: development-bounces@lists.ipfire.org Sender: "Development" --- lfs/wio | 4 +- src/misc-progs/wiohelper.c | 2 +- src/wio/lang/wio.de.pl | 48 +++++++------- src/wio/lang/wio.en.pl | 112 ++++++++++++++++---------------- src/wio/main/wio.pl | 4 +- src/wio/main/wiovpn.pl | 59 ++++++++--------- src/wio/wio-graphs.pl | 4 +- src/wio/wio-lib.pl | 4 +- src/wio/wio.cgi | 157 +++++++++++++++++++++++++++++++-------------- src/wio/wiographs.cgi | 4 +- 10 files changed, 228 insertions(+), 170 deletions(-) diff --git a/lfs/wio b/lfs/wio index d70b12b..9ae11b8 100644 --- a/lfs/wio +++ b/lfs/wio @@ -9,13 +9,13 @@ include Config -VER = 1.3.1 +VER = 1.3.2 THISAPP = wio-$(VER) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = wio -PAK_VER = 3 +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/src/misc-progs/wiohelper.c b/src/misc-progs/wiohelper.c index 0f7fd86..a1e0168 100644 --- a/src/misc-progs/wiohelper.c +++ b/src/misc-progs/wiohelper.c @@ -8,7 +8,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IPFire.org - A linux based firewall - * Copyright (C) 2017 Stephan Feddersen + * Copyright (C) 2017-2018 Stephan Feddersen * * All Rights Reserved. * diff --git a/src/wio/lang/wio.de.pl b/src/wio/lang/wio.de.pl index fd82ff0..a71aefc 100644 --- a/src/wio/lang/wio.de.pl +++ b/src/wio/lang/wio.de.pl @@ -1,7 +1,7 @@ %tr = (%tr, 'wio' => 'Who Is Online?', 'wio stat' => 'Status:', -'wio checked' => 'zuletzt überprüft', +'wio checked' => 'Zuletzt überprüft', 'wio name' => 'Hostname / FQDN', 'wio ipadress' => 'IP-Adresse', 'wio image' => 'Zustand', @@ -12,21 +12,21 @@ 'wio_import_csv' => 'CSV Datei', 'wio_import_hosts' => 'Hosts Datei (var/ipfire/main/hosts)', 'wio_import_data' => 'Einstellungen für ', -'wio_import_data1' => ' bearbeiten:', -'wio_import_data2' => ' importieren:', +'wio_import_data1' => ' Bearbeiten:', +'wio_import_data2' => ' Importieren:', 'wio_import' => 'Importieren', 'wio_import_info' => 'Mitteilung:', 'wio_import_file' => 'Client(s) importieren aus:', 'wio_import_info_csv' => 'Es gibt keine neuen Einstellungen zu importieren!', 'wio settings' => 'Konfiguration:', -'wio enabled' => 'aktivieren?', +'wio enabled' => 'Aktivieren?', 'wio min' => 'Minute(n)', 'wio cron' => 'Zeitintervall für die Überprüfung:', 'wio_ovpn_cron' => 'Zeitintervall für die Überprüfung des OpenVPN RW und IPSec Status:', -'wio_save' => 'speichern', +'wio_save' => 'Speichern', 'wio_error' => 'Fehlermeldung:', 'wio_info' => 'Meldung:', -'wio_back' => 'zurück', +'wio_back' => 'Zurück', 'wio_use' => 'Diese Einstellungen importieren?', 'wio_ip_error' => 'Ungültige IP-Adresse!', 'wio_host_error' => 'Ungültiger Hostname!', @@ -34,7 +34,7 @@ 'wio_host_empty' => 'Es wurde kein Hostname eingetragen!', 'wio_ip_exists' => 'IP-Adresse wird schon benutzt!', 'wio_ip_empty' => 'Es wurde keine IP-Adresse eingetragen!', -'wio_import_fixleases' => 'DHCP Datei (var/ipfire/dhcp/fixleases)', +'wio_import_fixleases' => 'DHCP-Datei (var/ipfire/dhcp/fixleases)', 'wio_import_leases' => 'Einstellungen importieren:', 'wio network' => 'Netzwerk', 'wio_refresh' => 'alle Clients aktualisieren', @@ -60,7 +60,7 @@ 'wio_edit_settings' => 'Client hinzufügen:', 'wio_edit_client' => 'Client bearbeiten:', 'wio_graphs' => 'Graphen anzeigen', -'wio_no_graphs' => 'keine Graphen vorhanden', +'wio_no_graphs' => 'Keine Graphen vorhanden', 'wio_graphs_stat' => 'Diagramme für', 'wio_vpn_con' => 'VPN - Verbindung(en):', 'wio_wan_con' => 'WAN - Verbindung:', @@ -74,13 +74,13 @@ 'wio_net_scan_green' => 'grünes', 'wio_net_scan_blue' => 'blaues', 'wio_net_scan_orange' => 'oranges', -'wio_net_scan_run' => 'starten', -'wio_sort_host' => 'nach Hostnamen (FQDN) sortieren', -'wio_sort_ip' => 'nach IP Adressen sortieren', +'wio_net_scan_run' => 'Starten', +'wio_sort_host' => 'Nach Hostnamen (FQDN) sortieren', +'wio_sort_ip' => 'Nach IP Adressen sortieren', 'wio_logging' => 'Logging (/var/log/messages) aktivieren?', 'wio_no_image' => 'KEIN STATUS', 'wio_ovpn_con' => 'OpenVPN - Verbindung(en):', -'wio_ovpn_connected' => 'verbunden seit', +'wio_ovpn_connected' => 'Verbunden seit', 'wio_wan_up' => 'VERBUNDEN', 'wio_wan_down' => 'GETRENNT', 'wio_n2n' => 'Netz-zu-Netz Verbindung', @@ -96,17 +96,17 @@ 'wio_hwaddress' => 'HW-Adresse', 'wio_iface' => 'Schnittstelle', 'wio_client_enable' => 'Client aktivieren?', -'wio_ping_send' => 'überprüfen per', +'wio_ping_send' => 'Überprüfen per', 'wio_link_open' => 'Link öffnen per', 'enable disable client' => 'Client aktivieren oder deaktivieren', 'wio_client_on' => 'Überwachung aktiviert (klicken, um zu deaktivieren)', 'wio_client_off' => 'Überwachung deaktiviert (klicken, um zu aktivieren)', 'wio_webinterface' => 'LINK', 'wio_webinterface_link' => 'Link öffnen', -'wio_ip' => 'überprüfen per IP aktiviert', -'wio_fqdn' => 'überprüfen per FQDN aktiviert', -'wio_ip_on' => 'überprüfen per IP aktiviert (klicken, um per FQDN zu aktivieren)', -'wio_fqdn_on' => 'überprüfen per FQDN aktiviert (klicken, um per IP zu aktivieren)', +'wio_ip' => 'Überprüfen per IP aktiviert', +'wio_fqdn' => 'Überprüfen per FQDN aktiviert', +'wio_ip_on' => 'Überprüfen per IP aktiviert (klicken, um per FQDN zu aktivieren)', +'wio_fqdn_on' => 'Überprüfen per FQDN aktiviert (klicken, um per IP zu aktivieren)', 'wio_client_add' => 'Eingaben anwenden', 'wio_config' => 'Client(s) konfigurieren:', 'wio_settings_msg' => 'Einstellungen bearbeiten:', @@ -117,8 +117,8 @@ 'wio_add' => 'Client hinzufügen:', 'wio_no_add' => 'Client ist vorhanden', 'wio_id' => '#', -'wio_online' => 'online', -'wio_offline' => 'offline', +'wio_online' => 'Online', +'wio_offline' => 'Offline', 'wio_status' => 'WIO Client-Status', 'wio_mail_style' => 'WIO Client Statusmails versenden als', 'wio_mail_smail' => 'Sammelmail', @@ -127,13 +127,13 @@ 'wio_edit_set' => 'Konfiguration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP ermittelt und eingetragen!', -'wio_remove_all' => 'alle Clients löschen', +'wio_remove_all' => 'Alle Clients löschen', 'wio_remove_all_hint' => 'Möchten Sie wirklich alle Clients löschen?', 'wio_remove_client' => 'Client löschen', 'wio_remove_client_hint' => 'Möchten Sie den Client wirklich löschen?', 'wio_arp_table_entries' => 'Client aus der ARP-Tabelle hinzufügen:', -'wio_activ' => 'aktiv', -'wio_check' => 'prüfen', +'wio_activ' => 'Aktiv', +'wio_check' => 'Prüfen', 'wio_common_name' => 'Remote Host / IP', 'wio_msg_left' => 'Das', 'wio_msg_green' => 'grüne', @@ -142,7 +142,7 @@ 'wio_msg_center' => 'Netzwerk an', 'wio_msg_right' => 'wird durchsucht.', 'wio_msg_hint' => 'Einen Moment bitte ...', -'wio_last_update' => 'zuletzt aktualisiert', +'wio_last_update' => 'Zuletzt aktualisiert', 'wio_disable_hint' => 'Achtung! Es werden alle Einstellungen incl. der zu überprüfenden Clients zurückgesetzt!', 'wio_clientremark' => 'Anmerkung anzeigen?', 'wio_already_running' => 'Die Prüfung wird bereits durchgeführt!', @@ -154,4 +154,6 @@ 'wio_answer' => 'Antwort', 'wio_answer_time' => 'Antwortzeit', 'wio_scriptruntime' => 'Scriptlaufzeit', +'wio_show_table_off' => 'Tabelle ausblenden', +'wio_show_table_on' => 'Tabelle einblenden', ); diff --git a/src/wio/lang/wio.en.pl b/src/wio/lang/wio.en.pl index 52793b9..f981eee 100644 --- a/src/wio/lang/wio.en.pl +++ b/src/wio/lang/wio.en.pl @@ -10,8 +10,8 @@ 'wio err' => 'Error', 'wio warn' => 'Warning', 'wio_import_csv' => 'CSV file:', -'wio_import_hosts' => 'hosts configuration (var/ipfire/main/hosts) ?', -'wio_import_data' => 'import settings for ', +'wio_import_hosts' => 'Hosts configuration (var/ipfire/main/hosts)?', +'wio_import_data' => 'Import settings for ', 'wio_import_data1' => ' correct:', 'wio_import_data2' => ' import:', 'wio_import' => 'Importing', @@ -19,7 +19,7 @@ 'wio_import_file' => 'Import settings from:', 'wio_import_info_csv' => 'There are no new settings to import!', 'wio settings' => 'configuration:', -'wio enabled' => 'enable ?', +'wio enabled' => 'Enable?', 'wio min' => 'Minute(s)', 'wio cron' => 'Time interval for checking:', 'wio_ovpn_cron' => 'Time interval for checking the OpenVPN RW and IPSec Status:', @@ -34,12 +34,12 @@ 'wio_host_empty' => 'No Hostname was registered!', 'wio_ip_exists' => 'IP Address is already used.', 'wio_ip_empty' => 'No IP Address was registered!', -'wio_import_fixleases' => 'DHCP configuration (var/ipfire/dhcp/fixleases) ?', +'wio_import_fixleases' => 'DHCP configuration (var/ipfire/dhcp/fixleases)?', 'wio_import_leases' => 'Import settings:', 'wio network' => 'Network', -'wio_refresh' => 'update all clients now', +'wio_refresh' => 'Update all clients now', 'wio_fqdn_error' => 'Invalid Fully Qualified Domain Name (FQDN)! Please do not use special characters or blanks in the FQDN.', -'wio_edit' => 'change settings:', +'wio_edit' => 'Change settings:', 'wio_dyndns' => 'DynDNS', 'wio_dyndns_hosts' => 'DynDNS Name(s)', 'wio_dyndns_refresh' => 'DynDNS Host IP update', @@ -55,85 +55,85 @@ 'wio_msg' => 'Condition of the examining Client(s) are updated ...', 'wio_lanname' => 'LAN Hostname', 'wio_wanname' => 'WAN Hostname', -'wio_wancheck' => 'connected since', -'wio_sc_refresh' => 'update client now', -'wio_edit_settings' => 'add client:', -'wio_edit_client' => 'edit client:', -'wio_graphs' => 'show graphs', -'wio_no_graphs' => 'no graphs available', -'wio_graphs_stat' => 'Diagramm for', +'wio_wancheck' => 'Connected since', +'wio_sc_refresh' => 'Update client now', +'wio_edit_settings' => 'Add client:', +'wio_edit_client' => 'Edit client:', +'wio_graphs' => 'Show graphs', +'wio_no_graphs' => 'No graphs available', +'wio_graphs_stat' => 'Diagram for', 'wio_vpn_con' => 'VPN - Connection(s):', 'wio_wan_con' => 'WAN - Connection:', 'wio_clients' => 'clients:', 'wio click to disable' => 'Activated', 'wio click to enable' => 'Deactivated', -'wio_net_scan' => 'Scan Network(s):', -'wio_net_scan_vl' => 'scan', -'wio_net_scan_l' => 'Network on', +'wio_net_scan' => 'Scan network(s):', +'wio_net_scan_vl' => 'Scan', +'wio_net_scan_l' => 'network on', 'wio_net_scan_r' => '', 'wio_net_scan_green' => 'green', 'wio_net_scan_blue' => 'blue', 'wio_net_scan_orange' => 'orange', -'wio_net_scan_run' => 'start', -'wio_sort_host' => 'sort Hostnames (FQDN)', -'wio_sort_ip' => 'sort IP-Adresses', -'wio_logging' => 'activate Logging (/var/log/messages) ?', +'wio_net_scan_run' => 'Start', +'wio_sort_host' => 'Sort Hostnames (FQDN)', +'wio_sort_ip' => 'Sort IP-Adresses', +'wio_logging' => 'Activate logging (/var/log/messages)?', 'wio_no_image' => 'NO STATUS', 'wio_ovpn_con' => 'OpenVPN - Connection(s):', -'wio_ovpn_connected' => 'connected since', +'wio_ovpn_connected' => 'Connected since', 'wio_wan_up' => 'CONNECTED', 'wio_wan_down' => 'NOT CONNECTED', 'wio_n2n' => 'Net-to-Net Connection', 'wio_rw' => 'Host-to-Net Connection', -'wio_mailremark_enabled' => 'Add Remark from client to mailbody ?', -'wio_mail_online_on' => 'online email enabled (click to disable)', -'wio_mail_online_off' => 'online email disabled (click to enable)', -'wio_mail_offline_on' => 'offline email enabled (click to disable)', -'wio_mail_offline_off' => 'offline emaildisabled (click to enable)', -'wio_mail_online' => 'enable or disable online email', -'wio_mail_offline' => 'enable or disable offline email', -'wio_sendemail' => 'send email', +'wio_mailremark_enabled' => 'Add Remark from client to mailbody?', +'wio_mail_online_on' => 'Online email enabled (click to disable)', +'wio_mail_online_off' => 'Online email disabled (click to enable)', +'wio_mail_offline_on' => 'Offline email enabled (click to disable)', +'wio_mail_offline_off' => 'Offline emaildisabled (click to enable)', +'wio_mail_online' => 'Enable or disable online email', +'wio_mail_offline' => 'Enable or disable offline email', +'wio_sendemail' => 'Send email', 'wio_hwaddress' => 'HW-Adresse', 'wio_iface' => 'Interface', -'wio_client_enable' => 'enable Host ?', -'wio_ping_send' => 'send ping to', -'wio_link_open' => 'open link via', -'enable disable client' => 'enable or disable client', +'wio_client_enable' => 'Enable Host?', +'wio_ping_send' => 'Send ping to', +'wio_link_open' => 'Open link via', +'enable disable client' => 'Enable or disable client', 'wio_client_on' => 'Client enabled (click to disable)', 'wio_client_off' => 'Client disabled (click to enable)', 'wio_webinterface' => 'LINK', -'wio_webinterface_link' => 'follow link', -'wio_ip' => 'send ping to IP enabled', -'wio_fqdn' => 'send ping to FQDN enabled', -'wio_ip_on' => 'send ping to IP enabled (click to enable FQDN)', -'wio_fqdn_on' => 'send ping to FQDN enabled (click to enable IP)', -'wio_client_add' => 'use settings', -'wio_config' => 'configurate Client(s):', -'wio_settings_msg' => 'configurate settings:', +'wio_webinterface_link' => 'Follow link', +'wio_ip' => 'Send ping to IP enabled', +'wio_fqdn' => 'Send ping to FQDN enabled', +'wio_ip_on' => 'Send ping to IP enabled (click to enable FQDN)', +'wio_fqdn_on' => 'Send ping to FQDN enabled (click to enable IP)', +'wio_client_add' => 'Use settings', +'wio_config' => 'Configurate Client(s):', +'wio_settings_msg' => 'Configurate settings:', 'wio_settings_msg_hint' => 'Here you have to set some values to get the addon started.', 'wio_sub' => 'WIO Client-Status-Mail', 'wio timeout' => 'Ping Timeout:', 'wio sec' => 'Second(s)', -'wio_add' => 'add Client:', +'wio_add' => 'Add Client:', 'wio_no_add' => 'Client is available', 'wio_id' => '#', -'wio_online' => 'online', -'wio_offline' => 'offline', +'wio_online' => 'Online', +'wio_offline' => 'Offline', 'wio_status' => 'WIO Client-Status', -'wio_mail_style' => 'send WIO Client Statusmails as', -'wio_mail_smail' => 'collected mail', -'wio_mail_email' => 'single mails', -'wio_mail_ovpnrw' => 'enable OpenVPN RW and IPSec Statusmails ?', +'wio_mail_style' => 'Send WIO client statusmails as', +'wio_mail_smail' => 'Collected mail', +'wio_mail_email' => 'Single mails', +'wio_mail_ovpnrw' => 'Enable OpenVPN RW and IPSec Statusmails?', 'wio_edit_set' => 'Configuration', 'wio_service' => 'Service:', 'wio_dyndns_success' => 'DynDNS IP identified and registered!', -'wio_remove_all' => 'remove all clients', +'wio_remove_all' => 'Remove all clients', 'wio_remove_all_hint' => 'Are you sure to delete all the clients?', -'wio_remove_client' => 'remove client', +'wio_remove_client' => 'Remove client', 'wio_remove_client_hint' => 'Are you sure to delete the client?', -'wio_arp_table_entries' => 'add client from ARP-Table:', -'wio_activ' => 'activ', -'wio_check' => 'check', +'wio_arp_table_entries' => 'Add client from ARP-Table:', +'wio_activ' => 'Activ', +'wio_check' => 'Check', 'wio_common_name' => 'Remote Host/IP', 'wio_msg_left' => 'Searching on the', 'wio_msg_green' => 'green', @@ -142,9 +142,9 @@ 'wio_msg_center' => 'Interface on', 'wio_msg_right' => 'is being examined.', 'wio_msg_hint' => 'One moment please ...', -'wio_last_update' => 'last update', +'wio_last_update' => 'Last update', 'wio_disable_hint' => 'Attention! It will reset all settings including the client to be checked!', -'wio_clientremark' => 'show remark?', +'wio_clientremark' => 'Show remark?', 'wio_already_running' => 'This check is already running!', 'wio_error_function' => 'This function is temporarily unavailable, because in the background client states are being updated (active/inactive).', 'wio_shutdown' => 'Shutdown when all clients are "offline"?', @@ -154,4 +154,6 @@ 'wio_answer' => 'Answer', 'wio_answer_time' => 'Response Time', 'wio_scriptruntime' => 'Script Execution Time', +'wio_show_table_off' => 'Show table', +'wio_show_table_on' => 'Hide table', ); diff --git a/src/wio/main/wio.pl b/src/wio/main/wio.pl index 985900d..b846fea 100644 --- a/src/wio/main/wio.pl +++ b/src/wio/main/wio.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/08/04 18:55:23 # # This wio.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/main/wiovpn.pl b/src/wio/main/wiovpn.pl index f22bd7a..c4c6b57 100644 --- a/src/wio/main/wiovpn.pl +++ b/src/wio/main/wiovpn.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wioovpn.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2018/01/05 12:32:23 # # This wioovpn.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -93,8 +93,7 @@ else { close (FILE); } -foreach (@ovpncfg) -{ +foreach (@ovpncfg) { chomp; if ( $_ =~ "server" ) { next; } @@ -106,8 +105,7 @@ foreach (@ovpncfg) unless ( grep (/$name/, @ovpncache) ) { push (@ovpncache, "$name,$remark,$status\n"); } } -foreach (@ovpncache) -{ +foreach (@ovpncache) { chomp; ( $name, $remark, $status ) = split (/\,/, $_); @@ -115,18 +113,16 @@ foreach (@ovpncache) if ( grep (/,$name,/, @ovpncfg) ) { push (@ovpnarray, "$name,$remark,$status\n"); } } -foreach (@ovpnarray) -{ +foreach (@ovpnarray) { chomp; + ( $name, $remark, $status ) = split (/\,/, $_); if ( $name =~ m/_/ ) { $nameul = $name; } else { ($nameul = $name) =~ s/ /_/g; } - if ( grep (/$name/, @ovpnstatus) || grep (/$nameul/, @ovpnstatus) ) - { - foreach (@ovpnstatus) - { + if ( grep (/$name/, @ovpnstatus) || grep (/$nameul/, @ovpnstatus) ) { + foreach (@ovpnstatus) { chomp; if ( $_ =~ "ROUTING TABLE" ) { last; } @@ -151,8 +147,7 @@ foreach (@ovpnarray) if ( $nameul eq $ovpnclt || $name eq $ovpnclt ) { push (@ovpnwrite, "$name,$remark,$status\n"); } - if ( $togglestat == 1 && ($name eq $ovpnclt || $nameul eq $ovpnclt) ) - { + if ( $togglestat == 1 && ($name eq $ovpnclt || $nameul eq $ovpnclt) ) { $ovpnmailsub = "WIO OVPN - $name - $ovpnrwstatus - $now"; $logmsg = "Client: WIO OVPN $name - IP: $ovpncltip - Status: $ovpnrwstatus"; $ovpnmailmsg = "Client : $name\nLogin : $ovpnrwlogin\nIP : $ovpncltip\nStatus : $ovpnrwstatus\n"; @@ -177,11 +172,10 @@ foreach (@ovpnarray) $logmsg = "Client: WIO OVPN $name - Status: $ovpnrwstatus"; $ovpnmailmsg = "Client : $name\nLogout : $now\nStatus : $ovpnrwstatus\n"; - if ( $mailremark eq 'on' ) { - $ovpnmailmsg .= "Remark : $remark\n\n"; - } + if ( $mailremark eq 'on' ) { $ovpnmailmsg .= "Remark : $remark\n\n"; } &WIO::mailsender($ovpnmailsub, $ovpnmailmsg); + if ( $logging eq 'on' ) { &General::log("wio","$logmsg"); } undef ($ovpnmailsub); undef ($ovpnmailmsg); @@ -220,11 +214,10 @@ else { close (FILE); } -foreach (@vpncfg) -{ +foreach (@vpncfg) { chomp; - ( $activ, $name, $remark ) = (split (/\,/, $_))[1, 2, 25]; + ( $activ, $name, $remark ) = (split (/\,/, $_))[1, 2, 26]; if ( $remark eq 'off' ) { $remark = '-'; } @@ -235,8 +228,7 @@ foreach (@vpncfg) unless ( grep (/$name/, @vpncache) ) { push (@vpncache, "$name,$remark,$status\n"); } } -foreach (@vpncache) -{ +foreach (@vpncache) { chomp; ( $name, $remark, $status ) = split (/\,/, $_); @@ -244,14 +236,12 @@ foreach (@vpncache) if ( grep (/,$name,/, @vpncfg) ) { push (@vpnarray, "$name,$remark,$status\n"); } } -foreach (@vpnarray) -{ +foreach (@vpnarray) { chomp; ( $name, $remark, $status ) = split (/\,/, $_); - if ( grep (/$name\{.*INSTALLED/ , @vpnstatus) ) - { + if ( grep (/$name\{.*INSTALLED/ , @vpnstatus) ) { $vpnrwstatus = "$Lang::tr{'wio up'}"; $togglestat = ( $status ne 'on' ) ? 1 : 0; $status = 'on'; @@ -264,21 +254,24 @@ foreach (@vpnarray) push (@vpnwrite, "$name,$remark,$status\n"); - if ( $togglestat == 1 ) - { + if ( $togglestat == 1 ) { $vpnmailsub = "WIO VPN - $name - $vpnrwstatus - $now"; $logmsg = "Client: WIO VPN $name - Status: $vpnrwstatus $now"; + $vpnmailmsg = "Client : $name\n"; - if ( $mailremark eq 'on' ) { - if ( $status eq 'on' ) { $vpnmailmsg = "Client : $name\nLogin : $now\nStatus : $vpnrwstatus\nRemark : $remark\n"; } - else { $vpnmailmsg = "Client : $name\nLogout : $now\nStatus : $vpnrwstatus\nRemark : $remark\n"; } + if ( $status eq 'on' ) { + $vpnmailmsg .= "Login : $now\n"; } else { - if ( $status eq 'on' ) { $vpnmailmsg = "Client : $name\nLogin : $now\nStatus : $vpnrwstatus\n"; } - else { $vpnmailmsg = "Client : $name\nLogout : $now\nStatus : $vpnrwstatus\n"; } + $vpnmailmsg .= "Logout : $now\n"; } + $vpnmailmsg .= "Status : $vpnrwstatus\n"; + + if ( $mailremark eq 'on' ) { $vpnmailmsg .= "Remark : $remark\n\n"; } + &WIO::mailsender($vpnmailsub, $vpnmailmsg); + if ( $logging eq 'on' ) { &General::log("wio","$logmsg"); } undef ($vpnmailsub); undef ($vpnmailmsg); diff --git a/src/wio/wio-graphs.pl b/src/wio/wio-graphs.pl index a5a58b4..af5c520 100644 --- a/src/wio/wio-graphs.pl +++ b/src/wio/wio-graphs.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio-graphs.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/07/11 21:32:23 # # This wio-graphs.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/wio-lib.pl b/src/wio/wio-lib.pl index 2f23c1d..bbaf0bf 100644 --- a/src/wio/wio-lib.pl +++ b/src/wio/wio-lib.pl @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio-lib.pl, v1.3.1 2017/07/11 21:31:16 sfeddersen +# Version: 2017/07/11 21:32:23 # # This wio-lib.pl is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 4fbf34a..8c43b04 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wio.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen +# Version: 2018/01/05 14:34:23 # # This wio.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. @@ -105,6 +105,10 @@ my $nr = 0; my $count = 0; my $showcount = 0; +my $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; +my $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; +my $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; + my ( $infomessage, $errormessage, $importmessage, $message ) = ''; my ( $buttontext, $host, $timestamp, $ipadr, $on, $remark, $dyndns, $dyndnsip, $sendemailon, $net, $dev, $iprange, $output, $write, $webinterface, @@ -153,6 +157,9 @@ $wiosettings{'MAILREMARK'} = 'off'; $wiosettings{'MAILSTYLE'} = 'email'; $wiosettings{'OVPNRWMAIL'} = 'off'; $wiosettings{'SHUTDOWN'} = 'off'; +$wiosettings{'WIOGUISHOWARPTABLE'} = ''; +$wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = ''; +$wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = ''; &Header::getcgihash(\%wiosettings); &Header::getcgihash(\%mainsettings); @@ -219,7 +226,6 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_save'}.'2' ) { $wiosettings{'SENDEMAILOFF'} = $wiosettings{"SENDEMAILOFF$count"}; $wiosettings{'PINGMETHODE'} = $wiosettings{"PINGMETHODE$count"}; $wiosettings{'ONLINE'} = $wiosettings{"ONLINE$count"}; - $wiosettings{'WEBINTERFACE'} = $wiosettings{"WEBINTERFACE$count"}; &validSave(); @@ -272,6 +278,45 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'} ) { } } +## show / hide arptable + +if ($wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable') { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'off'; + $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'on'; + $arpbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + +## show / hide clientimporttable + +if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'clientimport' ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'off'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'on'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + +## show / hide networksearchtable + +if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'networksearch' ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } +} + ## add arp client if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_add'} ) { @@ -376,6 +421,7 @@ exit 0; } else { $infomessage = "$Lang::tr{'wio_already_running'}"; + unlink($onoffip); } } @@ -842,7 +888,7 @@ if ( $debug ) { print"infomessage: $infomessage
\n"; &hrline(); - + my $wiodebug = 0; foreach (sort keys %wiosettings) { print"$_ = $wiosettings{$_}
\n"; @@ -881,9 +927,9 @@ print"
- + - + @@ -953,7 +999,6 @@ print" - "; if ( $wiosettings{'SENDEMAIL'} eq 'on' ) { @@ -1062,9 +1107,9 @@ if ( $wiosettings{'ENABLE'} eq 'on') { print"
 $Lang::tr{'wio_settings_msg'} $Lang::tr{'wio_settings_msg'}    
 
 
- - - + + +
 $Lang::tr{'wio_wan_con'} 
 $Lang::tr{'wio_wan_con'} 
 
@@ -1137,9 +1182,9 @@ if ( -e "$vpnpid" ) { print" - - - + + +
 $Lang::tr{'wio_vpn_con'} 
 $Lang::tr{'wio_vpn_con'} 
 
@@ -1219,9 +1264,9 @@ if ( -e "$ovpnpid" ) { print" - - - + + +
 $Lang::tr{'wio_ovpn_con'} 
 $Lang::tr{'wio_ovpn_con'} 
 
@@ -1346,9 +1391,9 @@ print" print" - - - + + +
 $Lang::tr{'wio_clients'} 
 $Lang::tr{'wio_clients'} 
 
@@ -1471,29 +1516,12 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); } } - if ($netsettings{"RED_TYPE"} eq 'DHCP' || $netsettings{"RED_TYPE"} eq 'PPPOE') { - my $redipadr = qx'ip addr | grep red0 | grep inet | awk "{print \$2}"'; - my @rednet = split ("/", $redipadr); - chomp ($rednet[1]); - my $red_netmask = General::iporsubtodec($rednet[1]); - my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask"); - - if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) { - print"$Lang::tr{"; - last SWITCH; - } - else { - print"$Lang::tr{"; - last SWITCH; - } - } - if ( -e "$vpnpid" ) { foreach $key (keys(%vpnconfighash)) { next unless ($vpnconfighash{$key}[3] eq 'net'); my $convertip = &General::ipcidr2msk($vpnconfighash{$key}[11]); - + my @net = split ("/", $convertip); $vpnn2nip = $net[0]; @@ -1532,6 +1560,23 @@ my $dotip = length($ipaddresses[$a]) - rindex($ipaddresses[$a],'.'); } } + + if ($netsettings{"RED_TYPE"} eq 'DHCP' || $netsettings{"RED_TYPE"} eq 'PPPOE') { + my $redipadr = qx'ip addr | grep red0 | grep inet | awk "{print \$2}"'; + my @rednet = split ("/", $redipadr); + chomp ($rednet[1]); + my $red_netmask = General::iporsubtodec($rednet[1]); + my $red_netaddress = Network::get_netaddress("$rednet[0]/$red_netmask"); + + if ( &General::IpInSubnet($ipaddresses[$a], $red_netaddress, $red_netmask) ) { + print"$Lang::tr{"; + last SWITCH; + } + else { + print"$Lang::tr{"; + last SWITCH; + } + } } if ( $webinterface[$a] eq 'HTTP' ) { @@ -1662,8 +1707,8 @@ if (! defined($errormessage) && $wiosettings{'ACTION'} ne $Lang::tr{'edit'} ) { print" - - + + @@ -1755,13 +1800,17 @@ if ( $wiosettings{'ENABLE'} eq 'on' && !$errormessage && $wiosettings{'ACTION'} print"
 $Lang::tr{'wio_add'}  $Lang::tr{'wio_add'} 
 
- - + + -
 $Lang::tr{'wio_arp_table_entries'}  $Lang::tr{'wio_arp_table_entries'}
 
+"; + +if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'on' ) { +print" + @@ -1865,18 +1914,24 @@ $idarp++ print"
 
$Lang::tr{'wio_id'} $Lang::tr{'wio_hwaddress'}
"; +} &hrline(); print" - - + + -
 $Lang::tr{'wio_import_file'}  $Lang::tr{'wio_import_file'}
 
+"; + +if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'on' ) { + +print" + @@ -1902,16 +1957,22 @@ print"
 
$Lang::tr{'wio_import_csv'} 
"; +} &hrline; print" - - + +
 $Lang::tr{'wio_net_scan'}  $Lang::tr{'wio_net_scan'}
+"; + +if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'on' ) { + +print" @@ -1944,7 +2005,7 @@ print"
 
"; - +} &Header::closebox(); } diff --git a/src/wio/wiographs.cgi b/src/wio/wiographs.cgi index 06b6946..e1a7475 100644 --- a/src/wio/wiographs.cgi +++ b/src/wio/wiographs.cgi @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017 Stephan Feddersen # +# Copyright (C) 2017-2018 Stephan Feddersen # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,7 +21,7 @@ # # ############################################################################### # -# id: wiographs.cgi, v1.3.2 2017/08/27 14:11:16 sfeddersen +# Version: 2017/08/27 14:07:23 # # This wiographs.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire.