changed some lists to listboxes. More to come probably.
This commit is contained in:
parent
960f6f611d
commit
df6a5f1679
|
@ -188,6 +188,7 @@ if ($excel) {
|
|||
div#content_section {margin: 0 10% 0 10%;}
|
||||
div.content_subsection {margin: 0 5% 0 5%;}
|
||||
div.collapsable {display:none;}
|
||||
select {background:transparent;color:#fff;}
|
||||
table {border-collapse:collapse;border:1px solid white;}
|
||||
table.list {border:0px;}
|
||||
table#lynis_plugins_table {width:100%;}
|
||||
|
@ -338,15 +339,15 @@ END
|
|||
END
|
||||
if ((exists($lynis_report_data{'deleted_file[]'})) and ($lynis_report_data{'deleted_file[]'} ne "")) {
|
||||
if (ref($lynis_report_data{'deleted_file[]'}) eq 'ARRAY') {
|
||||
print OUT "\t\t\t\t<h4>deleted files (".scalar(@{$lynis_report_data{'deleted_file[]'}})."):</h4>\n";
|
||||
print OUT "\t\t\t\t<ul>\n";
|
||||
foreach my $f ( @{$lynis_report_data{'deleted_file[]'}} ) { print OUT "\t\t\t\t\t<li>$f</li>\n"; }
|
||||
print OUT "\t\t\t\t<h5>deleted files (".scalar(@{$lynis_report_data{'deleted_file[]'}})."):</h5>\n";
|
||||
print OUT "\t\t\t\t<select size=\"10\" name=\"lbDeletedFiles\" readonly=\"readonly\">\n";
|
||||
foreach my $f ( @{$lynis_report_data{'deleted_file[]'}} ) { print OUT "\t\t\t\t\ti<option>$f\n"; }
|
||||
} else {
|
||||
warn colored("Deleted files object not an array! \n", "yellow");
|
||||
print Dumper($lynis_report_data{'delete_file[]'});
|
||||
}
|
||||
}
|
||||
print OUT "\t\t\t\t</ul><br />\n";
|
||||
print OUT "\t\t\t\t</select><br />\n";
|
||||
if ((exists($lynis_report_data{'vulnerable_package[]'})) and ($lynis_report_data{'vulnerable_package[]'} ne "")) {
|
||||
if (ref($lynis_report_data{'vulnerable_package[]'}) eq 'ARRAY') {
|
||||
print OUT "\t\t\t\t<h4>Vulnerable packages (".scalar(@{$lynis_report_data{'vulnerable_package[]'}})."):\n";
|
||||
|
@ -414,11 +415,11 @@ END
|
|||
print OUT "\t\t\t\t\t<tr><td>Plugin-firewall iptables list:</td><td colspan=\"3\">".join("<br />\n", @{$lynis_report_data{'plugin_firewall_iptables_list'}})."</td></tr>\n";
|
||||
print OUT "\t\t\t\t</table>\n";
|
||||
if ((exists($lynis_report_data{'plugin_processes_allprocesses'})) and ($lynis_report_data{'plugin_processes_allprocesses'} ne "")) {
|
||||
print OUT "\t\t\t\t<h4>Plugin-processes: discovered processes:</h4>\n";
|
||||
print OUT "\t\t\t\t<h5>Plugin-processes: discovered processes:</h5>\n";
|
||||
if (ref($lynis_report_data{'plugin_processes_allprocesses'}) eq 'ARRAY') {
|
||||
print OUT "\t\t\t\t\t<ul>\n";
|
||||
foreach my $p ( sort @{$lynis_report_data{'plugin_processes_allprocesses'}} ) { print OUT "\t\t\t\t\t\t<li>$p</li>\n"; }
|
||||
print OUT "\t\t\t\t\t</ul>\n";
|
||||
print OUT "\t\t\t\t\t<select size=\"10\" name=\"lbPluginProcessesAllProcesses\" readonly=\"readonly\">\n";
|
||||
foreach my $p ( sort @{$lynis_report_data{'plugin_processes_allprocesses'}} ) { print OUT "\t\t\t\t\t\t<option>$p\n"; }
|
||||
print OUT "\t\t\t\t\t</select>\n";
|
||||
} else {
|
||||
warn colored("plugin processess allprocesses object not an array! \n", "yellow");
|
||||
print Dumper($lynis_report_data{'plugin_processes_allprocesses'});
|
||||
|
@ -502,12 +503,12 @@ END
|
|||
<h4>cron jobs:</h4>
|
||||
END
|
||||
if (ref($lynis_report_data{'cronjob[]'}) eq "ARRAY") {
|
||||
print OUT "\t\t\t\t\t<ul>\n";
|
||||
print OUT "\t\t\t\t\t<select size=\"10\" readonly=\"readonly\" name=\"lbCronJobs\">\n";
|
||||
foreach my $c ( @{$lynis_report_data{'cronjob[]'}} ) {
|
||||
$c =~ s/,/\t /g;
|
||||
print OUT "\t\t\t\t\t\t<li>$c</li>\n";
|
||||
print OUT "\t\t\t\t\t\t<option>$c\n";
|
||||
}
|
||||
print OUT "\t\t\t\t\t</ul>\n";
|
||||
print OUT "\t\t\t\t\t</select>\n";
|
||||
}
|
||||
print OUT <<END;
|
||||
|
||||
|
@ -522,15 +523,15 @@ END
|
|||
<h4>log directories:</h4>
|
||||
END
|
||||
if (ref($lynis_report_data{'log_directory[]'}) eq 'ARRAY') {
|
||||
print OUT "\t\t\t\t\t<ul>\n";
|
||||
foreach my $ld ( @{$lynis_report_data{'log_directory[]'}} ) { print OUT "\t\t\t\t\t\t<li>$ld</li>\n"; }
|
||||
print OUT "\t\t\t\t\t</ul>\n";
|
||||
print OUT "\t\t\t\t\t<select size=\"10\" readonly=\"readonly\" name=\"lbLogDirectories\">\n";
|
||||
foreach my $ld ( @{$lynis_report_data{'log_directory[]'}} ) { print OUT "\t\t\t\t\t\t<option>$ld\n"; }
|
||||
print OUT "\t\t\t\t\t</select>\n";
|
||||
}
|
||||
print OUT "\t\t\t\t\t<h4>open log files:</h4>\n";
|
||||
if (ref($lynis_report_data{'open_logfile[]'}) eq 'ARRAY') {
|
||||
print OUT "\t\t\t\t\t<ul>\n";
|
||||
foreach my $lf ( @{$lynis_report_data{'open_logfile[]'}} ) { print OUT "\t\t\t\t\t\t<li>$lf</li>\n"; }
|
||||
print OUT "\t\t\t\t\t</ul>\n";
|
||||
print OUT "\t\t\t\t\t<select size=\"10\" readonly=\"readonly\" name=\"blOpenLogFiles\">\n";
|
||||
foreach my $lf ( @{$lynis_report_data{'open_logfile[]'}} ) { print OUT "\t\t\t\t\t\t<option>$lf\n"; }
|
||||
print OUT "\t\t\t\t\t</select>\n";
|
||||
}
|
||||
print OUT <<END;
|
||||
</div>
|
||||
|
@ -695,10 +696,10 @@ END
|
|||
my ($name,$uid) = split(/,/, $u);
|
||||
print OUT "\t\t\t\t\t\t\t<tr><td>$name</td><td>$uid</td></tr>\n";
|
||||
}
|
||||
print OUT "\t\t\t\t\t\t</table></td><td><ul>\n";
|
||||
foreach my $d ( @{$lynis_report_data{'home_directory[]'}} ) { print OUT "\t\t\t\t\t\t\t<li>$d</li>\n"; }
|
||||
print OUT "\t\t\t\t\t\t</table></td><td><select size=\"10\" readonly=\"readonly\" name=\"lbHomeDirectories\">\n";
|
||||
foreach my $d ( @{$lynis_report_data{'home_directory[]'}} ) { print OUT "\t\t\t\t\t\t\t<option>$d\n"; }
|
||||
print OUT <<END;
|
||||
</ul></td></tr>
|
||||
</select></td></tr>
|
||||
</table>
|
||||
<h4>PAM Modules:</h4><a id="pamModLink" href="javascript:toggle('pamModLink', 'pamModToggle');">> show <</a>
|
||||
<div id="pamModToggle" style="display: none">
|
||||
|
@ -1180,7 +1181,7 @@ END
|
|||
|
||||
close OUT or die colored("There was a problem closing the output file ($output): $! \n", "bold red");
|
||||
|
||||
my @indexes = qw( lynis_version lynis_tests_done lynis_update_available license_key report_datetime_start report_datetime_end plugins_directory plugins_enabled finish report_version_major report_version_minor hostid hostid2 plugin_enabled_phase1[] hardening_index warning[] hostname domainname linux_kernel_version linux_config_file memory_size nameserver[] network_interface[] framework_grsecurity vm vmtype uptime_in_seconds linux_kernel_release os framework_selinux uptime_in_days os_fullname default_gateway[] cpu_nx cpu_pae linux_version os_version network_ipv6_address[] boot_loader suggestion[] manual manual[] linux_version cpu_pae cpu_nx network_ipv4_address[] network_mac_address[] os_name os_kernel_version os_kernel_version_full firewall_installed max_password_retry password_max_days password_min_days pam_cracklib password_strength_tested minimum_password_length package_audit_tool package_audit_tool_found vulnerable_packages_found firewall_active firewall_software[] firewall_software auth_failed_logins_logged authentication_two_factor_enabled memory_units default_gateway authentication_two_factor_required malware_scanner_installed file_integrity_tool_installed file_integrity_tool_installed pam_module[] ids_ips_tooling[] ipv6_mode ipv6_only name_cache_used ldap_pam_enabled ntp_daemon_running mysql_running ssh_daemon_running dhcp_client_running arpwatch_running running_service[] audit_daemon_running installed_packages binaries_count installed_packages_array crond_running network_listen_port[] firewall_empty_ruleset automation_tool_present automation_tool_running[] file_integrity_tool ldap_auth_enabled password_max_l_credit password_max_u_credit password_max_digital_credit password_max_other_credit loaded_kernel_module[] plugin_directory package_manager[] linux_kernel_io_scheduler[] linux_kernel_type details[] available_shell[] locate_db smtp_daemon pop3_daemon ntp_daemon imap_daemon printing_daemon boot_service[] boot_uefi_boot_secure linux_default_runlevel boot_service_tool boot_uefi_booted systemctl_exit_code min_password_class session_timeout_enabled compiler_installed real_user[] home_directory[] swap_partition[] filesystem_ext[] journal_disk_size journal_coredumps_lastday journal_oldest_bootdate journal_contains_errors swap_partition[] file_systems_ext[] test_category test_group scheduler[] journal_meta_data boot_uefi_booted_secure service_manager running_service_tool binary_paths valid_certificate[] cronjob[] log_directory[] open_logfile[] journal_bootlogs log_rotation_tool log_rotation_config_found auditor deleted_file[] vulnerable_package[] malware_scanner[] file_integrity_tool[] plugin_firewall_iptables_list linux_amount_of_kernels ntp_config_type_startup ntp_config_type_scheduled ntp_config_type_eventbased ntp_config_type_daemon ntp_config_file[] ntp_config_found ntp_version ntp_unreliable_peer[] postgresql_running linux_auditd_running linux_kernel_io_scheduler nginx_main_conf_file log_file nginx_sub_conf_file nginx_config_option ssl_tls_protocol_enabled[] systemd systemd_builtin_components systemd_version systemd_status plugin_processes_allprocesses usb_authorized_default_device[] systemd_unit_file[] systemd_unit_not_found[] systemd_service_not_found[] resolv_conf_search_domain[] expired_certificate[] compiler[] fail2ban_config fail2ban_enabled_service[] );
|
||||
my @indexes = qw( lynis_version lynis_tests_done lynis_update_available license_key report_datetime_start report_datetime_end plugins_directory plugins_enabled finish report_version_major report_version_minor hostid hostid2 plugin_enabled_phase1[] hardening_index warning[] hostname domainname linux_kernel_version linux_config_file memory_size nameserver[] network_interface[] framework_grsecurity vm vmtype uptime_in_seconds linux_kernel_release os framework_selinux uptime_in_days os_fullname default_gateway[] cpu_nx cpu_pae linux_version os_version network_ipv6_address[] boot_loader suggestion[] manual manual[] linux_version cpu_pae cpu_nx network_ipv4_address[] network_mac_address[] os_name os_kernel_version os_kernel_version_full firewall_installed max_password_retry password_max_days password_min_days pam_cracklib password_strength_tested minimum_password_length package_audit_tool package_audit_tool_found vulnerable_packages_found firewall_active firewall_software[] firewall_software auth_failed_logins_logged authentication_two_factor_enabled memory_units default_gateway authentication_two_factor_required malware_scanner_installed file_integrity_tool_installed file_integrity_tool_installed pam_module[] ids_ips_tooling[] ipv6_mode ipv6_only name_cache_used ldap_pam_enabled ntp_daemon_running mysql_running ssh_daemon_running dhcp_client_running arpwatch_running running_service[] audit_daemon_running installed_packages binaries_count installed_packages_array crond_running network_listen_port[] firewall_empty_ruleset automation_tool_present automation_tool_running[] file_integrity_tool ldap_auth_enabled password_max_l_credit password_max_u_credit password_max_digital_credit password_max_other_credit loaded_kernel_module[] plugin_directory package_manager[] linux_kernel_io_scheduler[] linux_kernel_type details[] available_shell[] locate_db smtp_daemon pop3_daemon ntp_daemon imap_daemon printing_daemon boot_service[] boot_uefi_boot_secure linux_default_runlevel boot_service_tool boot_uefi_booted systemctl_exit_code min_password_class session_timeout_enabled compiler_installed real_user[] home_directory[] swap_partition[] filesystem_ext[] journal_disk_size journal_coredumps_lastday journal_oldest_bootdate journal_contains_errors swap_partition[] file_systems_ext[] test_category test_group scheduler[] journal_meta_data boot_uefi_booted_secure service_manager running_service_tool binary_paths valid_certificate[] cronjob[] log_directory[] open_logfile[] journal_bootlogs log_rotation_tool log_rotation_config_found auditor deleted_file[] vulnerable_package[] malware_scanner[] file_integrity_tool[] plugin_firewall_iptables_list linux_amount_of_kernels ntp_config_type_startup ntp_config_type_scheduled ntp_config_type_eventbased ntp_config_type_daemon ntp_config_file[] ntp_config_found ntp_version ntp_unreliable_peer[] postgresql_running linux_auditd_running linux_kernel_io_scheduler nginx_main_conf_file log_file nginx_sub_conf_file nginx_config_option ssl_tls_protocol_enabled[] systemd systemd_builtin_components systemd_version systemd_status plugin_processes_allprocesses usb_authorized_default_device[] systemd_unit_file[] systemd_unit_not_found[] systemd_service_not_found[] resolv_conf_search_domain[] expired_certificate[] compiler[] fail2ban_config fail2ban_enabled_service[] apache_version apache_module[] );
|
||||
foreach my $idx ( sort @indexes ) {
|
||||
delete($lynis_report_data{$idx});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user