\n";
+ if (exists($lynis_report_data{'available_shell[]'})) {
+ if (ref($lynis_report_data{'available_shell[]'}) eq 'ARRAY') {
+ print OUT "\t\t\t\t\t\t
\n";
+ if (exists($lynis_report_data{'network_interface[]'})) {
+ if (ref($lynis_report_data{'network_interface[]'}) eq 'ARRAY') {
+ print OUT "\t\t\t\t\t
\n";
+ if (exists($lynis_report_data{'network_ipv4_address[]'})) {
+ if (ref($lynis_report_data{'network_ipv4_address[]'}) eq 'ARRAY') {
+ print OUT "\t\t\t\t\t
\n";
#print STDERR "Should be ARRAY: |".ref($lynis_report_data{'network_mac_address[]'})."|\n";
@@ -1647,19 +1679,21 @@ END
IP Address
Port
Protocol
Daemon/Process
???
END
- foreach my $obj ( sort @{$lynis_report_data{'network_listen_port[]'}} ) {
- my ($ipp,$proto,$daemon,$dunno) = split(/\|/, $obj);
- my ($ip,$port);
- if (grep(/\:/, split(//, $ipp)) > 1) {
- # must be an IPv6 address;
- my @parts = split(/\:/, $ipp);
- $port = pop(@parts); # gets the last element of the array. like $parts[-1];
- $ip = join(":", @parts); # should only be the remaining parts, which should be the ipv6 addr
- } else {
- # must be IPv4
- ($ip,$port) = split(/\:/, $ipp);
+ if (exists($lynis_report_data{'network_listen_port[]'})) {
+ foreach my $obj ( sort @{$lynis_report_data{'network_listen_port[]'}} ) {
+ my ($ipp,$proto,$daemon,$dunno) = split(/\|/, $obj);
+ my ($ip,$port);
+ if (grep(/\:/, split(//, $ipp)) > 1) {
+ # must be an IPv6 address;
+ my @parts = split(/\:/, $ipp);
+ $port = pop(@parts); # gets the last element of the array. like $parts[-1];
+ $ip = join(":", @parts); # should only be the remaining parts, which should be the ipv6 addr
+ } else {
+ # must be IPv4
+ ($ip,$port) = split(/\:/, $ipp);
+ }
+ print OUT "\t\t\t\t\t
$ip
$port
$proto
$daemon
$dunno
\n";
}
- print OUT "\t\t\t\t\t
$ip
$port
$proto
$daemon
$dunno
\n";
}
#######################################
### SECURITY INFO
@@ -1895,13 +1929,15 @@ END